Part Number:TDA4VM
环境:使用pytorch1.5训练YOLO检测模型,使用SDK7.3版本进行量化
量化脚本:
modelType = 2
numParamBits = 8
numFeatureBits = 8
quantizationStyle = 2
inputNetFile = "/root/model/zhurh_yolo/yolo_540/20211011/export_yolox_540_TDA.onnx"
outputNetFile = "/root/model/zhurh_yolo/out/tidl_net.bin"
outputParamsFile = "/root/model/zhurh_yolo/out/tidl_io_"
inDataNorm = 1
inMean = 128 128 128
inScale = 0.0078125 0.0078125 0.0078125
inDataFormat = 0
inWidth = 960
inHeight = 540
inNumChannels = 3
metaArchType = 4
numFrames = 2
metaLayersNamesList = "/root/model/zhurh_yolo/yolo_540/yolo.prototxt"
inData = "/root/model/zhurh/dra_image_list.txt"
postProcType = 2
perfSimConfig = ../../test/testvecs/config/import/perfsim_base.cfg
问题描述:
(numParamBits=8,numFeatureBits=8),其目标框目标框偏小偏大情况,即会出现异常。
曾经改进实验:若YOLO检测模型使用全16bit可以改善,尝试使用混合量化但并没有解决此问题。使用8bit量化此模型如何解决此问题?若使用混合精度改善效果或优化?
8bit 量化结果
16bit 量化结果
Shine:
请参考下面的帖子。https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1006538/tidl-quantization-about-numparambits-and-numfeaturebitshttps://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/08_00_00_12/exports/docs/tidl_j7_08_00_00_10/ti_dl/docs/user_guide_html/md_tidl_fsg_steps_to_debug_mismatch.html