transformers
transformers copied to clipboard
[fix] Add DeformableDetrFeatureExtractor
What does this PR do?
As pointed out by @Deppmeng who is adding Conditional DETR in #18948, the postprocessing of Deformable DETR is actually different compared to regular DETR. Namely, a sigmoid activation function is used rather than softmax, and the no-object class is included, whereas DETR discards this class.
Hence, we'll need a new DeformableDetrFeatureExtractor which includes this custom postprocessing logic. As only the postprocessing of object detection is different, I'm using Copied from statements wherever possible.
To do:
- [x] update
preprocessor_config.jsonof all repos on the hub - [x] use
from_pretrainedin the code snippets for the feature extractor
The documentation is not available anymore as the PR was closed or merged.