NGC Catalog
CLASSIC
Welcome Guest
Models
TAO Pretrained DINO with Foundational Model Backbone

TAO Pretrained DINO with Foundational Model Backbone

For downloads and more information, please view on a desktop device.
Logo for TAO Pretrained DINO with Foundational Model Backbone
Description
TAO Pretrained DINO with Foundational Model Backbone
Publisher
-
Latest Version
trainable_v1.0
Modified
January 5, 2024
Size
3.61 GB

TAO Pretrained DINO with Foundational Model Backbone

What is Train Adapt Optimize (TAO) Toolkit?

Train Adapt Optimize (TAO) Toolkit is a Python-based AI toolkit for customizing purpose-built pre-trained AI models with your own data. TAO Toolkit 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.

The 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 including smart cities, retail, healthcare, and industrial inspection.

Build end-to-end services and solutions for transforming pixels and sensor data to actionable insights using the 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 recognizes the individual objects in an image and places bounding boxes around the object. This model card contains pre-trained weights for the DINO object detection networks trained on the COCO dataset. The goal of this card is to facilitate transfer learning through the Train Adapt Optimize (TAO) Toolkit.

Model Architecture

The models in this instance are object detectors that take RGB images as input and produce bounding boxes and classes as output. More specifically, this model was trained with NVDINOv2 backbone that was trained using a self-supervised manner on NVIDIA proprietary data and achieved SOTA accuracy on zero-shot ImageNet classification. To enable the ViT backbone into DINO, the ViT-Adapter was used as the neck architecture. The ViT-Adapter improves the accuracy on dense predictions, such as object detection.

Training

This model was trained using the DINO entrypoint in TAO. The training algorithm optimizes the network to minimize the localization and confidence loss for the objects. Unlike regular DINO training, ViT requires a square input resolution that is divisible by 16. As a result, images are resized using Large Scale Jittering so that they are resized to 1536 x 1536.

Training Data

DINO was trained on the COCO 2017 dataset, which contains 118K training images and 5K validation images with corresponding annotation files. The annotation files contain bounding boxes for 80 object categories.

Performance

Evaluation Data

The DINO model was tested 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:

model precision mAP mAP50 mAP75 mAPs mAPm mAPl
dino_nvdinov2 FP16 57.8 76.7 63.1 41.2 61.4 72.7

Real-Time Inference Performance

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

NVDINOv2 + ViT-Adapter + DINO

Platform BS FPS
AGX Orin 64GB 2 0.46
A30 2 1.92
L4 2 1.27
L40 2 3.57
A100 2 4.00
H100 2 6.99

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 Train Adapt Optimize (TAO) Toolkit, DeepStream SDK, or TensorRT.

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

These models are intended for training and fine-tune with the TAO Toolkit and your datasets for object detection. High-fidelity models can be trained with new use cases. A Jupyter Notebook is available as a part of the TAO container and can be used to re-train.

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

Input

B X 3 X 1536 X 1536 (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 following snippet as a template for the model and train component of the experiment spec file to train a DINO model. For more information on the experiment spec file, see the TAO Toolkit User Guide.

train:
  pretrained_model_path: /path/to/the/dino_dinov2.pth
dataset:
  augmentation:
    fixed_random_crop: 1536
    test_random_resize: 1536
    random_resize_max_size: 1536
    fixed_padding: True
  num_classes: 91
model:
  backbone: vit_large_dinov2
  train_backbone: False
  num_feature_levels: 4
  dec_layers: 6
  enc_layers: 6
  num_queries: 900
  dropout_ratio: 0.0
  dim_feedforward: 2048

Instructions to Deploy These Models with DeepStream

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

Limitations

DINO was trained on the COCO dataset with 80 object categories. The model might not perform well on different data distributions. Conducting further fine-tuning on the target domain is recommended to get a higher mAP.

Model Versions

  • dino_dinov2_trainable_v1.0 - Pre-trained ResNet50 DINO model for finetune.
  • dino_dinov2_deployable_v1.0 - ResNet50 DINO model deployable to deepstream.

Reference

Citations

  • Zhang, H., Li, F., Liu, S., Zhang, L., Su, H., Zhu, J., Ni, L., Shum, H.: DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection.
  • Oquab, M., et al.: Dinov2: Learning robust visual features without supervision.
  • Chen, Z., Duan, Y., Wang, W., He, J., Lu, T., Dai, J., Qiao, Y.: Vision Transformer Adapter for Dense Predictions.
  • Ghiasi, G., Cui, Y., Srinivas, A., Qian, R., Lin, T., Cubuk, E., Le, Q., Zoph, B.:Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentation.

Using TAO Pre-Trained Models

  • Get TAO Container
  • Get other purpose-built models from NGC model registry:
    • TrafficCamNet
    • DashCamNet
    • FaceDetectIR
    • VehicleMakeNet
    • VehicleTypeNet
    • ActionRecognitionNet
    • PoseClassificationNet
    • ReIdentificationNet

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, see this link, or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

Technical Blogs

  • Access the latest in Vision AI model development workflows with NVIDIA TAO Toolkit 5.0
  • Improve accuracy and robustness of vision AI apps with Vision Transformers and NVIDIA TAO
  • Train like a ‘pro’ without being an AI expert using TAO AutoML
  • Create Custom AI models using NVIDIA TAO Toolkit with Azure Machine Learning
  • Developing and Deploying AI-powered Robots with NVIDIA Isaac Sim and NVIDIA TAO
  • Learn endless ways to adapt and supercharge your AI workflows with TAO - Whitepaper
  • Customize Action Recognition with TAO and deploy with DeepStream
  • Read the 2 part blog on training and optimizing 2D body pose estimation model with TAO - Part 1 | Part 2
  • Learn how to train real-time License plate detection and recognition app with TAO and DeepStream.
  • Model accuracy is extremely important, learn how you can achieve state of the art accuracy for classification and object detection models using TAO

Suggested Reading

  • More information on about TAO Toolkit and pre-trained models can be found at the NVIDIA Developer Zone
  • Refer to the TAO Toolkit documentation
  • Read the TAO Toolkit Quick Start Guide and release notes.
  • If you have any questions or feedback, see the discussions on the TAO Toolkit Developer Forums
  • Deploy your models for video analytics applications using the DeepStream SDK
  • Deploy your models in Riva for ConvAI use cases.

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.