Co-DINO (ViT-L (304M, EVA-02), Objects365 pretrain, LVIS fine-tune (LSJ), LVIS)

Task Framework Architecture Venue
box AP Params Schedule mask AP
Weights license Paper Code Objects365 pretrain

Disclaimer

This is not an official release. All credit for the method, the architecture, and the trained weights belongs entirely to the original authors: Zhuofan Zong, Guanglu Song, and Yu Liu (SenseTime X-Lab). I claim no contribution to the underlying research or training. I host the same checkpoint the authors published to Google Drive, with a model card and a copy of its config file.

Mirror rationale

This checkpoint is already on the authors' own Hub (zongzhuofan/co-detr-vit-large-lvis-instance), so availability isn't the issue the way it is for the Google-Drive-only checkpoints elsewhere in this zoo. I mirror it anyway for consistency: the authors' repo ships a bare weights file with no config, so it isn't runnable on its own. This mirror bundles the matching config, a demo banner made with this checkpoint, and the same card format as every other checkpoint here.

I mirror only the pretrained weights; I do not redistribute any training or evaluation data. I will transfer or remove this mirror at the original authors' request. Please cite the original paper (see Citation) and use the official repository or the maintained fork dronefreak/Co-DETR for code.


Quickstart

This is not a plain-PyTorch / transformers model. Inference needs the Co-DETR project code and the OpenMMLab 1.x stack (MMDetection 2.25.3, MMCV-full 1.5.0, PyTorch 1.11). The maintained fork ships a one-command environment setup for exactly this.

# 1. Get the code + a validated environment
git clone https://github.com/dronefreak/Co-DETR && cd Co-DETR
bash tools/setup_codetr_env.sh          # builds the `codetr` conda env
conda activate codetr

# 2. Pull this checkpoint + its config from the Hub
pip install -U "huggingface_hub[cli]"
hf download dronefreak/co-dino-5scale-lsj-vit-l-lvis-instance \
    co_dino_5scale_lsj_vit_large_lvis_instance.pth co_dino_5scale_lsj_vit_large_lvis_instance.py \
    --local-dir checkpoints/

# 3. Run detection on an image / folder / video / webcam
python tools/inference.py \
    --config checkpoints/co_dino_5scale_lsj_vit_large_lvis_instance.py \
    --checkpoint checkpoints/co_dino_5scale_lsj_vit_large_lvis_instance.pth \
    --input demo/demo.jpg --out-dir outputs/ --save-json

The bundled config is identical to projects/configs/co_dino_vit/co_dino_5scale_lsj_vit_large_lvis_instance.py in the repo.


What is Co-DETR / this checkpoint

Co-DETR ("DETRs with Collaborative Hybrid Assignments Training") is a training scheme, not a new architecture. It attaches auxiliary heads that use one-to-many label assignment (an ATSS head and a Faster-R-CNN-style RoI head) alongside the DETR decoder's one-to-one Hungarian matching, and feeds the positive proposals those heads produce back into the decoder as extra queries. This makes the encoder's features more discriminative and speeds up convergence. The auxiliary heads are used only during training: this checkpoint's config sets eval_module='detr', so at inference only the Co-DINO query head runs and the RPN / RoI / ATSS heads add no inference-time computation to the deployed detector.

This checkpoint is Co-DINO (5 feature scales, large-scale jitter (LSJ)) with a ViT-L (304M, EVA-02) backbone:

