Skip to content

Conversation

@kprokofi
Copy link
Contributor

@kprokofi kprokofi commented Jan 14, 2026

Summary

  • Fix img_info resizing using native torchvision.v2 library (we define kernels to update img_info)
  • Fix datumaro commit to avoid incompatibility with ongoing development
  • Fix dynamic augmentation switch
  • Fix for deimV2 to resize bbox with no_aug policy

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@kprokofi kprokofi requested a review from a team as a code owner January 14, 2026 14:23
Copilot AI review requested due to automatic review settings January 14, 2026 14:23
Copy link
Contributor

Copilot AI left a 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_info to transformable dictionary in torchvision transform handling
  • Enabled transform_bbox: true for deimV2 model configurations (all sizes: s, m, l, x)
  • Fixed dynamic augmentation switch by overriding _apply_transforms in 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.

@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM BUILD labels Jan 14, 2026
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
library/src/otx/data/dataset/detection.py 25.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions github-actions bot added the TEST Any changes in tests label Jan 14, 2026
@kprokofi kprokofi added the ALGO Any changes in OTX Algo Tasks implementation label Jan 14, 2026
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)
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ALGO Any changes in OTX Algo Tasks implementation BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants