NGC Catalog
CLASSIC
Welcome Guest
Models
VehicleMakeNet

VehicleMakeNet

For downloads and more information, please view on a desktop device.
Logo for VehicleMakeNet
Features
Description
Resnet18 model to classify a car crop into 1 out 20 car brands.
Publisher
NVIDIA
Latest Version
pruned_onnx_v1.1.0
Modified
November 27, 2024
Size
7.07 MB

VehicleMakeNet Model Card

Model Overview

VehicleMakeNet classifies car makes in images:

  • Acura
  • Audi
  • BMW
  • Chevrolet
  • Chrysler
  • Dodge
  • Ford
  • GMC
  • Honda
  • Hyundai
  • Infiniti
  • Jeep
  • Kia
  • Lexus
  • Mazda
  • Mercedes
  • Nissan
  • Subaru
  • Toyota
  • Volkswagen

This model is ready for commercial use.

References

Citations

  • He, K., Zhang, X., Ren, S., Sun, J.: Deep Residual Learning for Image Recognition. In: CVPR (2015)

Using TAO Pre-trained Models

  • Get TAO Container
  • Get other Purpose-built models from NGC model registry:
    • PeopleNet
    • TrafficCamNet
    • DashCamNet
    • FaceDetectIR
    • VehicleMakeNet
    • VehicleTypeNet

Model Architecture

Architecture Type: Convolution Neural Network (CNN)
Network Architecture: ResNet18

This is a classification model with a Resnet18 backbone.

Input:

Input Type(s): Images
Input Format(s): Red, Green, Blue (RGB)
Input Parameters: 4D
Other Properties Related to Input: RGB Resolution: 224 X 224 X 3 (W x H x C) Channel Ordering of the Input: NCHW, where N = Batch Size, C = number of channels (3), H = Height of images (224), W = Width of the images (224) Input scale: None Mean subtraction: [103.939, 116.779, 123.68] No minimum bit depth, alpha, or gamma.

Output:

Output Type(s): Label(s)
Output Format: Label: Text String(s)
Other Properties Related to Output: Category Label(s): Acura, Audi, BMW, Chevrolet, Chrysler, Dodge, Ford, GMC, Honda, Hyundai, Infiniti, Jeep, Kia, Lexus, Mazda, Mercedes, Nissan, Subaru, Toyota, and Volkswagen.

Software Integration:

Runtime Engine(s):

  • TAO 5.1
  • DeepStream 6.1 or later

Supported Hardware Architecture Compatibility:

  • Ampere
  • Jetson
  • Hopper
  • Lovelace
  • Pascal
  • Turing

Preferred Operating System(s):

  • Linux
  • Linux 4 Tegra

Model versions

  • unpruned_v1.0 - ResNet18 based pre-trained model.
  • pruned_v1.0 - ResNet18 deployment models. Contains common INT8 calibration cache for GPU and DLA.

Training

  • Data Collection Method by dataset
    • Automatic/Sensors
  • Labeling Method by dataset:
    • Human

VehicleMakeNet was trained on a proprietary dataset with more than 60K car images. The training dataset contains car crops from a mix of camera heights, camera angles, field-of view (FOV) and occlusions.

Training Data Properties

60,000 images from an internal, private dataset of cars with a mix of camera heights, camera angles, field-of view (FOV) and occlusions represented.

Performance

Evaluation Data Properties

  • Data Collection Method by dataset
    • Automatic/Sensors
  • Labeling Method by dataset:
    • Human

2000 images from an internal, private dataset of cars with a mix of camera heights, camera angles, field-of view (FOV) and occlusions represented.

Methodology and KPI

The KPI for the evaluation data are reported in the table below. Model is evaluated based on Top-1 accuracy.

Model VehicleMakeNet
Content Top1 Accuracy (in %)
Evaluation Set 91

Real-time Inference Performance

The inference is run on the provided pruned model at INT8 precision. On Jetson Nano, FP16 precision is used. The inference performance is run using trtexec on Jetson Nano, AGX Xavier, Xavier NX and NVIDIA T4 GPU. 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 slightly vary depending on other bottlenecks in the hardware and software.

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.

There are two flavors of these models:

  • unpruned
  • pruned

The unpruned model is intended for training using TAO Toolkit and the user's own dataset. This can provide high fidelity models that are adapted to the use case. The Jupyter notebook available as a part of TAO container can be used to re-train.

The pruned model is intended for efficient deployment on the edge using DeepStream SDK or TensorRT. This model accepts 224x224x3 dimension input tensors and outputs a 1x20 class confidence tensor. DeepStream provides a toolkit to create efficient video analytic pipelines to capture, decode, and pre-process the data before running inference. DeepStream provides a toolkit to attach the classification model to any primary detector. The primary detector will detect the object and crop the object before sending to secondary classifiers.

