TAO Toolkit Integration with DeepStream ============================================================= NVIDIA `TAO toolkit `_ is a simple, easy-to-use training toolkit that requires minimal coding to create vision AI models using the user's own data. Using TAO toolkit, users can transfer learn from NVIDIA pre-trained models to create their own model. Users can add new classes to an existing pre-trained model, or they can re-train the model to adapt to their use case. Users can use model pruning capability to reduce the overall size of the model. Pre-trained models ~~~~~~~~~~~~~~~~~~~~ There are 2 types of pre-trained models that users can start with - purpose-built pre-trained models and meta-architecture vision models. Purpose-built pre-trained models are highly accurate models that are trained on millions of objects for a specific task. The pre-trained weights for meta-architecture vision models merely act as a starting point to build more complex models. These pre-trained weights are trained on Open image dataset and they provide a much better starting point for training versus starting from scratch or starting from random weights. With the latter choice, users can choose from 100+ permutations of model architecture and backbone. See the illustration below. .. image:: /content/tlt_models2_updated.png :align: center :alt: TAO toolkit Pretrained Models The purpose-built models are built for high accuracy and performance. These models can be deployed out of the box for applications in smart city or smart places or can also be used to re-train with user’s own data. All models are trained on millions of objects and can achieve more than very high accuracy on our test data. More information about each of these models is available in `Purpose-built models `_ chapter of TAO toolkit documentation – Purpose built models or in the individual model cards. Typical use cases and some model KPIs are provided in the table below. `PeopleNet `_ can be used for detecting and counting people in smart buildings, retail, hospitals, etc. For smart traffic applications, `TrafficCamNet `_ and `DashCamNet `_ can be used to detect and track vehicles on the road. .. csv-table:: TAO toolkit pretrained models - use cases :file: ../text/tables/DS_TLT_pretrained_models.csv :widths: 20, 20, 15, 15, 30 :header-rows: 1 Most models trained with TAO toolkit are natively integrated for inference with DeepStream. If the model is integrated, it is supported by the reference ``deepstream-app``. If the model is not natively integrated in the SDK, you can find a reference application on the GitHub repo. See the table below for information on the models supported. For models integrated into ``deepstream-app``, we have provided sample config files for each of the networks. The sample config files are available in the ``samples/configs/tao_pretrained_models`` folder. The table below also lists config files for each model. .. note:: Refer README in package ``/opt/nvidia/deepstream/deepstream/samples/configs/tao_pretrained_models/README.md`` to obtain TAO toolkit config files and models mentioned in following table. The TAO toolkit pre-trained models table shows the deployment information of purpose-built pre-trained models. .. csv-table:: TAO toolkit pre-trained models in DeepStream :file: ../text/tables/TLT_ptm_config.csv :widths: 20, 20, 50, 10 :header-rows: 1 | The TAO toolkit model arch table shows the deployment information of the open model architecture models from TAO toolkit. .. csv-table:: TAO Toolkit 2.0 model architecture in DeepStream :file: ../text/tables/TLT_2_model_arch.csv :widths: 20, 20, 20, 30, 20 :header-rows: 1 .. note:: 1. For Yolov3/ReinaNet/SSD/DSSD/FasterRCNN: ``cd $DS_TOP/samples/configs/tao_pretrained_models/`` then edit ``deepstream_app_source1_detection_models.txt``, let config-file under primary-gie section point to the model config files you want, then run ``deepstream-app -c deepstream_app_source1_detection_models.txt`` 2. For MaskRCNN: ``deepstream-app -c deepstream_app_source1_mrcnn.txt`` .. csv-table:: TAO toolkit 3.0 model architecture in DeepStream :file: ../text/tables/TLT_3_model_arch.csv :widths: 20, 20, 20, 30, 20 :header-rows: 1 .. note:: Learn more about running the tao3.0 models here: https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps/tree/release/tao3.0 Except for UNET and License plate recognition (LPR), all models can be deployed in native ``etlt`` format. ``etlt`` is the TAO export format. For UNET and LPR model, you will need to convert the ``etlt`` file to TensorRT engine before running with DeepStream. Use ``tao-converter`` to converter ``etlt`` to TensorRT engine. ``tao-converter`` are very hardware specific, see table below for the appropriate version for your hardware. .. csv-table:: TAO converter :file: ../text/tables/DS_tlt_converter.csv :widths: 30, 30, 40 :header-rows: 1 For more information about TAO and how to deploy TAO models with DeepStream, refer to `Integrating TAO Models into DeepStream `_ chapter of `TAO toolkit user guide `_. For more information about deployment of architecture specific models, refer to https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps and https://github.com/NVIDIA-AI-IOT/deepstream_lpr_app GitHub repo.