tensorflow api proto檔案windows下編譯問題
阿新 • • 發佈:2020-05-30
1、配置環境
首先介紹一下我的環境,Windows 7(64位)旗艦版,anaconda 3(python 3.6)
2、搭建環境
2.1、安裝tensorflow
首先要安裝tensorflow,其它依賴的庫會自動安裝,直接執行下列命令即可
pip install tensorflow
1
2.2、下載Tensorflow object detection API
https://github.com/tensorflow/models
從github上下載專案(右上角“Clone or download”-“DownloadZIP”),下載到本地目錄(避免中文),解壓。
2.3、Protobuf 安裝與配置
這一步,到了本篇部落格重頭戲,試了好多方法
在 https://github.com/google/protobuf/releases 網站中選擇windows 版本(最下面),解壓後將bin資料夾中的*【protoc.exe】*放到C:\Windows
在models\research\目錄下開啟命令列視窗,輸入:
protoc object_detection/protos/*.proto --python_out=.
for /f %i in (‘dir /b object_detection\protos\*.proto‘) do protoc object_detection\protos\%i --python_out=.
如果順利通過沒報錯,你就不會看到本篇文章了,所以,接著往下看: