Skip to content

Refactor Object Detection Transforms#835

Open
yutong-xiang-97 wants to merge 1 commit into
mainfrom
yutong-trn-2271-refactor-ltdetr-object-detection-transforms
Open

Refactor Object Detection Transforms#835
yutong-xiang-97 wants to merge 1 commit into
mainfrom
yutong-trn-2271-refactor-ltdetr-object-detection-transforms

Conversation

@yutong-xiang-97

@yutong-xiang-97 yutong-xiang-97 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What has changed and why?

Refactored the LT-DETR object detection transform implementation into a shared ltdetr_transforms package with separate base, object detection, and utility modules. Updates all the relevant task model call sites to use the new structure while preserving the existing object detection behavior.

The new structure is split as follows:

  • ltdetr_transforms/base.py contains the shared LT-DETR transform argument model, common transform pipeline construction, mosaic activation handling, and collate-function behavior that can be reused by LT-DETR-style tasks.
  • ltdetr_transforms/object_detection.py contains the object-detection-specific input/output types, transform subclass, mixup/copyblend/scale-jitter handling, bbox normalization, degenerate-box filtering, and batch transform wiring.
  • ltdetr_transforms/utils.py contains reusable helper functions for image-size resolution, activation schedules, albumentations transform ordering, bbox conversion/filtering, and normalization.
  • The task-model transform modules now mostly provide task-specific defaults and aliases on top of the shared implementation instead of owning separate transform logic.

Also refactored the unit test accordingly.

How has it been tested?

Parity verified by AI.

Did you update CHANGELOG.md?

  • Yes
  • Not needed (internal change)

Did you update the documentation?

  • Yes
  • Not needed (internal change without effects for user)

@yutong-xiang-97 yutong-xiang-97 changed the title Refactor object detection transforms Refactor Object Detection Transforms Jul 3, 2026
@yutong-xiang-97 yutong-xiang-97 marked this pull request as ready for review July 3, 2026 16:02
@yutong-xiang-97

Copy link
Copy Markdown
Contributor Author

/review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant