Search code examples
pythontensorflowobject-detection-api

how to fix "ImportError: cannot import name label_map_util"


Upon doing

from utils import label_map_util

I get

ImportError: cannot import name label_map_util

Changing to

from object_detection.utils import label_map_util

gives the same error.

I'm trying with PyCharm on Linux.


Solution

  • Inside pycharm terminal change current directory to models/research and run the following command

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