Tensorflow Object Detection API on Windows - error “ModuleNotFoundError: No module named 'utils'”

后端 未结 4 1464
误落风尘
误落风尘 2020-12-16 18:57

I\'m attempting to get the TensorFlow Object Detection API

https://github.com/tensorflow/models/tree/master/research/object_detection

working on Windows by f

相关标签:
4条回答
  • 2020-12-16 19:49

    Make sure you have a __init__.py file in your research/object_detection/protos folder! The __init__.py file is empty but needs to exist for the protos module to be created correctly.

    0 讨论(0)
  • 2020-12-16 19:56

    As mentioned in the comment, utils is a submodule so you actually need to add object_detection to PYTHONPATH, not object_detection/utils.

    I'm glad it worked for you.

    0 讨论(0)
  • 2020-12-16 19:56

    cd Research/Object_Detection

    cd ..

    Research

    1. export PATH=~/anaconda3/bin:$PATH

    RESEARCH

    1. git clone https://github.com/tensorflow/models.git

    RESEARCH

    3.export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim

    4.protoc object_detection/protos/string_int_label_map.proto --python_out=.

    CD OBJECT_DETECTION

    1. protoc protos/string_int_label_map.proto --python_out=.

    6.jupyter notebook

    0 讨论(0)
  • 2020-12-16 20:00

    The following command does not work on Windows:

    export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
    

    Instead, I followed the directions of this tutorial, which recommends setting the path variables for three different directories manually. I simply added a path for the utils directory as well. So far it has worked without error.

    0 讨论(0)
提交回复
热议问题