Open jihunoh-neubla opened 2 years ago
Background
Lossless coding
Lossy coding
DeepCABAC
Model: Yolo v3 (input size = 608x608) /inshared/Model/vision/object_detection/yolo_v3/onnx/yolov3_d53_mstrain-608_273e_coco_20210518_115020-a2c3acb8_608.onnx
Method
Measure
Encoded parameter size (MB) | Mean diff (fp32 - dequant. fp32) | Max diff (fp32 - dequant. fp32) | mAP | |
---|---|---|---|---|
original | 238 | - | - | 0.309 |
our quantization | 40 (x5.9) | 0.000806 | 0.041181 | 0.275 |
deepcabac quantization | 28 (x8.5) | 0.001353 | 11.312755 | - |
model = yolov3_d53_mstrain-608_273e_coco_optim w/ 80 classes (original ver.)
quantization & encoding | compression ratio (%) (bin/int8) | zero ratio (%) | mAP |
---|---|---|---|
fp32 | - | - | 0.309 |
uniform quant & CABAC | 65.5 | 13 | 0.304 |
deepcabac quant & CABAC | 56.7 | 19.5 | 0.304 |
detail (uniform quant & CABAC) detail (deepcabac quant & CABAC)
model = yolov3_v23_mstrain-608_273e_coco_optim w/ 6 classes (reduced ver.)
quantization & encoding | compression ratio (%) (bin/int8) | zero ratio (%) | mAP |
---|---|---|---|
fp32 | - | - | 0.435 |
uniform quant & CABAC | 62 | 10.5 | 0.431 |
deepcabac quant & CABAC | 54.5 | 18.1 | 0.432 |
detail (uniform quant & CABAC) detail (deepcabac quant & CABAC)
interv
param effect in DeepCABACinterv | 0.7 | 0.6 | 0.5 | 0.4 | 0.3 |
---|---|---|---|---|---|
compression ratio (%) | 53.6 | 54.5 | 55.6 | 56.7 | 58 |
zero ratio (%) | 19.2 | 18.1 | 16.9 | 15.7 | 14.5 |
mAP | 0.428 | 0.432 | 0.426 | 0.425 | 0.422 |
lambda
param effect in DeepCABAClambda | 0.0 | 0.001 | 0.01 | 0.1 |
---|---|---|---|---|
compression ratio (%) | 54.5 | 54.5 | 54.4 | 54.5 |
zero ratio (%) | 18.1 | 18.1 | 18.3 | 18.3 |
mAP | 0.432 | 0.432 | 0.432 | 0.407 |
@deumji-woo @neubla-minwook @wonsubkim-neubla @jong-won-lee
model = yolov3_v23_mstrain-608_273e_coco_optim w/ 6 classes (reduced ver.)
quantization & encoding | compression ratio (%) (bin/int8) | zero ratio (%) | mAP |
---|---|---|---|
fp32 | - | - | 0.435 |
(Symmetric) deepcabac quant & CABAC | 54.5 | 18.1 | 0.432 |
Asymmetric deepcabac quant & CABAC | 54.5 | 18.1 | 0.437 |
Paper: S. Wiedemann et al., "DeepCABAC: A Universal Compression Algorithm for Deep Neural Networks," IEEE Journal of selected topics in signal processing, May 2020.
Original github: https://github.com/fraunhoferhhi/DeepCABAC
Summary: A universal compression algorithm for DNNs that is based on applying Context-based Adaptive Binary Arithmetic Coder (CABAC) to the DNN parameters. DeepCABAC applies a novel quantization scheme that minimizes a rate-distortion function while simultaneously taking the impact of quantization to the DNN performance into account. For instance, it is able to compress the VGG16 ImageNet model by x63.6 with no loss of accuracy.
Purpose: To see the feasibility of this compression technique if applying to our NPU