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.
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.
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.
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.
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.
The DINO model was tested on the COCO 2017 validation dataset.
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 |
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 |
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.
B X 3 X 1536 X 1536 (B C H W)
Category labels (80 COCO) and bounding-box coordinates for each detected objects in the input image.
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
Documentation to deploy with DeepStream is provided in "Deploying to DeepStream" chapter of TAO User Guide.
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.
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.
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.