Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 2.72 KB

DeepLabV3.md

File metadata and controls

68 lines (52 loc) · 2.72 KB

Pytorch DeepLabV3+ (Semantic Segmentation)

Environment Setup

Setup AI Model Efficiency Toolkit (AIMET)

Please install and setup AIMET before proceeding further. This model was tested with the torch_gpu variant of AIMET 1.23.

Install dependencies

   python -m pip install pycocotools

Append the repo location to your PYTHONPATH with the following:

export PYTHONPATH=$PYTHONPATH:<path to parent of aimet_model_zoo>

Dataset

The Pascal Dataset can be downloaded from here:


Usage

To run evaluation with QuantSim in AIMET, use the following

python3  aimet_zoo_torch/deeplabv3/evaluators/deeplabv3_quanteval.py \
                --model-config <configuration to be tested> \
                --dataset-path <path to the downloaded Pascal dataset, should end in VOCdevkit/VOC2012> \
                --batch-size  <batch size as an integer value, defaults to 8> \

Available model configurations are:

  • dlv3_w4a8
  • dlv3_w8a8

Model checkpoint and configuration


Quantization Configuration

W8A8 Quantization | The following configuration has been used:

  • Weight quantization: 8 bits, per tensor symmetric quantization
  • Bias parameters are not quantized
  • Activation quantization: 8 bits, asymmetric quantization
  • Model inputs are quantized
  • TF-Enhanced was used as quantization scheme
  • Cross layer equalization and Adaround has been applied on optimized checkpoint
  • Data Free Quantization has been performed on the optimized checkpoint

W4A8 Quantization | The following configuration has been used:

  • Weight quantization: 4 bits, per channel symmetric quantization
  • Bias parameters are not quantized
  • Activation quantization: 8 bits, asymmetric quantization
  • Model inputs are quantized
  • TF-Enhanced was used as quantization scheme
  • Cross layer equalization and Adaround has been applied on optimized checkpoint
  • Data Free Quantization has been performed on the optimized checkpoint
  • Quantization Aware Traning has been performed on the optimized checkpoint