Skip to content

Commit

Permalink
Update anomaly transforms (#4059)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
ashwinvaidya17 and chuneuny-emily authored Oct 24, 2024
1 parent d85f5da commit fbf0f3e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ All notable changes to this project will be documented in this file.

### Bug fixes

- Update anomaly base transforms to use square resizing
(<https://github.com/openvinotoolkit/training_extensions/pull/4059>)
- Fix Combined Dataloader & unlabeled warmup loss in Semi-SL
(<https://github.com/openvinotoolkit/training_extensions/pull/3723>)
- Revert #3579 to fix issues with replacing coco_instance with a different format in some dataset
Expand Down
2 changes: 1 addition & 1 deletion src/otx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

__version__ = "2.2.0rc10"
__version__ = "2.2.0rc11"

import os
from pathlib import Path
Expand Down
17 changes: 7 additions & 10 deletions src/otx/recipe/_base_/data/anomaly.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
task: ANOMALY_CLASSIFICATION
input_size: 256
input_size: [256, 256]
data_format: mvtec
mem_cache_size: 1GB
mem_cache_img_max_size: null
Expand All @@ -13,11 +13,10 @@ train_subset:
batch_size: 32
num_workers: 4
transforms:
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
- class_path: torchvision.transforms.v2.Resize
init_args:
size: $(input_size)
size: [256, 256]
antialias: true
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
- class_path: torchvision.transforms.v2.ToDtype
init_args:
dtype: ${as_torch_dtype:torch.float32}
Expand All @@ -36,11 +35,10 @@ val_subset:
batch_size: 32
num_workers: 4
transforms:
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
- class_path: torchvision.transforms.v2.Resize
init_args:
size: $(input_size)
size: [256, 256]
antialias: true
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
- class_path: torchvision.transforms.v2.ToDtype
init_args:
dtype: ${as_torch_dtype:torch.float32}
Expand All @@ -59,11 +57,10 @@ test_subset:
batch_size: 32
num_workers: 4
transforms:
- class_path: otx.core.data.transform_libs.torchvision.ResizetoLongestEdge
- class_path: torchvision.transforms.v2.Resize
init_args:
size: $(input_size)
size: [256, 256]
antialias: true
- class_path: otx.core.data.transform_libs.torchvision.PadtoSquare
- class_path: torchvision.transforms.v2.ToDtype
init_args:
dtype: ${as_torch_dtype:torch.float32}
Expand Down

0 comments on commit fbf0f3e

Please sign in to comment.