Skip to content

Commit a98b284

Browse files
authored
Add support for D-FINE (#1303)
1 parent e40bef2 commit a98b284

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ You can refine your search by selecting the task you're interested in (e.g., [te
306306
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
307307
1. **[ConvNeXT](https://huggingface.co/docs/transformers/model_doc/convnext)** (from Facebook AI) released with the paper [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie.
308308
1. **[ConvNeXTV2](https://huggingface.co/docs/transformers/model_doc/convnextv2)** (from Facebook AI) released with the paper [ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders](https://arxiv.org/abs/2301.00808) by Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon, Saining Xie.
309+
1. **[D-FINE](https://huggingface.co/docs/transformers/model_doc/d_fine)** (from University of Science and Technology of China) released with the paper [D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement](https://arxiv.org/abs/2410.13842) by Yansong Peng, Hebei Li, Peixi Wu, Yueyi Zhang, Xiaoyan Sun, Feng Wu.
309310
1. **[DAC](https://huggingface.co/docs/transformers/model_doc/dac)** (from Descript) released with the paper [Descript Audio Codec: High-Fidelity Audio Compression with Improved RVQGAN](https://arxiv.org/abs/2306.06546) by Rithesh Kumar, Prem Seetharaman, Alejandro Luebs, Ishaan Kumar, Kundan Kumar.
310311
1. **[DeBERTa](https://huggingface.co/docs/transformers/model_doc/deberta)** (from Microsoft) released with the paper [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen.
311312
1. **[DeBERTa-v2](https://huggingface.co/docs/transformers/model_doc/deberta-v2)** (from Microsoft) released with the paper [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen.

docs/snippets/6_supported-models.snippet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
1. **[ConvBERT](https://huggingface.co/docs/transformers/model_doc/convbert)** (from YituTech) released with the paper [ConvBERT: Improving BERT with Span-based Dynamic Convolution](https://arxiv.org/abs/2008.02496) by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng Yan.
2121
1. **[ConvNeXT](https://huggingface.co/docs/transformers/model_doc/convnext)** (from Facebook AI) released with the paper [A ConvNet for the 2020s](https://arxiv.org/abs/2201.03545) by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie.
2222
1. **[ConvNeXTV2](https://huggingface.co/docs/transformers/model_doc/convnextv2)** (from Facebook AI) released with the paper [ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders](https://arxiv.org/abs/2301.00808) by Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon, Saining Xie.
23+
1. **[D-FINE](https://huggingface.co/docs/transformers/model_doc/d_fine)** (from University of Science and Technology of China) released with the paper [D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement](https://arxiv.org/abs/2410.13842) by Yansong Peng, Hebei Li, Peixi Wu, Yueyi Zhang, Xiaoyan Sun, Feng Wu.
2324
1. **[DAC](https://huggingface.co/docs/transformers/model_doc/dac)** (from Descript) released with the paper [Descript Audio Codec: High-Fidelity Audio Compression with Improved RVQGAN](https://arxiv.org/abs/2306.06546) by Rithesh Kumar, Prem Seetharaman, Alejandro Luebs, Ishaan Kumar, Kundan Kumar.
2425
1. **[DeBERTa](https://huggingface.co/docs/transformers/model_doc/deberta)** (from Microsoft) released with the paper [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen.
2526
1. **[DeBERTa-v2](https://huggingface.co/docs/transformers/model_doc/deberta-v2)** (from Microsoft) released with the paper [DeBERTa: Decoding-enhanced BERT with Disentangled Attention](https://arxiv.org/abs/2006.03654) by Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen.

src/models.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5257,6 +5257,19 @@ export class RFDetrForObjectDetection extends RFDetrPreTrainedModel {
52575257
export class RFDetrObjectDetectionOutput extends RTDetrObjectDetectionOutput { }
52585258
//////////////////////////////////////////////////
52595259

5260+
//////////////////////////////////////////////////
5261+
export class DFinePreTrainedModel extends PreTrainedModel { }
5262+
export class DFineModel extends DFinePreTrainedModel { }
5263+
export class DFineForObjectDetection extends DFinePreTrainedModel {
5264+
/**
5265+
* @param {any} model_inputs
5266+
*/
5267+
async _call(model_inputs) {
5268+
return new RTDetrObjectDetectionOutput(await super._call(model_inputs));
5269+
}
5270+
}
5271+
//////////////////////////////////////////////////
5272+
52605273
//////////////////////////////////////////////////
52615274
export class TableTransformerPreTrainedModel extends PreTrainedModel { }
52625275

@@ -7566,6 +7579,7 @@ const MODEL_MAPPING_NAMES_ENCODER_ONLY = new Map([
75667579
['rt_detr', ['RTDetrModel', RTDetrModel]],
75677580
['rt_detr_v2', ['RTDetrV2Model', RTDetrV2Model]],
75687581
['rf_detr', ['RFDetrModel', RFDetrModel]],
7582+
['d_fine', ['DFineModel', DFineModel]],
75697583
['table-transformer', ['TableTransformerModel', TableTransformerModel]],
75707584
['vit', ['ViTModel', ViTModel]],
75717585
['ijepa', ['IJepaModel', IJepaModel]],
@@ -7869,6 +7883,7 @@ const MODEL_FOR_OBJECT_DETECTION_MAPPING_NAMES = new Map([
78697883
['rt_detr', ['RTDetrForObjectDetection', RTDetrForObjectDetection]],
78707884
['rt_detr_v2', ['RTDetrV2ForObjectDetection', RTDetrV2ForObjectDetection]],
78717885
['rf_detr', ['RFDetrForObjectDetection', RFDetrForObjectDetection]],
7886+
['d_fine', ['DFineForObjectDetection', DFineForObjectDetection]],
78727887
['table-transformer', ['TableTransformerForObjectDetection', TableTransformerForObjectDetection]],
78737888
['yolos', ['YolosForObjectDetection', YolosForObjectDetection]],
78747889
]);

0 commit comments

Comments
 (0)