量化后Tensorflow目标检测的精度下降

量化后Tensorflow目标检测的精度下降,tensorflow,tensorflow-lite,quantization,Tensorflow,Tensorflow Lite,Quantization,我正在为自定义数据集微调SSD Mobilenet v2。我正在为50k步数微调模型,并在48k步数时开始量化感知训练 graph_rewriter { quantization { delay: 48000 weight_bits: 8 activation_bits: 8 } } 我正在观察95%以上的培训、验证和测试mAP后培训 使用命令量化后 python object_detection/export_tflite_ssd_graph.py --pi

我正在为自定义数据集微调SSD Mobilenet v2。我正在为50k步数微调模型,并在48k步数时开始量化感知训练

graph_rewriter {
  quantization {
    delay: 48000
    weight_bits: 8
    activation_bits: 8
  }
}
我正在观察95%以上的培训、验证和测试mAP后培训

使用命令量化后

python object_detection/export_tflite_ssd_graph.py 
--pipeline_config_path=${CONFIG_FILE} 
--trained_checkpoint_prefix=${CHECKPOINT_PATH} 
--output_directory=${OUTPUT_DIR} --add_postprocessing_op=true

./bazel-bin/tensorflow/contrib/lite/toco/toco 
 --input_file=${OUTPUT_DIR}/tflite_graph.pb \
 --output_file=${OUTPUT_DIR}/detect.tflite \
 --input_format=TENSORFLOW_GRAPHDEF \
 --output_format=TFLITE \
 --inference_type=QUANTIZED_UINT8 \
 --input_shapes="1,300,300,3" \
 --input_arrays=normalized_input_image_tensor \
 --output_arrays="TFLite_Detection_PostProcess","TFLite_Detection_PostProcess:1","TFLite_Detection_PostProcess:2","TFLite_Detection_PostProcess:3" \
 --std_values=128.0 --mean_values=128.0 --allow_custom_ops --default_ranges_min=0 --default_ranges_max=6
我使用相同的测试集测试了生成的detect.tflite模型。我看到mAP下降到85%左右


这是地图号码下降的预期结果吗?如何改进后量化贴图

您是否能够确保以相同的方式预处理输入图像?我们已经看到地图受到了影响。我们还没有看到SSD MobileNet V2量化模型的准确度有如此大的下降。@achowdhery我正在使用现成的Tensorflow Lite Android对象检测应用程序,用于新类、重新训练的模型的度量。我记得预处理步骤是一样的。请告诉我你想让我核实的任何具体情况。