Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on/off classification augmentations #4039

Merged

Conversation

goodsong81
Copy link
Contributor

@goodsong81 goodsong81 commented Oct 16, 2024

Summary

  • Add 'enable' flag for classification recipe transforms (default=True)
  • Add common augmentations (disabled by default for backward compatibility)
configurable_augs = [
    "PhotoMetricDistortion",
    "RandomAffine",
    "RandomVerticalFlip",
    "GaussianBlur",
    "GaussianNoise",
]
  • Add aug on/off combination tests for all classification recipes

How to test

pytest -vs tests/integration/api/test_augmentation.py

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@github-actions github-actions bot added TEST Any changes in tests OTX 2.0 labels Oct 16, 2024
@github-actions github-actions bot added the DOC Improvements or additions to documentation label Oct 16, 2024
@goodsong81 goodsong81 added this to the 2.4.0 milestone Oct 16, 2024
@goodsong81 goodsong81 force-pushed the feat/config-aug/cls-recipe branch 2 times, most recently from 2aff5bb to 7d7ab19 Compare October 17, 2024 05:06
@goodsong81 goodsong81 marked this pull request as ready for review October 17, 2024 06:11
Copy link
Contributor

@eunwoosh eunwoosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@goodsong81 goodsong81 force-pushed the feat/config-aug/cls-recipe branch from 7d7ab19 to 33485ce Compare October 17, 2024 07:27
@goodsong81 goodsong81 requested a review from eunwoosh October 17, 2024 13:18
@goodsong81 goodsong81 merged commit b67715f into openvinotoolkit:develop Oct 18, 2024
19 of 20 checks passed
@goodsong81 goodsong81 deleted the feat/config-aug/cls-recipe branch October 18, 2024 01:03
Copy link
Collaborator

@kprokofi kprokofi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we discuss common list of augmentations? Do we have a requirement about the amount of augmentations to provide for Geti?

- class_path: otx.core.data.transform_libs.torchvision.PhotoMetricDistortion
enable: false
- class_path: otx.core.data.transform_libs.torchvision.RandomAffine
enable: false
- class_path: otx.core.data.transform_libs.torchvision.RandomFlip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to keep both RandomFlip (horizontal) and RandomVerticalFlip? I think horizontal flip is more common. Will these augmentations also be used for other tasks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No requirement for augmentation list, but I've collected some from other solutions.
image

- class_path: torchvision.transforms.v2.GaussianBlur
enable: false
init_args:
kernel_size: 5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature for now will not have possibility to change parameters, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, right. But in this phase, it's a bit limited due to the UX.

@goodsong81
Copy link
Contributor Author

Can we discuss common list of augmentations? Do we have a requirement about the amount of augmentations to provide for Geti?

Let's review the augmentation list after we have some working model. Currently, next series of PRs might have no impact for OTX as they will be turned on/off by default according to the current settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOC Improvements or additions to documentation OTX 2.0 TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants