transformers icon indicating copy to clipboard operation
transformers copied to clipboard

[fix] Add DeformableDetrFeatureExtractor

Open NielsRogge opened this issue 3 years ago • 1 comments

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.json of all repos on the hub
  • [x] use from_pretrained in the code snippets for the feature extractor

NielsRogge avatar Sep 21 '22 12:09 NielsRogge

The documentation is not available anymore as the PR was closed or merged.