tf之object detect安装测试

来源:互联网 发布:北京柒柒网络团队骗 编辑:程序博客网 时间:2024/05/29 16:25
Tensorflow Object Detection API depends on the following libraries:Protobuf 2.6Pillow 1.0lxmltf Slim (which is included in the "tensorflow/models" checkout)Jupyter notebookMatplotlibTensorflow安装:[step1]# For CPUpip install tensorflow# For GPUpip install tensorflow-gpu[step2]sudo apt-get install protobuf-compiler python-pil python-lxmlsudo pip install jupytersudo pip install matplotliborsudo pip install pillowsudo pip install lxmlsudo pip install jupytersudo pip install matplotlib[step3]# From tensorflow/models/protoc object_detection/protos/*.proto --python_out=.出错按照下面解决办法[step4]# From tensorflow/models/export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim[step5]python object_detection/builders/model_builder_test.py问题:When I use the commond " protoc object_detection/protos/*.proto --python_out=.",The output:object_detection/protos/anchor_generator.proto:11:3: Expected "required", "optio nal", or "repeated".object_detection/protos/anchor_generator.proto:11:32: Missing field number.解决:wget https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip下载比较慢也可以这里下载:https://www.witsrc.com/downloadchenqy@ubuntu:~/tf36/protoc_3.3$lsprotoc-3.3.0-linux-x86_64.zip chenqy@ubuntu:~/tf36/protoc_3.3$ unzip protoc-3.3.0-linux-x86_64.zip Archive:  protoc-3.3.0-linux-x86_64.zip   creating: include/   creating: include/google/   creating: include/google/protobuf/  inflating: include/google/protobuf/any.proto    inflating: include/google/protobuf/api.proto     creating: include/google/protobuf/compiler/  inflating: include/google/protobuf/compiler/plugin.proto    inflating: include/google/protobuf/descriptor.proto    inflating: include/google/protobuf/duration.proto    inflating: include/google/protobuf/empty.proto    inflating: include/google/protobuf/field_mask.proto    inflating: include/google/protobuf/source_context.proto    inflating: include/google/protobuf/struct.proto    inflating: include/google/protobuf/timestamp.proto    inflating: include/google/protobuf/type.proto    inflating: include/google/protobuf/wrappers.proto     creating: bin/  inflating: bin/protoc                inflating: readme.txt              chenqy@ubuntu:~/tf36/protoc_3.3$ lsbin  include  protoc-3.3.0-linux-x86_64.zip  readme.txtchenqy@ubuntu:~/tf36/protoc_3.3$ cd bin/chenqy@ubuntu:~/tf36/protoc_3.3/bin$ pwd/home/chenqy/tf36/protoc_3.3/binchenqy@ubuntu:~/tf36/protoc_3.3/bin$ cd ../../models/chenqy@ubuntu:~/tf36/models$ /home/chenqy/tf36/protoc_3.3/bin/protoc object_detection/protos/*.proto --python_out=.chenqy@ubuntu:~/tf36/models$ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slimchenqy@ubuntu:~/tf36/models$ python object_detection/builders/model_builder_test.py.......----------------------------------------------------------------------Ran 7 tests in 0.047sOKchenqy@ubuntu:~/tf36/models$chenqy@ubuntu:~/tf36/models$相关模型:I think you are using ssd_mobilenet_v1_coco_11_06_2017 model for testing the results. Try using other models:MODEL_NAME = 'ssd_mobilenet_v1_coco_11_06_2017'MODEL_NAME = 'ssd_inception_v2_coco_11_06_2017'MODEL_NAME = 'rfcn_resnet101_coco_11_06_2017' MODEL_NAME = 'faster_rcnn_resnet101_coco_11_06_2017'MODEL_NAME = 'faster_rcnn_inception_resnet_v2_atrous_coco_11_06_2017'faster_rcnn_inception_resnet_v2_atrous_coco_11_06_2017 will give you the same result as shown in tutorial.


显示:



原创粉丝点击