Abstract

The Transfer Learning Toolkit for Intelligent Video Analytics Frequently Asked Questions document provides answers to common questions users might have.

Transfer Learning Toolkit Frequently Asked Questions

This document includes questions and answers to issues that you might encounter using the Transfer Learning Toolkit (TLT).

Model support

  1. What are purpose-built models? Can I deploy them in production?

    Purpose-built models are highly accurate models trained for applications in smart city, retail, healthcare and others. These are production quality models, trained on very large proprietary dataset for best accuracy and performance.

  2. Are all the models free to use and distribute?

    Yes, all models are free to use and distribute. For exact terms for purpose-built models, please read our models EULA.

  3. Do I need to re-train the purpose-built models or can I deploy them as is from NGC?

    Purpose-built models can be deployed as is using the “pruned” version from the model card but can also be re-trained to better adapt to your environment. For training use the “unpruned” version from the model card.

  4. Instead of NVIDIA provided pre-trained models, can I use TLT with my own or any open source pre-trained models?

    No third party pre-trained models are supported by TLT. Only NVIDIA pre-trained models from NGC are currently supported which can be retrained with your custom data.

  5. Is YOLOv3 supported in TLT?

    Yes, YOLOv3 is supported in TLT.

Pruning

  1. How do I determine the pruning threshold for my model?

    Threshold is set to 0.1 by default. Every threshold will result in different portions of weights to be pruned, which is reported at the end of the pruning process. A common practice is to prune with increasing threshold values, starting from 0.1 or 0.05. A larger threshold will lead to more weights/channels to be pruned, thus it is harder to restore accuracy or mAP.

  2. Is pruning performed automatically or are there hyperparameters that I need to set to prune my model?
    There are multiple parameters for pruning.
    • normalizer is to choose method to normalize weights, default is max
    • equalization_criterion is to choose method to merge weights from different branches of element wise or depth wise layers, default is union
    • pruning_granularity is to set granularity when channels are pruned
    • min_num_filters is to set minimal channels that pruning needs to retain
    • excluded_layers can be used to exclude layers from being pruned
    • pruning_threshold is the most important option. It is used to set the threshold of pruning, which is also used together with Normalizer. This threshold is common for all layers.

Model Export and Deployment

  1. What is the model output format? How can I use this model for deployment?
    TLT can generate 2 output formats, etlt and TensorRT engine file.
  2. What is the model export key and why is it required?

    Model export key is used to encrypt the trained keras/uff model files to tlt/etlt to protect your proprietary IP and use the model export key to decrypt the etlt model in DeepStream applications.

  3. How do I deploy models trained with TLT to DeepStream?

    Please see https://docs.nvidia.com/metropolis/TLT/tlt-getting-started-guide/index.html#deepstream_deployment and https://github.com/NVIDIA-AI-IOT/deepstream_tlt_apps.

  4. Will this model only work with DeepStream? Can I deploy the model without DeepStream?

    Deployment to DeepStream is the recommended path for TLT models. Note that the models can also be deployed outside of DeepStream using TensorRT but users will need to do image pre-processing and post-process the output Tensor after inference.

  5. Is it possible to export a custom trained .tlt (or.etlt) model to a conventional TensorFlow(TF) frozen inference graph (.pb) to make inferences with traditional TF tools?

    No, this is currently not supported.

Training

  1. Is there a dependency of batch size on the accuracy of the model? How should I choose the appropriate batch size for my training?

    As a common practice, a small batch size or single GPU is preferred for a small dataset; while a large batch size or multiple GPUs is preferred for a large dataset.

  2. I am seeing lower accuracy with multi-GPU vs. single GPU. Can multi-GPU training affect the accuracy of the model? How do I improve the accuracy in multi-GPU training?

    To improve the accuracy in a multi-gpu environment, learning rate parameters need to be higher, for example max_learning_rate. Multi-gpu is preferred only when the training dataset is large.

  3. Distribute the dataset class: How do I balance the weight between classes if the dataset has significantly higher samples for one class versus another?

    To account for imbalance, increase the class_weight for classes with fewer samples. You can also try disabling enable_autoweighting; in this case initial_weight is used to control cov/regression weighting. It is important to keep the number of samples of different classes balanced, which helps improve mAP.

  4. How do I save checkpoints in TLT?

    The tlt-train command for every DNN, supports saving checkpoints by default. By default, checkpoints are saved for every 10th epoch. For DetectNet_v2, the interval at which this checkpoint may be saved is configured using the checkpoint_interval parameter in the training_config section of a DetectNet_v2 training configuration file.

  5. In DetectNet_V2, are there any parameters that can help improve AP (average precision) on training small objects?

    Following parameters can help you improve AP on smaller objects:

    • Increase num_layers of resnet
    • class_weight for small objects
    • Increase the coverage_radius_x and coverage_radius_y parameters of the bbox_rasterizer_config section for the small objects class
    • Decrease minimum_detection_ground_truth_overlap
    • Lower minimum_height to cover more small objects for evaluation.

Notices

Notice

THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.

THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.

NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.

Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.

Trademarks

NVIDIA, the NVIDIA logo, and cuBLAS, CUDA, cuDNN, cuFFT, cuSPARSE, DIGITS, DGX, DGX-1, DGX Station, GRID, Jetson, Kepler, NVIDIA GPU Cloud, Maxwell, NCCL, NVLink, Pascal, Tegra, TensorRT, Tesla and Volta are trademarks and/or registered trademarks of NVIDIA Corporation in the United States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.