NeublaCorp / DeepCABAC

0 stars 2 forks source link

DeepCABAC #1

Open jihunoh-neubla opened 2 years ago

jihunoh-neubla commented 2 years ago
jihunoh-neubla commented 2 years ago

Compression Algorithm

Background

image image

jihunoh-neubla commented 2 years ago

Compression Performance

  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 -
deumji-woo commented 2 years ago

Compression ratio result

  1. Compression method
    • Didn't use DeepCABAC quantization.
    • Only use their "coder" part.
    • our quantization + "coder" of DeepCABAC
  2. channel-wise symmetric quantization
    • model: /neublan-shared/Model/vision/object_detection/yolo_v3/onnx/yolov3_d53_mstrain-608_273e_coco_20210518_115020-a2c3acb8_608.q8_cwq_exc_concat_mul_add193+.onnx
    • compression ratio : 87%

      detail result

  3. layer-wise asymmetric quantization
    • model: /neublan-shared/Model/vision/object_detection/yolo_v3/onnx/yolov3_d53_mstrain-608_273e_coco_20210518_115020-a2c3acb8_608.q8_lwq_exc_concat_mul_add193+.onnx
    • compression ratio : 68%

      detail result

jihunoh-neubla commented 2 years ago

DeepCABAC

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)

Experiment of interv param effect in DeepCABAC

interv 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

Experiment of lambda param effect in DeepCABAC

lambda 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

jihunoh-neubla commented 2 years ago

Asymmetric DeepCABAC quantization

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