Tensorflow .tflite模型每次初始化相同的检测框

Tensorflow .tflite模型每次初始化相同的检测框,tensorflow,machine-learning,computer-vision,google-coral,Tensorflow,Machine Learning,Computer Vision,Google Coral,我正在尝试将一个经过培训的从头开始的模型安装到一个连接到谷歌开发板的USB网络摄像头上。我把训练时间缩短到15公里。该模型在15k时还没有完全收敛,但我想了解如何冻结图形、tflite并将其移动到google coral开发板上。我意识到这在准确性方面可能是个问题。MobileNetv2 下面是一个天花板和一张桌子。无论摄像机在看什么,每次检测框都会出现在完全相同的位置。当相机移动时,框不会移动,百分比也不会改变 列车模型 python train.py --logtostderr --trai

我正在尝试将一个经过培训的从头开始的模型安装到一个连接到谷歌开发板的USB网络摄像头上。我把训练时间缩短到15公里。该模型在15k时还没有完全收敛,但我想了解如何冻结图形、tflite并将其移动到google coral开发板上。我意识到这在准确性方面可能是个问题。MobileNetv2

下面是一个天花板和一张桌子。无论摄像机在看什么,每次检测框都会出现在完全相同的位置。当相机移动时,框不会移动,百分比也不会改变

列车模型

python train.py --logtostderr --train_dir=training --pipeline_config_path=training/ssd_mobilenet_v1_coco.config
冻结模型

python export_tflite_ssd_graph.py --pipeline_config_path=training/ssd_mobilenet_v2_coco.config --trained_checkpoint_prefix=training/model.ckpt-9070 --output_directory=inference_graph --add_postprocessing_op=true 
量化

tflite_convert --graph_def_file=inference_graph/tflite_graph.pb --output_file=inference_graph/detect.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 --mean_values=128 --std_dev_values=127 --allow_custom_ops --default_ranges_min=0 --default_ranges_max=6
该模型在google coral开发板上运行如下:

export DISPLAY=:0 && edgetpu_detect \
--source /dev/video1:YUY2:1280x720:20/1  \
--model ${DEMO_FILES}/converted_tflite_quant_model.tflite
google coral预装了一个面部识别模型(见下图)。唯一的区别是模型。下面的命令可以完美地在屏幕上跟踪我的脸。上面的命令将生成下面的照片

export DISPLAY=:0 && edgetpu_detect \
--source /dev/video1:YUY2:1280x720:20/1  \
--model ${DEMO_FILES}/mobilenet_ssd_v2_face_quant_postprocess_edgetpu.tflite
这里可能出了什么问题

编辑,几个月后,我用mobilenet_v1对它进行了重新训练,得到了完全相同的结果


嗯,我想知道源摄像机是否也有问题? 是否可以再次检查像素格式、大小和FPS值是否正确? 另外,在您发布的两个图像上,进程似乎正在加载您的
转换的\u tflite\u quant\u模型。tflite
模型,您确定您尝试了其他模型吗? 您能够以正确的结果运行演示吗?

摄像头似乎很好,v4l2 ctl--列表格式ext--设备/dev/video1输出正确