Skip to content

Conversation

Rishirandhawa
Copy link

Summary

This PR removes the deprecated max_size parameter from both ConditionalDetrImageProcessor and ConditionalDetrImageProcessorFast classes.

Fixes

Closes #37939

Changes

  • Removed max_size parameter handling from ConditionalDetrImageProcessor.__init__
  • Removed max_size parameter handling from ConditionalDetrImageProcessorFast.__init__
  • Removed max_size parameter handling from from_dict methods in both classes
  • Removed max_size parameter handling from preprocess/resize methods
  • Removed all deprecation warnings that referenced v4.26 removal

Breaking Change

⚠️ This is a breaking change - the max_size parameter is no longer accepted.

Users should migrate to using size['longest_edge'] instead:

# Before (deprecated, now removed):
processor = ConditionalDetrImageProcessor(max_size=800)

# After (correct usage):
processor = ConditionalDetrImageProcessor(size={'shortest_edge': 600, 'longest_edge': 800})

Justification

The max_size parameter was marked for deprecation and scheduled for removal in v4.26. The current version is v4.56, so this removal is long overdue. The deprecation warnings have been showing for many versions, giving users ample time to migrate their code.

Testing

  • Verified that max_size parameter is no longer accepted and raises TypeError
  • Verified that proper size parameter still works correctly
  • Confirmed no deprecation warnings are emitted for normal usage

…ssors

- Remove max_size parameter handling from ConditionalDetrImageProcessor.__init__
- Remove max_size parameter handling from ConditionalDetrImageProcessorFast.__init__
- Remove max_size parameter handling from from_dict methods
- Remove max_size parameter handling from preprocess/resize methods
- Remove deprecation warnings that referenced v4.26 removal
- Users should now use size['longest_edge'] instead of max_size

Fixes huggingface#37939
…age processors

- Remove max_size parameter handling from DetrImageProcessor.__init__
- Remove max_size parameter handling from DetrImageProcessor.from_dict
- Remove max_size parameter handling from DetrImageProcessor.resize method
- Remove max_size parameter handling from DetrImageProcessor.preprocess method
- Remove all deprecation warnings that referenced v4.26 removal
- ConditionalDETR files automatically updated via copy mechanism
- Users should now use size['longest_edge'] instead of max_size

Fixes huggingface#37939
- Remove max_size parameter handling from DetrImageProcessorFast.__init__
- Remove max_size parameter handling from DetrImageProcessorFast.from_dict
- Remove max_size parameter handling from DetrImageProcessorFast.preprocess method
- This completes the removal of all deprecated max_size parameters across DETR and ConditionalDETR

Continues fix for huggingface#37939
- Remove max_size parameter handling from DeformableDetrImageProcessor
- Remove max_size parameter handling from DeformableDetrImageProcessorFast
- This maintains copy consistency with ConditionalDETR which copies from DeformableDETR

Part of huggingface#37939
Remove deprecated max_size parameter from all processors that copy from DETR:
- DeformableDetrImageProcessor and DeformableDetrImageProcessorFast
- GroundingDinoImageProcessor and GroundingDinoImageProcessorFast
- RtDetrImageProcessor
- YolosImageProcessor and YolosImageProcessorFast

This ensures copy consistency across the entire DETR model family.
The copy mechanism requires all derived processors to match the source DETR implementation.

Fixes huggingface#37939 and resolves CI copy consistency errors
- Remove unused imports from grounding_dino, rt_detr, and yolos image processors
- Maintain consistent copy structure across DETR-family processors
- Follow-up to max_size parameter deprecation fixes
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: conditional_detr, deformable_detr, detr, grounding_dino, rt_detr, yolos

@Rocketknight1
Copy link
Member

cc @qubvel

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.

ConditionalDetrImageProcessor still accepts the deprecated parameter max_size
2 participants