TannerGilbert / Tensorflow-Object-Detection-with-Tensorflow-2.0

Use the Tensorflow Object Detection API with Tensorflow 2
https://gilberttanner.com/blog/object-detection-with-tensorflow-2
MIT License
131 stars 78 forks source link

NotFoundError: data/mscoco_label_map.pbtxt; No such file or directory #5

Closed Rohithv07 closed 4 years ago

Rohithv07 commented 4 years ago

While I do Load lable map PATH_TO_LABELS = 'data/mscoco_label_map.pbtxt' category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True)

I get a NotFoundError

Iam doing this work in Google Colab

Error

`NotFoundError Traceback (most recent call last)

in () 1 # List of the strings that is used to add correct label for each box. 2 PATH_TO_LABELS = 'data/mscoco_label_map.pbtxt' ----> 3 category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True) 4 frames /usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/file_io.py in _preread_check(self) 77 "File isn't open for reading") 78 self._read_buf = _pywrap_file_io.BufferedInputStream( ---> 79 self.__name, 1024 * 512) 80 81 def _prewrite_check(self): NotFoundError: data/mscoco_label_map.pbtxt; No such file or directory`
TannerGilbert commented 4 years ago

The path to the labelmap file isn't correct. Are you working inside the object_detection folder?

Rohithv07 commented 4 years ago

Capture

Is this the file talking about?

TannerGilbert commented 4 years ago

No. You can find the file inside the object_detection/data folder.