Improve DETR post-processing methods#19205
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
sgugger
left a comment
There was a problem hiding this comment.
Thanks for working on this. As mentioned internally, don't hesitate to separate PRs in focused bits: here there could have been:
- one PR to quickly fix the comments
- one PR to add the post processing to DETR
- one PR for the deprecation warnings
Also wondering if we should target a lower version than v5 for the removal of the methods, since this is all a bit of an experimental API.
|
@amyeroberts @sgugger thank you both for the feedback! Could you take a final look at the PR? If everything looks fine, I'll apply the same changes to MaskFormer and update the model cards. |
Makes sense, I'll split my future PRs into smaller, issue-specific ones.
I agree, we can target a lower version for the removal of deprecated methods. |
amyeroberts
left a comment
There was a problem hiding this comment.
LGTM 👍 Thanks for the PR and work on improving this
Left a few nits, main comment is about moving the processing helper functions out of the class.
What does this PR do?
post_process_object_detection,post_process_semantic_segmentation,post_process_instance_segmentationandpost_process_panoptic_segmentationmethods with optional resizing and thresholding to filter out low probability predictions.This PR is part of a larger effort to ensure post-processing methods have consistent naming, input arguments and output. Deprecation warnings are added to existing post-processing methods.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.