请帮我!在此先感谢我正在使用 google colab 中的 python 创建一个对象检测器。
请告诉我该怎么办?是否有任何模块版本错误或缺少文件目录?如果目录丢失,请告诉我如何添加。请尽快帮助我。再次非常感谢你。
当我运行此代码时,它会出现此错误
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)```.
**This is the output**
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/object_detection/utils/label_map_util.py:132: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.
---------------------------------------------------------------------------
NotFoundError Traceback (most recent call last)
<ipython-input-9-b47b5c1dba35> in <module>()
1 import os
----> 2 label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
3 categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
4 category_index = label_map_util.create_category_index(categories)
2 frames
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/file_io.py in _preread_check(self)
82 "File isn't open for reading")
83 self._read_buf = pywrap_tensorflow.CreateBufferedInputStream(
---> 84 compat.as_bytes(self.__name), 1024 * 512)
85
86 def _prewrite_check(self):
NotFoundError: data/mscoco_label_map.pbtxt; No such file or directory
慕慕森
幕布斯6054654
相关分类