Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DETA #20983

Merged
merged 58 commits into from
Jan 31, 2023
Merged

Add DETA #20983

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8ef72d4
First draft
NielsRogge Dec 16, 2022
756a053
Add initial draft of conversion script
NielsRogge Dec 17, 2022
da2cc18
Convert all weights
NielsRogge Dec 17, 2022
771584e
Fix config
NielsRogge Dec 17, 2022
6d0a402
Add image processor
NielsRogge Dec 17, 2022
7da311b
Fix DetaImageProcessor
NielsRogge Dec 18, 2022
137c36f
Run make fix copies
NielsRogge Dec 18, 2022
3673174
Remove timm dependency
NielsRogge Dec 18, 2022
460f629
Fix dummy objects
NielsRogge Dec 18, 2022
fce672e
Improve loss function
NielsRogge Dec 18, 2022
201add7
Remove conv_encoder attribute
NielsRogge Dec 20, 2022
ba351d3
Update conversion scripts
NielsRogge Dec 21, 2022
ffe7cf7
Improve postprocessing + docs
NielsRogge Dec 22, 2022
15e79d4
Fix copied from statements
NielsRogge Dec 22, 2022
aa4b6ad
Add tests
NielsRogge Dec 22, 2022
617455b
Improve postprocessing
NielsRogge Dec 22, 2022
75c8666
Improve postprocessing
NielsRogge Dec 22, 2022
b3a47fc
Update READMEs
NielsRogge Dec 22, 2022
9a1ecf0
More improvements
NielsRogge Dec 22, 2022
3cefbc6
Fix rebase
NielsRogge Jan 3, 2023
7f2e6bf
Add is_torchvision_available
NielsRogge Jan 5, 2023
6b8c046
Add torchvision dependency
NielsRogge Jan 5, 2023
9d81db6
Fix typo and README
NielsRogge Jan 5, 2023
5246dfc
Fix bug
NielsRogge Jan 16, 2023
cd8faeb
Add copied from
NielsRogge Jan 16, 2023
b7c7d8d
Fix style
NielsRogge Jan 17, 2023
2bc6be5
Apply suggestions
NielsRogge Jan 17, 2023
be1b0d6
Fix thanks to @ydshieh
NielsRogge Jan 17, 2023
b84bcbb
Fix another dependency check
NielsRogge Jan 17, 2023
586d4c4
Simplify image processor
NielsRogge Jan 17, 2023
c2db972
Add scipy
NielsRogge Jan 17, 2023
83ca7f5
Improve code
NielsRogge Jan 18, 2023
5648885
Add threshold argument
NielsRogge Jan 19, 2023
433672a
Fix bug
NielsRogge Jan 19, 2023
6761600
Set default threshold
NielsRogge Jan 19, 2023
afafd18
Improve integration test
NielsRogge Jan 19, 2023
32ac2a0
Add another integration test
NielsRogge Jan 20, 2023
21cd670
Update setup.py
NielsRogge Jan 20, 2023
92e54e6
Address review
NielsRogge Jan 20, 2023
8652aa4
Improve deformable attention function
NielsRogge Jan 20, 2023
e042fd2
Improve copied from
NielsRogge Jan 20, 2023
6a60910
Use relative imports
NielsRogge Jan 23, 2023
2d2cb82
Address review
NielsRogge Jan 23, 2023
1045e8d
Replace assertions
NielsRogge Jan 23, 2023
6fca8d4
Address review
NielsRogge Jan 23, 2023
624bc41
Update dummies
NielsRogge Jan 23, 2023
cc89371
Remove dummies
NielsRogge Jan 24, 2023
80bd3c0
Address comments, update READMEs
NielsRogge Jan 25, 2023
5d855ce
Remove custom kernel code
NielsRogge Jan 26, 2023
7adaa78
Add image processor tests
NielsRogge Jan 26, 2023
e7ae8df
Add requires_backends
NielsRogge Jan 26, 2023
0267a59
Add minor comment
NielsRogge Jan 27, 2023
44f1b61
Update scripts
NielsRogge Jan 30, 2023
d47eab7
Update organization name
NielsRogge Jan 30, 2023
84e4a2b
Fix defaults, add doc tests
NielsRogge Jan 30, 2023
6e17822
Add id2label for object 365
NielsRogge Jan 30, 2023
f9d2cce
Fix tests
NielsRogge Jan 30, 2023
2377623
Update task guide
NielsRogge Jan 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/create_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ def job_name(self):
"pip install --upgrade pip",
"pip install .[torch,testing,vision]",
"pip install torchvision",
"pip install scipy",
"pip install 'git+https://github.com/facebookresearch/detectron2.git'",
"sudo apt install tesseract-ocr",
"pip install pytesseract",
Expand All @@ -367,6 +368,7 @@ def job_name(self):
tests_to_run=[
"tests/models/*layoutlmv*",
"tests/models/*nat",
"tests/models/deta",
],
pytest_num_workers=1,
pytest_options={"durations": 100},
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ Current number of checkpoints: ![](https://img.shields.io/endpoint?url=https://h
1. **[Decision Transformer](https://huggingface.co/docs/transformers/model_doc/decision_transformer)** (from Berkeley/Facebook/Google) released with the paper [Decision Transformer: Reinforcement Learning via Sequence Modeling](https://arxiv.org/abs/2106.01345) by Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch.
1. **[Deformable DETR](https://huggingface.co/docs/transformers/model_doc/deformable_detr)** (from SenseTime Research) released with the paper [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://arxiv.org/abs/2010.04159) by Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai.
1. **[DeiT](https://huggingface.co/docs/transformers/model_doc/deit)** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
1. **[DETA](https://huggingface.co/docs/transformers/main/model_doc/deta)** (from The University of Texas at Austin) released with the paper [NMS Strikes Back](https://arxiv.org/abs/2212.06137) by Jeffrey Ouyang-Zhang, Jang Hyun Cho, Xingyi Zhou, Philipp Krähenbühl.
1. **[DETR](https://huggingface.co/docs/transformers/model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
1. **[DialoGPT](https://huggingface.co/docs/transformers/model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
1. **[DiNAT](https://huggingface.co/docs/transformers/model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
Expand Down
35 changes: 18 additions & 17 deletions README_es.md

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions README_hd.md

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions README_ja.md

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions README_ko.md

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions README_zh-hans.md

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions README_zh-hant.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/source/en/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@
title: Deformable DETR
- local: model_doc/deit
title: DeiT
- local: model_doc/deta
title: DETA
- local: model_doc/detr
title: DETR
- local: model_doc/dinat
Expand Down
2 changes: 2 additions & 0 deletions docs/source/en/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ The documentation is organized into five sections:
1. **[Decision Transformer](model_doc/decision_transformer)** (from Berkeley/Facebook/Google) released with the paper [Decision Transformer: Reinforcement Learning via Sequence Modeling](https://arxiv.org/abs/2106.01345) by Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch.
1. **[Deformable DETR](model_doc/deformable_detr)** (from SenseTime Research) released with the paper [Deformable DETR: Deformable Transformers for End-to-End Object Detection](https://arxiv.org/abs/2010.04159) by Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, Jifeng Dai.
1. **[DeiT](model_doc/deit)** (from Facebook) released with the paper [Training data-efficient image transformers & distillation through attention](https://arxiv.org/abs/2012.12877) by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, Hervé Jégou.
1. **[DETA](model_doc/deta)** (from The University of Texas at Austin) released with the paper [NMS Strikes Back](https://arxiv.org/abs/2212.06137) by Jeffrey Ouyang-Zhang, Jang Hyun Cho, Xingyi Zhou, Philipp Krähenbühl.
1. **[DETR](model_doc/detr)** (from Facebook) released with the paper [End-to-End Object Detection with Transformers](https://arxiv.org/abs/2005.12872) by Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, Sergey Zagoruyko.
1. **[DialoGPT](model_doc/dialogpt)** (from Microsoft Research) released with the paper [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://arxiv.org/abs/1911.00536) by Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, Bill Dolan.
1. **[DiNAT](model_doc/dinat)** (from SHI Labs) released with the paper [Dilated Neighborhood Attention Transformer](https://arxiv.org/abs/2209.15001) by Ali Hassani and Humphrey Shi.
Expand Down Expand Up @@ -271,6 +272,7 @@ Flax), PyTorch, and/or TensorFlow.
| Decision Transformer | ❌ | ❌ | ✅ | ❌ | ❌ |
| Deformable DETR | ❌ | ❌ | ✅ | ❌ | ❌ |
| DeiT | ❌ | ❌ | ✅ | ✅ | ❌ |
| DETA | ❌ | ❌ | ✅ | ❌ | ❌ |
| DETR | ❌ | ❌ | ✅ | ❌ | ❌ |
| DiNAT | ❌ | ❌ | ✅ | ❌ | ❌ |
| DistilBERT | ✅ | ✅ | ✅ | ✅ | ✅ |
Expand Down
54 changes: 54 additions & 0 deletions docs/source/en/model_doc/deta.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->

# DETA

## Overview

The DETA model was proposed in [NMS Strikes Back](https://arxiv.org/abs/2212.06137) by Jeffrey Ouyang-Zhang, Jang Hyun Cho, Xingyi Zhou, Philipp Krähenbühl.
DETA (short for Detection Transformers with Assignment) improves [Deformable DETR](deformable_detr) by replacing the one-to-one bipartite Hungarian matching loss
with one-to-many label assignments used in traditional detectors with non-maximum suppression (NMS). This leads to significant gains of up to 2.5 mAP.

The abstract from the paper is the following:

*Detection Transformer (DETR) directly transforms queries to unique objects by using one-to-one bipartite matching during training and enables end-to-end object detection. Recently, these models have surpassed traditional detectors on COCO with undeniable elegance. However, they differ from traditional detectors in multiple designs, including model architecture and training schedules, and thus the effectiveness of one-to-one matching is not fully understood. In this work, we conduct a strict comparison between the one-to-one Hungarian matching in DETRs and the one-to-many label assignments in traditional detectors with non-maximum supervision (NMS). Surprisingly, we observe one-to-many assignments with NMS consistently outperform standard one-to-one matching under the same setting, with a significant gain of up to 2.5 mAP. Our detector that trains Deformable-DETR with traditional IoU-based label assignment achieved 50.2 COCO mAP within 12 epochs (1x schedule) with ResNet50 backbone, outperforming all existing traditional or transformer-based detectors in this setting. On multiple datasets, schedules, and architectures, we consistently show bipartite matching is unnecessary for performant detection transformers. Furthermore, we attribute the success of detection transformers to their expressive transformer architecture.*

Tips:

- One can use [`DetaImageProcessor`] to prepare images and optional targets for the model.

This model was contributed by [nielsr](https://huggingface.co/nielsr).
The original code can be found [here](https://github.com/jozhang97/DETA).


## DetaConfig

[[autodoc]] DetaConfig


## DetaImageProcessor

[[autodoc]] DetaImageProcessor
- preprocess
- post_process_object_detection


## DetaModel

[[autodoc]] DetaModel
- forward


## DetaForObjectDetection

[[autodoc]] DetaForObjectDetection
- forward
2 changes: 1 addition & 1 deletion docs/source/en/tasks/object_detection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The task illustrated in this tutorial is supported by the following model archit

<!--This tip is automatically generated by `make fix-copies`, do not fill manually!-->

[Conditional DETR](../model_doc/conditional_detr), [Deformable DETR](../model_doc/deformable_detr), [DETR](../model_doc/detr), [Table Transformer](../model_doc/table-transformer), [YOLOS](../model_doc/yolos)
[Conditional DETR](../model_doc/conditional_detr), [Deformable DETR](../model_doc/deformable_detr), [DETA](../model_doc/deta), [DETR](../model_doc/detr), [Table Transformer](../model_doc/table-transformer), [YOLOS](../model_doc/yolos)

<!--End of the generated tip-->

Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"tokenizers>=0.11.1,!=0.11.3,<0.14",
"torch>=1.7,!=1.12.0",
"torchaudio",
"torchvision",
"pyctcdecode>=0.4.0",
"tqdm>=4.27",
"unidic>=1.0.2",
Expand Down Expand Up @@ -285,6 +286,7 @@ def run(self):
extras["flax-speech"] = extras["audio"]
extras["vision"] = deps_list("Pillow")
extras["timm"] = deps_list("timm")
extras["torch-vision"] = deps_list("torchvision") + extras["vision"]
extras["natten"] = deps_list("natten")
extras["codecarbon"] = deps_list("codecarbon")
extras["video"] = deps_list("decord")
Expand Down Expand Up @@ -331,6 +333,7 @@ def run(self):
+ extras["vision"]
+ extras["integrations"]
+ extras["timm"]
+ extras["torch-vision"]
+ extras["codecarbon"]
+ extras["accelerate"]
+ extras["video"]
Expand All @@ -351,6 +354,7 @@ def run(self):
+ extras["vision"]
+ extras["integrations"]
+ extras["timm"]
+ extras["torch-vision"]
+ extras["codecarbon"]
+ extras["quality"]
+ extras["ja"]
Expand Down
21 changes: 21 additions & 0 deletions src/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
is_timm_available,
is_tokenizers_available,
is_torch_available,
is_torchvision_available,
is_vision_available,
logging,
)
Expand Down Expand Up @@ -236,6 +237,7 @@
"models.decision_transformer": ["DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "DecisionTransformerConfig"],
"models.deformable_detr": ["DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP", "DeformableDetrConfig"],
"models.deit": ["DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "DeiTConfig"],
"models.deta": ["DETA_PRETRAINED_CONFIG_ARCHIVE_MAP", "DetaConfig"],
"models.detr": ["DETR_PRETRAINED_CONFIG_ARCHIVE_MAP", "DetrConfig"],
"models.dialogpt": [],
"models.dinat": ["DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP", "DinatConfig"],
Expand Down Expand Up @@ -589,6 +591,7 @@
"is_torch_available",
"is_torch_neuroncore_available",
"is_torch_tpu_available",
"is_torchvision_available",
"is_vision_available",
"logging",
],
Expand Down Expand Up @@ -797,6 +800,7 @@
["DeformableDetrFeatureExtractor", "DeformableDetrImageProcessor"]
)
_import_structure["models.deit"].extend(["DeiTFeatureExtractor", "DeiTImageProcessor"])
_import_structure["models.deta"].append("DetaImageProcessor")
_import_structure["models.detr"].extend(["DetrFeatureExtractor", "DetrImageProcessor"])
_import_structure["models.donut"].extend(["DonutFeatureExtractor", "DonutImageProcessor"])
_import_structure["models.dpt"].extend(["DPTFeatureExtractor", "DPTImageProcessor"])
Expand Down Expand Up @@ -1343,6 +1347,14 @@
"DeiTPreTrainedModel",
]
)
_import_structure["models.deta"].extend(
[
"DETA_PRETRAINED_MODEL_ARCHIVE_LIST",
"DetaForObjectDetection",
"DetaModel",
"DetaPreTrainedModel",
]
)
_import_structure["models.dinat"].extend(
[
"DINAT_PRETRAINED_MODEL_ARCHIVE_LIST",
Expand Down Expand Up @@ -3681,6 +3693,7 @@
)
from .models.deformable_detr import DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP, DeformableDetrConfig
from .models.deit import DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP, DeiTConfig
from .models.deta import DETA_PRETRAINED_CONFIG_ARCHIVE_MAP, DetaConfig
from .models.detr import DETR_PRETRAINED_CONFIG_ARCHIVE_MAP, DetrConfig
from .models.dinat import DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP, DinatConfig
from .models.distilbert import DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, DistilBertConfig, DistilBertTokenizer
Expand Down Expand Up @@ -4008,6 +4021,7 @@
is_torch_available,
is_torch_neuroncore_available,
is_torch_tpu_available,
is_torchvision_available,
is_vision_available,
logging,
)
Expand Down Expand Up @@ -4168,6 +4182,7 @@
from .models.convnext import ConvNextFeatureExtractor, ConvNextImageProcessor
from .models.deformable_detr import DeformableDetrFeatureExtractor, DeformableDetrImageProcessor
from .models.deit import DeiTFeatureExtractor, DeiTImageProcessor
from .models.deta import DetaImageProcessor
from .models.detr import DetrFeatureExtractor, DetrImageProcessor
from .models.donut import DonutFeatureExtractor, DonutImageProcessor
from .models.dpt import DPTFeatureExtractor, DPTImageProcessor
Expand Down Expand Up @@ -4629,6 +4644,12 @@
DeiTModel,
DeiTPreTrainedModel,
)
from .models.deta import (
DETA_PRETRAINED_MODEL_ARCHIVE_LIST,
DetaForObjectDetection,
DetaModel,
DetaPreTrainedModel,
)
from .models.dinat import (
DINAT_PRETRAINED_MODEL_ARCHIVE_LIST,
DinatBackbone,
Expand Down
1 change: 1 addition & 0 deletions src/transformers/dependency_versions_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"tokenizers": "tokenizers>=0.11.1,!=0.11.3,<0.14",
"torch": "torch>=1.7,!=1.12.0",
"torchaudio": "torchaudio",
"torchvision": "torchvision",
"pyctcdecode": "pyctcdecode>=0.4.0",
"tqdm": "tqdm>=4.27",
"unidic": "unidic>=1.0.2",
Expand Down
1 change: 1 addition & 0 deletions src/transformers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
decision_transformer,
deformable_detr,
deit,
deta,
detr,
dialogpt,
dinat,
Expand Down
3 changes: 3 additions & 0 deletions src/transformers/models/auto/configuration_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
("decision_transformer", "DecisionTransformerConfig"),
("deformable_detr", "DeformableDetrConfig"),
("deit", "DeiTConfig"),
("deta", "DetaConfig"),
("detr", "DetrConfig"),
("dinat", "DinatConfig"),
("distilbert", "DistilBertConfig"),
Expand Down Expand Up @@ -230,6 +231,7 @@
("deberta-v2", "DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP"),
("deformable_detr", "DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP"),
("deit", "DEIT_PRETRAINED_CONFIG_ARCHIVE_MAP"),
("deta", "DETA_PRETRAINED_CONFIG_ARCHIVE_MAP"),
("detr", "DETR_PRETRAINED_CONFIG_ARCHIVE_MAP"),
("dinat", "DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP"),
("distilbert", "DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP"),
Expand Down Expand Up @@ -389,6 +391,7 @@
("decision_transformer", "Decision Transformer"),
("deformable_detr", "Deformable DETR"),
("deit", "DeiT"),
("deta", "DETA"),
("detr", "DETR"),
("dialogpt", "DialoGPT"),
("dinat", "DiNAT"),
Expand Down
1 change: 1 addition & 0 deletions src/transformers/models/auto/image_processing_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
("data2vec-vision", "BeitImageProcessor"),
("deformable_detr", "DeformableDetrImageProcessor"),
("deit", "DeiTImageProcessor"),
("deta", "DetaImageProcessor"),
("detr", "DetrImageProcessor"),
("dinat", "ViTImageProcessor"),
("donut-swin", "DonutImageProcessor"),
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/models/auto/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
("decision_transformer_gpt2", "DecisionTransformerGPT2Model"),
("deformable_detr", "DeformableDetrModel"),
("deit", "DeiTModel"),
("deta", "DetaModel"),
("detr", "DetrModel"),
("dinat", "DinatModel"),
("distilbert", "DistilBertModel"),
Expand Down Expand Up @@ -538,6 +539,7 @@
# Model for Object Detection mapping
("conditional_detr", "ConditionalDetrForObjectDetection"),
("deformable_detr", "DeformableDetrForObjectDetection"),
("deta", "DetaForObjectDetection"),
("detr", "DetrForObjectDetection"),
("table-transformer", "TableTransformerForObjectDetection"),
("yolos", "YolosForObjectDetection"),
Expand Down
Loading