Skip to content

Commit fbf0f3e

Browse files
Update anomaly transforms (#4059)
* Update transforms Signed-off-by: Ashwin Vaidya <[email protected]> * Update transforms Signed-off-by: Ashwin Vaidya <[email protected]> * Update changelog Signed-off-by: Ashwin Vaidya <[email protected]> * Update __init__.py --------- Signed-off-by: Ashwin Vaidya <[email protected]> Co-authored-by: Emily Chun <[email protected]>
1 parent d85f5da commit fbf0f3e

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ All notable changes to this project will be documented in this file.
6868

6969
### Bug fixes
7070

71+
- Update anomaly base transforms to use square resizing
72+
(<https://github.com/openvinotoolkit/training_extensions/pull/4059>)
7173
- Fix Combined Dataloader & unlabeled warmup loss in Semi-SL
7274
(<https://github.com/openvinotoolkit/training_extensions/pull/3723>)
7375
- Revert #3579 to fix issues with replacing coco_instance with a different format in some dataset

src/otx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (C) 2024 Intel Corporation
44
# SPDX-License-Identifier: Apache-2.0
55

6-
__version__ = "2.2.0rc10"
6+
__version__ = "2.2.0rc11"
77

88
import os
99
from pathlib import Path

src/otx/recipe/_base_/data/anomaly.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
task: ANOMALY_CLASSIFICATION
2-
input_size: 256
2+
input_size: [256, 256]
33
data_format: mvtec
44
mem_cache_size: 1GB
55
mem_cache_img_max_size: null
@@ -13,11 +13,10 @@ train_subset:
1313
batch_size: 32
1414
num_workers: 4
1515
transforms:
16-
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
16+
- class_path: torchvision.transforms.v2.Resize
1717
init_args:
18-
size: $(input_size)
18+
size: [256, 256]
1919
antialias: true
20-
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
2120
- class_path: torchvision.transforms.v2.ToDtype
2221
init_args:
2322
dtype: ${as_torch_dtype:torch.float32}
@@ -36,11 +35,10 @@ val_subset:
3635
batch_size: 32
3736
num_workers: 4
3837
transforms:
39-
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
38+
- class_path: torchvision.transforms.v2.Resize
4039
init_args:
41-
size: $(input_size)
40+
size: [256, 256]
4241
antialias: true
43-
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
4442
- class_path: torchvision.transforms.v2.ToDtype
4543
init_args:
4644
dtype: ${as_torch_dtype:torch.float32}
@@ -59,11 +57,10 @@ test_subset:
5957
batch_size: 32
6058
num_workers: 4
6159
transforms:
62-
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
60+
- class_path: torchvision.transforms.v2.Resize
6361
init_args:
64-
size: $(input_size)
62+
size: [256, 256]
6563
antialias: true
66-
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
6764
- class_path: torchvision.transforms.v2.ToDtype
6865
init_args:
6966
dtype: ${as_torch_dtype:torch.float32}

0 commit comments

Comments
 (0)