This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: YOLO量化检测框出现异常

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 量化结果