The unpruned and pruned models are encrypted and will only operate with the following key:

  • Model load key: tlt_encode

Please make sure to use this as the key for all TAO commands that require a model load key.

Instructions to use unpruned model with TAO

In order, to use this model as a pretrained weights for transfer learning, please use the below mentioned snippet as template for the model_config and traning_config component of the experiment spec file to train a Classification model. For more information on the experiment spec file, please refer to the TAO Toolkit User Guide.

  model_config {
    arch: "resnet"
    n_layers: 18
    use_bias: True
    use_batch_norm: True
    all_projections: True
    use_pooling: False
    freeze_bn: False
    freeze_blocks: 0
    freeze_blocks: 1
    input_image_size: "3,224,224"
  }

  training_config{
    train_dataset_path: "/path/to/your/train/data"
    val_dataset_path: "/path/to/your/val/data"
    pretrained_model_path: "/path/to/your/pretrained/model"
    optimizer {
      sgd {
        lr: 0.01
        decay: 0.0
        momentum: 0.9
        nesterov: False
      }
    }
    batch_size_per_gpu: 256
    n_epochs: 80
    n_workers: 16
    reg_config {
      type: "L2"
      scope: "Conv2D,Dense"
      weight_decay: 0.00005
    }
  }

Instructions to deploy these models with DeepStream

To create the entire end-to-end video analytic application, deploy this model with DeepStream SDK. DeepStream SDK is a streaming analytic toolkit to accelerate building AI-based video analytic applications. DeepStream supports direct integration of this model into the deepstream sample app.

To deploy this model with DeepStream 5.1, please follow the instructions below:

  1. Run the default deepstream-app included in the DeepStream docker, by simply executing the commands below.

      ## Download Model:
      mkdir -p $HOME/vehiclemakenet && \
      wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/vehiclemakenet/versions/pruned_v1.0/files/resnet18_vehiclemakenet_pruned.etlt \
      -O $HOME/vehiclemakenet/resnet18_vehiclemakenet_pruned.etlt && \
      wget https://api.ngc.nvidia.com/v2/models/nvidia/tao/vehiclemakenet/versions/pruned_v1.0/files/vehiclemakenet_int8.txt \
      -O $HOME/vehiclemakenet/vehiclemakenet_int8.txt
      ## Run Application
    
      xhost +
      sudo docker run --gpus all -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v $HOME:/opt/nvidia/deepstream/deepstream-5.1/samples/models/tlt_pretrained_models \
      -w /opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models nvcr.io/nvidia/deepstream:5.1-21.02-samples \
      deepstream-app -c deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt
    
  2. Install deepstream on your local host and run the deepstream-app.

To deploy this model with DeepStream, please follow the instructions below: Download and install DeepStream SDK. The installation instructions for DeepStream are provided in DeepStream development guide. The config files for the purpose-built models are located in:

/opt/nvidia/deepstream/deepstream-5.1/samples/configs/tlt_pretrained_models

/opt/nvidia/deepstream is the default DeepStream installation directory. This path will be different if you are installing in a different directory.

You will need multiple config files and 1 label file. These files are provided in the tlt_pretrained_models directory.

deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt - Main config file for DeepStream app
config_infer_primary_dashcamnet.txt - File to configure primary detection (DashCamNet)
config_infer_secondary_vehiclemakenet.txt - File to configure Vehicle make classifier
labels_dashcamnet.txt - Label file with 3 for object detection
labels_vehiclemakenet.txt - Label file with 20 classes of Vehicle make

Note: The deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt configures 3 models: DashCamNet as primary detector, and VehicleMakeNet and VehicleTypeNet as secondary classifiers. The classification models are typically used after initial object detection.

Key Parameters in config_infer_secondary_vehiclemakenet.txt

tlt-model-key
tlt-encoded-model
labelfile-path
int8-calib-file
input-dims
num-detected-classes

Run deepstream-app:

deepstream-app -c deepstream_app_source1_dashcamnet_vehiclemakenet_vehicletypenet.txt

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

Technical blogs

  • Access the latest in Vision AI development workflows with NVIDIA TAO Toolkit 5.0
  • Improve accuracy and robustness of vision ai models 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
  • TAO documentation
  • Read the TAO getting Started guide and release notes.
  • If you have any questions or feedback, please refer to the discussions on TAO Toolkit Developer Forums
  • Deploy your models for video analytics application using DeepStream. Learn more about DeepStream SDK
  • Deploy your models in Riva for ConvAI use case.

Ethical Considerations

Training and evaluation dataset mostly consists of North American content. An ideal training and evaluation dataset would additionally include content from other geographies.

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 developer to ensure that it meets the requirements for the relevant industry and use case; that the necessary instruction 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.