Deformable DETR
Model
Deformable DETR

Model trained on COCO2017 to detect and classify objects.

TAO Pretrained Deformable DETR

What is Train Adapt Optimize (TAO) Toolkit?

Train Adapt Optimize (TAO) Toolkit is a Python-based AI toolkit for taking purpose-built pre-trained AI models and customizing them with your own data. TAO adapts popular network architectures and backbones to your data, allowing you to train, fine tune, prune, and export highly optimized and accurate AI models for edge deployment.

Pre-trained models accelerate the AI training process and reduce costs associated with large scale data collection, labeling, and training models from scratch. Transfer learning with pre-trained models can be used for AI applications in smart cities, retail, healthcare, industrial inspection, and more.

Build end-to-end services and solutions for transforming pixels and sensor data to actionable insights using TAO DeepStream SDK and TensorRT. These models are suitable for object detection, classification, and segmentation.

Model Overview

Object detection is a popular computer vision technique that can detect one or multiple objects in a frame. Object detection will recognize the individual objects in an image and place bounding boxes around the object. This model card contains pre-trained weights for Deformable DETR object detection networks trained on the COCO dataset to facilitate transfer learning through TAO Toolkit.

Model Architecture

The models in this instance are object detectors that take color (RGB) images as input and produce bounding boxes and classes as output. There are two different types of feature extractors for Deformable DETR, namely ResNet50 and GCViT-Tiny. The backbone networks are classification networks that were pre-trained on the ImageNet dataset.

Training

This model was trained using the Deformable DETR entrypoint in TAO. The training algorithm optimizes the network to minimize the localization and confidence loss for the objects.

Training Data

Deformable DETR was trained on the COCO 2017 dataset. The COCO dataset contains 118K training images and 5K validation images and corresponding annotation files. The annotation contains bounding boxes for 80 object categories.

Performance

Evaluation Data

We test the Deformable DETR model on the COCO 2017 validation dataset.

Methodology and KPI

The key performance indicator is the mean average precision (mAP) following the standard evaluation protocol for object detection. The KPI for the evaluation data are reported below.

modelprecisionmAPmAP50mAP75mAPsmAPmmAPl
ddetr_resnet_50FP3243.562.746.425.546.559.2
ddetr_gcvit_tinyFP3247.266.950.728.850.464.0

Real-time Inference Performance

The inference is run on the provided model at FP16 precision. The inference performance is evaluated using trtexec on Jetson AGX Xavier, Xavier NX, Orin, Orin NX and NVIDIA T4, and Ampere GPUs. The Jetson devices run at Max-N configuration for maximum GPU frequency. The performance shown here is inference-only performance. End-to-end performance with streaming video data might vary slightly depending on other bottlenecks in the hardware and software.

DDETR + RN50

PlatformBSFPS
Jetson Orin Nano16.6
Orin NX 16GB19.6
AGX Orin 64GB425.8
A2127.7
T4146.5
A308141
L41107
L401283
A10032296
H10032526

DDETR + GCViT-T

PlatformBSFPS
Jetson Orin Nano13.6
Orin NX 16GB15.2
AGX Orin 64GB414.2
A2117.9
T4430.3
A30887
L4170
L401182
A10032184
H10032317

How to Use This Model

These models need to be used with NVIDIA Hardware and Software. For Hardware, the models can run on any NVIDIA GPU including NVIDIA Jetson devices. These models can only be used with TAO Toolkit, DeepStream SDK or TensorRT.

The primary use case for these models is detecting objects in a color (RGB) image. The model can be used to detect objects from photos and videos using appropriate video or image decoding and pre-processing.

It is intended for training and fine-tune using Train Adapt Optimize (TAO) Toolkit and the users' dataset of object detection. High fidelity models can be trained to new use cases. A Jupyter notebook is available as a part of TAO container and can be used to re-train.

The model is also intended for easy edge deployment using DeepStream SDK or TensorRT. DeepStream provides facilities to create efficient video analytic pipelines to capture, decode, and pre-process the data before running inference.

Input

B X 3 X 544 X 960 (B C H W)

Output

Category labels (80 COCO) and bounding-box coordinates for each detected objects in the input image.

Instructions to Use Pretrained Models with TAO

To use these models as pretrained weights for transfer learning, use the snippet below as atemplate for the model and train component of the experiment spec file to train a Deformable DETR model. For more information on the experiment spec file, please refer to the TAO Toolkit User Guide.

train:
  pretrained_model_path: /path/to/the/ddetr_resnet_50.pth
model:
  backbone: resnet_50
  train_backbone: True
  num_feature_levels: 4
  dec_layers: 6
  enc_layers: 6
  num_queries: 300
  with_box_refine: True
  dropout_ratio: 0.3

Instructions to Deploy These Models with DeepStream

Documentation to deploy with DeepStream is provided in the "Deploying to DeepStream" chapter of the TAO User Guide.

Limitations

Deformable DETR was trained on the COCO dataset with 80 object categories. Hence, the model may not perform well on different data distributions. We recommend further fine tuning on the target domain to get higher mAP.

Model Versions

  • ddetr_resnet_50_trainable_v1.0 - Pre-trained ResNet50 D-DETR model for finetune.
  • ddetr_resnet_50_deployable_v1.0 - ResNet50 D-DETR model deployable to deepstream.
  • ddetr_gc_vit_tiny_trainable_v1.0 - Pre-trained GCViT-Tiny D-DETR model for finetune.
  • ddetr_gc_vit_tiny_deployable_v1.0 - GCViT-Tiny D-DETR model deployable to deepstream.

Reference

Citations

  • Zhu, X., Su, W., Lu, L., Li, B., Wang, X., Dai, J.: Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • He, K., Zhang, X., Ren, S., Sun, J.: Deep Residual Learning for Image Recognition
  • Hatamizadeh, A., Yin, H., Heinrich, G., Kautz, J., Molchanov, P.: Global Context Vision Transformers
  • Lin, T., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollar, P., Zitnick, C.: Microsoft COCO: Common Objects in Context

Using TAO Pre-trained Models

License

This work is licensed under the Creative Commons Attribution NonCommercial ShareAlike 4.0 License (CC-BY-NC-SA-4.0). To view a copy of this license, please visit this link, or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

Technical Blogs

Suggested Reading

Ethical Considerations

NVIDIA’s platforms and application frameworks enable developers to build a wide array of AI applications. Consider potential algorithmic bias when choosing or creating the models being deployed. Work with the model’s developers to ensure that it meets the requirements for the relevant industry and use case, that the necessary instructions and documentation are provided to understand error rates, confidence intervals, and results, and that the model is being used under the conditions and in the manner intended.

Publisher
Latest Versionddetr_gc_vit_tiny_deployable_v1.0
UpdatedFebruary 3, 2024 UTC
Compressed Size194.48 MB

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.