TensorFlow.ZC尝试
1、资料:
https://github.com/protocolbuffers/protobuf/releases
https://pythonprogramming.net/introduction-use-tensorflow-object-detection-api-tutorial/
2、教程中的命令:“"C:/Program Files/protoc/bin/protoc" object_detection/protos/*.proto --python_out=.”,做到这里的时候,我的命令始终不对,查了一些资料才弄对...
资料:度娘搜索:“File does not reside within any path specified using --proto_path (or -I).”
File does not reside within any path specified ... - 简书.html(https://www.jianshu.com/p/42a480a45cd6)
protocol buffers - protobuf_ .proto file not under source directory - Stack Overflow.html(https://stackoverflow.com/questions/47861543/protobuf-proto-file-not-under-source-directory)
2.1、尝试到如下的命令时才算 OK...:
protoc "object_detection/protos/anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include"
protoc "object_detection/protos/anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include"
ZC:但是 发现,不能用 类似"*.proto"的用法,需要 所有文件一个一个的执行该命令:(31个文件 对应 31条命令)
protoc "object_detection/protos/anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/argmax_matcher.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/bipartite_matcher.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/box_coder.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/box_predictor.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/calibration.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/eval.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/faster_rcnn.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/faster_rcnn_box_coder.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/flexible_grid_anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/graph_rewriter.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/grid_anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/hyperparams.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/image_resizer.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/input_reader.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/keypoint_box_coder.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/losses.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/matcher.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/mean_stddev_box_coder.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/model.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/multiscale_anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/optimizer.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/pipeline.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/post_processing.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/preprocessor.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/region_similarity_calculator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/square_box_coder.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/ssd.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/ssd_anchor_generator.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/string_int_label_map.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include" protoc "object_detection/protos/train.proto" --python_out="G:/Tensorflow/models_copy/research/python_out_z" --proto_path="G:/Tensorflow/models_copy/research/" -I="G:\Tensorflow\protoc\protoc-3.9.0-win64\include"
3、
4、
5、
6、
7、
8、
9、Win7配置和运行TensorFlow_Object_Detection_API步骤 - 殊彦的采坑记录 - CSDN博客.html(https://blog.csdn.net/qq_29075459/article/details/78562581)
Windows安装Tensorflow步骤 - 殊彦的采坑记录 - CSDN博客.html(https://blog.csdn.net/qq_29075459/article/details/78537532)
10、Windows下用pip安装CPU版TensorFlow - haibinwan1024的博客 - CSDN博客.html(https://blog.csdn.net/haibinwan1024/article/details/83188058)
ZC:这里 提到 官方文档 的链接
Tensorflow object_detection API 目标检测环境搭建 - zhaoyoulin2016的博客 - CSDN博客.html(https://blog.csdn.net/zhaoyoulin2016/article/details/80615687)
ZC:这里提到 中文社区的 链接 (ZC:但是 貌似没有Windows的教程...)
11、ZC:遇到的 tensorflow_tensorboard版本太高的问题,我的处理方式是 使用命令“pip uninstall tensorflow-tensorboard”和“pip uninstall tensorboard”将它们都卸载掉,然后再用命令 “pip uninstall tensorflow-tensorboard”来安装 tensorflow需要的tensorboard...
12、
13、20190722 SHH Win7x64成功
同样的 python3.7.4,基本都是一样的设置...
(1)下面的命令是CMD在路径"G:\TensorFlow_ZZ\models_copy\research"中执行的(我是用的 管理员的CMD)
ZC:经测试 bat中 默认一行就是 一条命令,∴可以将下面的 31个转换语句放到一个bat文件中 来执行
protoc "object_detection/protos/anchor_generator.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/argmax_matcher.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/bipartite_matcher.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/box_coder.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/box_predictor.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/calibration.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/eval.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/faster_rcnn.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/faster_rcnn_box_coder.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/flexible_grid_anchor_generator.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/graph_rewriter.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/grid_anchor_generator.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/hyperparams.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/image_resizer.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/input_reader.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/keypoint_box_coder.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/losses.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/matcher.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/mean_stddev_box_coder.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/model.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/multiscale_anchor_generator.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/optimizer.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/pipeline.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/post_processing.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/preprocessor.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/region_similarity_calculator.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/square_box_coder.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/ssd.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/ssd_anchor_generator.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/string_int_label_map.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" protoc "object_detection/protos/train.proto" --python_out="." --proto_path="G:/Tensorflow_ZZ/models_copy/research/" -I="G:/Tensorflow_ZZ/protoc-3.9.0-win64/include" ZC: 生成的文件 位于"G:\TensorFlow_ZZ\models_copy\research\object_detection\protos\"下,????__pb2.py
(2)在下载 ssd_mobilenet_v1_coco_2017_11_17.tar.gz 时卡住了,手动下载的,然后放在 文件夹"G:\TensorFlow_ZZ\models_copy\research\object_detection"中(此时 发现 代码"object_detection_tutorial.ipynb"下载的该文件就是在此路径的 但是下载不完全[下载很慢])
(3)资料
A、tensorflow开源Tensorflow Object Detection API安装运行测试 - HMW的博客 - CSDN博客.html(https://blog.csdn.net/weixin_35654926/article/details/75452450)
ZC:这是在找 为什么下载会 timeout的原因时找到的文章,里面 也有 如何修改代码的部分(主要就是 注释掉“opener.retrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE)”)
B、Win10 tensorflow object_detection api 安装中 无法显示图像的问题解决 - weixin_43345331的博客 - CSDN博客.html(https://blog.csdn.net/weixin_43345331/article/details/87924551)
ZC:这是我的 object_detection_tutorial.ipynb 运行之后 没有图片显示出来,找到的这文章,里面有一些处理方式,也有迂回的 不显示图片 而是改成 保存图片的方式...
14、
15、