Fix post processing RF-DETR#46041
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
run-slow: rf_detr |
|
This comment contains models: ["models/rf_detr"] |
molbap
left a comment
There was a problem hiding this comment.
Thanks for fixing, let's make sure Expectations fall in reasonable deviations from original implem, then should be good. The new post processing seems in line with the rest of the DETR family. left two small comments
…ozlan/transformers into fix-post-processing-rfdetr
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, lw_detr, rf_detr |
|
run-slow: rf_detr, lw_detr |
|
This comment contains models: ["models/lw_detr", "models/rf_detr"] |
What does this PR do?
The post processing used for RF-DETR was the same as the one for DETR, which is incorrect. We now use similar post-processing for both detection and segmentation as the original repo.
The preprocessing also introduced some differences with the original one as the original preprocessing rescale then resize, and we usually do the opposite in Transformers. We are now aligned with the original repo, and the remaining very small differences are due to differences in how we convert the images from pil to torch (pil_to_tensor then scale compared to to_tensor in the original repo), although this shouldn't affect the quality of the predictions.
Cc @molbap @SkalskiP