-
Notifications
You must be signed in to change notification settings - Fork 462
Fix augmentation switcher for detection, fix img_info resizing when using torchvision.v2 #5200
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses multiple issues in the detection pipeline related to augmentation switching and image information handling. It fixes how img_info is updated during torchvision.v2 transforms, ensures bounding boxes are properly resized for deimV2 models with no_aug policy, and corrects the dynamic augmentation switch mechanism.
Changes:
- Added
img_infoto transformable dictionary in torchvision transform handling - Enabled
transform_bbox: truefor deimV2 model configurations (all sizes: s, m, l, x) - Fixed dynamic augmentation switch by overriding
_apply_transformsin detection dataset - Pinned datumaro dependency to specific commit instead of develop branch
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| library/src/otx/data/transform_libs/torchvision.py | Added img_info to transformable items and removed empty line |
| library/src/otx/data/dataset/detection.py | Override _apply_transforms to apply augmentation switch before transforms |
| library/src/otx/recipe/detection/deimv2_s.yaml | Enable bbox transformation in resize config |
| library/src/otx/recipe/detection/deimv2_m.yaml | Enable bbox transformation in resize config |
| library/src/otx/recipe/detection/deimv2_l.yaml | Enable bbox transformation in resize config |
| library/src/otx/recipe/detection/deimv2_x.yaml | Enable bbox transformation in resize config |
| library/pyproject.toml | Pin datumaro dependency to specific commit hash |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| dtype=pl.UInt8(), format="BGR", channels_first=True | ||
| ) | ||
| label: torch.Tensor = label_field(pl.Int32(), is_list=True) | ||
| label: torch.Tensor = label_field(pl.UInt8(), is_list=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also apply dtype=pl.UInt8() to InstanceSegmentationSample.label, for consistency?
Summary
Checklist