日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

python object_detection/protos/*.proto

系統 2010 0

?在使用TensorFlow的object_detection模塊問題記錄:

  • 配置:window10
  • tensorflow-gpu
  • protoc3.8版本下載地址:https://github.com/protocolbuffers/protobuf/releases

1. ?ImportError: No module named 'object_detection' 問題:

①將自己下載的models-master模塊添加進去系統環境變量

python object_detection/protos/*.proto: No such file or directory_第1張圖片

②在F:\Anaconda\envs\自己環境下的\Lib\site-packages ?這個文件夾目錄下,寫一個.pth文件,內容為兩條路徑

python object_detection/protos/*.proto: No such file or directory_第2張圖片

2.protoc.exe運行報錯:

同樣,將protoc.exe添加進系統環境變量

python object_detection/protos/*.proto: No such file or directory_第3張圖片

3."protoc object_detection/protos/*.proto --python_out=."命令錯誤:

object_detection/protos/*.proto: No such file or directory

4.cannot import name 'anchor_generator_pb2' from 'object_detection.protos

問題3和問題4都是屬于下面對應的一系列*pb2.py文件沒有生成成功

解決方法:

我的是protoc3.8版本,網上說下載protoc3.4版本就不會報錯,但是我的還是有問題,最后我在github的issues找到了一個解決方法:

https://github.com/tensorflow/models/issues/2930

就是一個一個的CMD執行(直接復制下面的30行代碼到CMD可以一次性全執行完)把 *.proto文件執行生成 ***pb2.py文件。

方便復制粘貼直接貼上:

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

python object_detection/protos/*.proto: No such file or directory_第4張圖片

測試是否成功:

            
              python object_detection/builders/model_builder_test.py
            
          

python object_detection/protos/*.proto: No such file or directory_第5張圖片

參考文獻:

object_detection配置相關:https://blog.csdn.net/Zlase/article/details/78734138


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 永泰县| 乡城县| 冷水江市| 南投县| 耒阳市| 宣城市| 双牌县| 衡南县| 重庆市| 隆安县| 大庆市| 土默特右旗| 柳江县| 云梦县| 玉环县| 高清| 疏勒县| 嵩明县| 南昌市| 扎兰屯市| 三都| 玉山县| 新疆| 满城县| 平昌县| 北宁市| 漯河市| 文安县| 龙南县| 轮台县| 辛集市| 花垣县| 淅川县| 桃江县| 安岳县| 潜山县| 四子王旗| 买车| 定日县| 合江县| 平远县|