深度学习TensorFlow:Object_Detection_API图像视频物体识别API在Windows7上的配置

详细教程请参考:

http://blog.csdn.net/xiaoxiao123jun/article/details/76605928

http://blog.csdn.net/xinyu3307/article/details/77104388

我配置用protoc-3.5.1-win32.zip,出现了一个问题:

protoc object_detection/protos/*.proto --python_out=.

出现了 no such file or directory的问题

解决方案:

在models\research目录下,一个一个跑,不用*做匹配

protoc object_detection/protos/anchor_generator.proto  --python_out=. --proto_path=.        
protoc object_detection/protos/bipartite_matcher.proto  --python_out=. --proto_path=.        
protoc object_detection/protos/box_predictor.proto  --python_out=. --proto_path=.              
protoc object_detection/protos/faster_rcnn.proto  --python_out=. --proto_path=.                  
protoc object_detection/protos/grid_anchor_generator.proto  --python_out=. --proto_path=. 
protoc object_detection/protos/image_resizer.proto  --python_out=. --proto_path=.              
protoc object_detection/protos/keypoint_box_coder.proto  --python_out=. --proto_path=.     
protoc object_detection/protos/matcher.proto  --python_out=. --proto_path=.                       
protoc object_detection/protos/model.proto  --python_out=. --proto_path=.                          
protoc object_detection/protos/optimizer.proto  --python_out=. --proto_path=.                     
protoc object_detection/protos/post_processing.proto  --python_out=. --proto_path=.           
protoc object_detection/protos/square_box_coder.proto  --python_out=. --proto_path=.
protoc object_detection/protos/ssd.proto  --python_out=. --proto_path=.                            
protoc object_detection/protos/string_int_label_map.proto  --python_out=. --proto_path=.           
protoc object_detection/protos/region_similarity_calculator.proto  --python_out=. --proto_path=. 
protoc object_detection/protos/ssd_anchor_generator.proto  --python_out=. --proto_path=.
protoc object_detection/protos/argmax_matcher.proto  --python_out=. --proto_path=.
protoc object_detection/protos/box_coder.proto  --python_out=. --proto_path=.
protoc object_detection/protos/eval.proto  --python_out=. --proto_path=.
protoc object_detection/protos/faster_rcnn_box_coder.proto  --python_out=. --proto_path=.
protoc object_detection/protos/hyperparams.proto  --python_out=. --proto_path=.
protoc object_detection/protos/input_reader.proto  --python_out=. --proto_path=.
protoc object_detection/protos/losses.proto  --python_out=. --proto_path=.
protoc object_detection/protos/mean_stddev_box_coder.proto  --python_out=. --proto_path=.
protoc object_detection/protos/multiscale_anchor_generator.proto  --python_out=. --proto_path=.
protoc object_detection/protos/pipeline.proto  --python_out=. --proto_path=.
protoc object_detection/protos/preprocessor.proto  --python_out=. --proto_path=.
protoc object_detection/protos/train.proto  --python_out=. --proto_path=.

name 'load_image_into_numpy_array' is not defined

priya-dwivedi代码这里获取相关代码。

def load_image_into_numpy_array(image):
  (im_width, im_height) = image.size
  return np.array(image.getdata()).reshape(
      (im_height, im_width, 3)).astype(np.uint8)

NameError: name 'detection_graph' is not defined
原代码需要下载model,实际上无法下载。删除相关下载代码即可。


下载资源:

https://download.csdn.net/download/llrraa2010/10258001

用到的tutorial

https://download.csdn.net/download/llrraa2010/10257999

用到的model



猜你喜欢

转载自blog.csdn.net/llrraa2010/article/details/79361291
今日推荐