OpenCV调用TensorFlow的目标检测

python PATH\tf_text_graph_ssd.py 
--input path\frozen_inference_graph.pb 
--config path\pipeline.config
--output path\ssd_inception_v2.pbtxt

OpenCV调用TensorFlow的目标检测_第1张图片

 

运行以上脚本会生成网络的结构.pbtxt

OpenCV调用TensorFlow的目标检测_第2张图片

 生成的文件为网路结构

python .\object_detection.py 
--input .\model\timg.jpg 
--model .\model\frozen_inference_graph.pb 
--config .\model\ssd_inception_v2_graph.pbtxt 
--height 300 
--width 300 
--classes .\model\mscoco.txt

 

python PATH\tf_text_graph_faster_rcnn.py 
--input .\frozen_inference_graph.pb
--config .\pipeline.config
--output .\faster_rcnn_inception_resnet_v2_atrous.pbtxt

 

 

你可能感兴趣的:(OpenCV调用TensorFlow的目标检测)