aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md13
-rw-r--r--docs/det_quantization.md8
2 files changed, 14 insertions, 7 deletions
diff --git a/README.md b/README.md
index 7500b82..19bf3c5 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,13 @@ This repository is an extension of the popular [mmdetection](https://github.com/
4 4
5Kindly take time to read through the documentation of the original [mmdetection](https://github.com/open-mmlab/mmdetection) before attempting to use this repository. 5Kindly take time to read through the documentation of the original [mmdetection](https://github.com/open-mmlab/mmdetection) before attempting to use this repository.
6 6
7Also, please read the documentation at our landing page [jacinto-ai-devkit](https://github.com/TexasInstruments/jacinto-ai-devkit) before using this repository. 7Also, please read the documentation at our landing page [jacinto-ai-devkit](https://github.com/TexasInstruments/jacinto-ai-devkit) before using this repository. Please also read the documentation of [pytorch-jacinto-ai-devkit](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about) and its **[quantization documentation](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about/docs/Quantization.md)** for **guidelines** on how to get best accuracy with quantization.
8 8
9The models trained with this repository can be inferred using [TI Deep Learning Library (TIDL)](https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/psdk_rtos_auto/docs/user_guide/sdk_components.html#ti-deep-learning-library-tidl) that is part of the [Processor SDK RTOS for Jacinto7](https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/psdk_rtos_auto/docs/user_guide/index.html). TIDL natively supports Post Training Quantization (PTQ) to quantize these models.
10
11However, in case there is more than expected accuracy degradation with PTQ even after making sure that the guidelines are followed, this repository provides instructions and functionality required to do Quantization Aware Training (QAT).
12
13This repository also provides a description of trained models with their accuracy and complexity. Recommendations on models friendly for embedded inference with quantization are also provided.
9 14
10## Installation 15## Installation
11 16
@@ -26,14 +31,14 @@ Please see [Getting Started with MMDetection](https://github.com/open-mmlab/mmde
26Please see [Usage](./docs/det_usage.md) for training and testing with this repository. 31Please see [Usage](./docs/det_usage.md) for training and testing with this repository.
27 32
28 33
29## Benchmark and Model Zoo 34## Object Detection Model Zoo
30 35
31Accuracy report of several trained models is available at the [Detection Model Zoo](./docs/det_modelzoo.md) 36Complexity and Accuracy report of several trained models is available at the [Detection Model Zoo](./docs/det_modelzoo.md)
32 37
33 38
34## Quantization 39## Quantization
35 40
36This tutorial explains how to do [Quantization Aware Training (QAT)](./docs/det_quantization.md) of detection models. 41This tutorial explains more about quantization and how to do [Quantization Aware Training (QAT)](./docs/det_quantization.md) of detection models.
37 42
38 43
39## ONNX & Prototxt Export 44## ONNX & Prototxt Export
diff --git a/docs/det_quantization.md b/docs/det_quantization.md
index ec4148e..2fe4a55 100644
--- a/docs/det_quantization.md
+++ b/docs/det_quantization.md
@@ -1,10 +1,12 @@
1# Quantization Aware Training of Object Detection Models 1# Quantization Aware Training of Object Detection Models
2 2
3Quantization (especially 8-bit Quantization) is important to get best throughput for inference. Quantization can be done using either **Post Training Quantization (PTQ)** or **Quantization Aware Training (QAT)**. 3Quantization (especially 8-bit Quantization) is important to get best throughput for inference. Quantization can be done using either **Post Training Quantization (PTQ)** or **Quantization Aware Training (QAT)**. TIDL natively supports PTQ to quantize floating point models.
4 4
5Quantized inference can be done using [TI Deep Learning Library (TIDL)](https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/psdk_rtos_auto/docs/user_guide/sdk_components.html#ti-deep-learning-library-tidl) that is part of the [Processor SDK RTOS for Jacinto7](https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/psdk_rtos_auto/docs/user_guide/index.html). **TIDL natively supports PTQ**. There is no need for QAT as long as the PTQ in TIDL gives good results. 5The guidelines provided in the **[quantization documentation](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about/docs/Quantization.md)** are important to get best accuracy with quantization. This repository also suggests quantization friendly models in the "Object Detection Model Zoo" page. It is unlikely that there will be quantization accuracy issues with PTQ if you use the recommended models.
6 6
7For the models that have significant accuracy drop, it is possible to improve the accuracy using **Quantization Aware Training (QAT)**. Please read more about QAT at [pytorch-jacinto-ai-devkit](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about) and its **[quantization documentation](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about/docs/Quantization.md)**. Although the repository does QAT, the data is still kept as discrete floating point values. Activation range information is inserted into the model using Clip functions, wherever appropriate. There are several guidelines provided there to help you set the right parameters to get best accuracy with quantization. 7However, in case there is significant accuracy drop, it is possible to improve the accuracy using QAT. Please read more about QAT at [pytorch-jacinto-ai-devkit](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about) and its [quantization documentation](https://git.ti.com/cgit/jacinto-ai/pytorch-jacinto-ai-devkit/about/docs/Quantization.md).
8
9Although the repository does QAT, the quantized weights are still kept as discrete floating point values. Activation range information is inserted into the model using Clip functions, wherever appropriate. TIDL will convert these QAT models to fixed point using these ranges and the discrete weights.
8 10
9 11
10## Features in this repository 12## Features in this repository