I am trying to get the TensorFlow Object Detection API
https://github.com/tensorflow/models/tree/master/research/object_detection
runs on Windows following installation instructions
https://github.com/tensorflow/models/tree/master/research/object_detection
It seems to be for Linux / Mac. I can get this to work if I put the script in the directory into which I cloned the above repo. If I put the script in any other directory, I get this error:
ModuleNotFoundError: No module named 'utils'
I suspect that the reason does not match the Windows equivalent specified in the installation instructions above:
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
I use Windows 10, Python 3.6, and TensorFlow 1.4.0, if that matters. Of course, I searched for this problem and found various links, for example:
https://github.com/tensorflow/models/issues/1747
. ?
, :
EDIT: , RecencyEffect
1) TensorFlow pip3
2) :
pip3 install pillow
pip3 install lxml
pip3 install jupyter
pip3 install matplotlib
3) "" TensorFlow "",
C:\Users\cdahms\Documents\models
4) Google Protobuf https://github.com/google/protobuf Windows v3.4.0 release "protoc-3.4.0-win32.zip" ( 3.5.1 , 3.4.0 vid https://www.youtube.com/watch?v=COlbP62-B-U&list=PLQVvvaa0QuDcNK5GeCQnxYnSSaar2tpku&index=1 protobuf )
5) Protobuf Program Files,
"C:\Program Files\protoc-3.4.0-win32"
6) CD \research,
cd C:\Users\cdahms\Documents\models\research
7) protobuf,
"C:\Program Files\protoc-3.4.0-win32\bin\protoc.exe" object_detection/protos/*.proto --python_out=.
:
C:\Users\cdahms\Documents\models\research\object_detection\protos
, .py ( .proto)
8) cd object_detection, :
cd C:\Users\cdahms\Documents\models\research\object_detection
, object_detection_tutorial.ipynb Jupyter Notebook
jupyter notebook
9) Jupyter Notebook "object_detection_tutorial.ipynb" → Cell → Run all,
10) Jupyter Notebook "" → " " → "Python" .py ,
C:\Users\cdahms\Documents\models\research\object_detection\object_detection_tutorial.py
script Python (, PyCharm) .
RecencyEffect , , object_detection_tutorial.py script
11) script , , , :
ModuleNotFoundError: No module named 'utils'
Python, utils, :
from utils import label_map_util
from utils import visualization_utils as vis_util
.,.
12) → → ., → PYTHONPATH :

13) PATH % PYTHONPATH% :

14) , , .
15) "set", , PYTHONPATH , PYTHONPATH PATH .
16) "object_detection_tutorial.py"