Detector CoDETR meta-model; deployed head is CoDINOHead
Backbone ViT-L (304M, EVA-02), pretrained on EVA-02 MIM self-supervised pretrain, then Objects365 supervised pretrain
Object queries 900
Aux heads in state-dict RPNHead + CoStandardRoIHead, CoATSSHead: present in the weights but not executed at inference (eval_module='detr')
Instance segmentation Yes: mask_head + mask_roi_extractor run at inference and are counted in the params/latency below (unlike the training-only RPN/RoI/ATSS row above)
Parameters 355.3 M executed at inference (backbone + neck + query head + mask branch). The checkpoint additionally stores the training-only RPN / RoI / ATSS heads (395.2 M total), which inference never touches.
Classes 1203 (LVIS v1 categories, federated/long-tailed evaluation)
Training schedule Objects365 pretrain -> LVIS v1 fine-tune, Objects365 pretrain, LVIS fine-tune (LSJ)
Test-time input single scale, no flip / no TTA (the config's test pipeline; see Measured inference footprint for the actual resized size on the sample image)

Intended use & limitations

Intended use. Research and engineering work that needs an object detector in the Co-DETR family trained on LVIS v1 val: as a baseline, a feature/detection backbone, or a starting point for fine-tuning on your own dataset.

Limitations.

  • Trained and evaluated on LVIS v1; predicts 1203 long-tailed categories, not the 80 COCO classes. LVIS uses federated evaluation (not every category is exhaustively annotated in every image). Read the LVIS paper before comparing its AP to a COCO-80 number.
  • This checkpoint also runs an auxiliary mask branch at inference (reported mask AP 60.7); box detections are still the primary output, and the mask branch is a secondary, lower-emphasis capability in the original paper.
  • Accuracy can degrade substantially on domain-shifted imagery (aerial, medical, document, non-natural images, etc.).
  • The reported 67.3 box AP is the authors' number; I have not reproduced it (see Evaluation).
  • No real-time claim. See measured latency for the actual timings I got.
  • Runs only on the legacy OpenMMLab 1.x stack (MMDetection 2.25.3 / MMCV-full 1.5.0 / PyTorch 1.11); no transformers / pipeline() support, and inference: false on the Hub.
  • The auxiliary training heads in the checkpoint are not exposed as inference outputs; only the DETR query head's detections are returned.

What I checked

Integrity and "does it load and run" checks only. This is not an accuracy reproduction:

  • It loads in the codetr env (Python 3.8 / torch 1.11.0+cu113 / mmcv-full 1.5.0 / mmdet 2.25.3): not a full state-dict key match: 26 missing key(s) and 40 unexpected key(s).
  • I ran it end-to-end through tools/inference.py on the two dashcam clips shown in the banner above (CPU); it produced valid annotated outputs.
  • I did not re-measure LVIS v1 val AP; the 67.3 box AP below is the authors' number.

Measured inference footprint

Method. I built the model with mmdet.apis.init_detector, then ran inference_detector() on a single image, device='cpu', batch size 1, FP32: one warm-up call, then timed calls with time.perf_counter(). No GPU was used for this checkpoint: mine was occupied by another job at the time I mirrored it, so I fell back to CPU for both this table and the demo banner above (same code path, just --device cpu; see tools/inference.py). Peak memory is the process's peak resident set size (resource.getrusage(RUSAGE_SELF).ru_maxrss), a high-water mark since process start, not attributable to a single call the way the CUDA allocator's counters are for the GPU-measured cards in this zoo.

Item Value
Device CPU only: Intel(R) Core(TM) i5-14600KF (20 logical cores)
Stack Python 3.8, torch 1.11.0+cu113 (CPU path), mmcv-full 1.5.0, mmdet 2.25.3
Precision / batch FP32 / 1
Params executed at inference 355.3 M
Params stored in the checkpoint 395.2 M
Test image demo/demo.jpg -> 1536 x 1536 fed to backbone
Peak resident memory (process, since start) 16891 MiB (17.30 GB)
Latency / image (CPU, warm) mean 61872 ms (61774-61980, n=3)

This model has not been timed on a GPU in this repository. Expect CPU latency in the tens of seconds per image for this backbone/decoder size; LVIS v1 val inference at scale needs a GPU.


Evaluation (as reported by the original authors)

Benchmark Metric Value Source Reproduced here?
LVIS v1 val box AP 67.3 Co-DETR paper (arXiv:2211.12860) / official model zoo No
LVIS v1 val mask AP 60.7 Co-DETR paper (arXiv:2211.12860) / official model zoo No

Schedule: Objects365 pretrain, LVIS fine-tune (LSJ), 900 object queries, single-scale test, no TTA. I have not independently re-measured these numbers.


Training data

  • Objects365 pretraining: ~2M images, 365 categories. Shao et al., Objects365: A Large-Scale, High-Quality Dataset for Object Detection, ICCV 2019 (paper). Objects365's terms restrict use to non-commercial research; see License status.
  • LVIS v1 fine-tuning: 1203 categories on the COCO 2017 image set with different (federated, long-tailed) annotations. Gupta, Dollar & Girshick, LVIS: A Dataset for Large Vocabulary Instance Segmentation, CVPR 2019 (arXiv:1908.03195).
  • Backbone initialization: ViT-L (304M, EVA-02) pretrained on EVA-02 MIM self-supervised pretrain, then Objects365 supervised pretrain.

I do not redistribute LVIS or COCO here. Get LVIS from lvisdataset.org (it reuses COCO 2017 images; see cocodataset.org for those) and review both datasets' own terms yourself. This checkpoint's backbone/detector was pretrained on Objects365 before the fine-tune above. Unlike the plain-COCO checkpoints in this zoo, Objects365's non-commercial-research terms are a real constraint here, not a hypothetical one.


License status

The Co-DETR source code is MIT-licensed (© 2022 SenseTime X-Lab, LICENSE). The upstream repository does not provide a separate, explicit license for this checkpoint's weights. The original authors have published other Co-DETR checkpoints (the ViT-L family) on Hugging Face with MIT metadata, but I do not treat that as definitive evidence that these weights are independently licensed under MIT.

Because the applicable rights are undetermined, I set the Hub metadata for this repo to license: unknown. Verify the applicable rights yourself before redistribution or commercial use.

⚠️ Objects365 pretrain. This checkpoint's backbone/detector was pretrained on the Objects365 dataset before being fine-tuned on LVIS. Objects365's own terms restrict it to non-commercial research use (Objects365 terms); that restriction plausibly carries through to weights derived from it. Treat this checkpoint as research-only unless you independently confirm otherwise; this is a stronger caveat than the general license: unknown above, not a substitute for it.

If you are one of the original authors and want this mirror removed or transferred, open an issue on this repo or contact dronefreak and I will action it.


Citation

@inproceedings{zong2023detrs,
  title={DETRs with Collaborative Hybrid Assignments Training},
  author={Zong, Zhuofan and Song, Guanglu and Liu, Yu},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  pages={6748--6758},
  year={2023}
}

The underlying detector and backbone:

@inproceedings{zhu2021deformable,
  title={Deformable DETR: Deformable Transformers for End-to-End Object Detection},
  author={Zhu, Xizhou and Su, Weijie and Lu, Lewei and Li, Bin and Wang, Xiaogang and Dai, Jifeng},
  booktitle={International Conference on Learning Representations (ICLR)},
  year={2021}
}
@article{fang2023eva02,
  title={EVA-02: A Visual Representation for Neon Genesis},
  author={Fang, Yuxin and Sun, Quan and Wang, Xinggang and Huang, Tiejun and Wang, Xinlong and Cao, Yue},
  journal={arXiv preprint arXiv:2303.11331},
  year={2023}
}
@inproceedings{shao2019objects365,
  title={Objects365: A Large-Scale, High-Quality Dataset for Object Detection},
  author={Shao, Shuai and Li, Zeming and Zhang, Tianyuan and Peng, Chao and Yu, Gang and Zhang, Xiangyu and Li, Jing and Sun, Jian},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  year={2019}
}
@inproceedings{gupta2019lvis,
  title={LVIS: A Dataset for Large Vocabulary Instance Segmentation},
  author={Gupta, Agrim and Dollar, Piotr and Girshick, Ross},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2019}
}

Built with MMDetection / MMCV (OpenMMLab).


Acknowledgements

I sincerely thank Zhuofan Zong, Guanglu Song, and Yu Liu for developing Co-DETR and releasing the pretrained weights, and the OpenMMLab team for MMDetection and MMCV. This mirror only makes one of their existing checkpoints easier and more reliable to obtain.


Provenance

co_dino_5scale_lsj_vit_large_lvis_instance.pth, 1,634,709,721 bytes, SHA-256 28c5814d20e3af061fad5c651902ee67e357a579103acfaaa9ca4d3d8edc405e. I copied it byte-for-byte and unmodified from the authors' own Hugging Face repo zongzhuofan/co-detr-vit-large-lvis-instance.

Repo files: co_dino_5scale_lsj_vit_large_lvis_instance.pth (weights), co_dino_5scale_lsj_vit_large_lvis_instance.py (the MMDetection config needed to build the model), config.json (metadata summary; also what the Hub uses to count downloads), plus assets/demo_banner.mp4 / assets/demo_banner_poster.jpg for the card. config.json is descriptive only, inference: false, and is not a transformers config.

Downloads last month
12
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including dronefreak/co-dino-5scale-lsj-vit-l-lvis-instance

Papers for dronefreak/co-dino-5scale-lsj-vit-l-lvis-instance

Evaluation results