我今天安装了tensorflow,遵循github上的设置教程。 Protobuff 3.4安装良好。设置完成,并且object_detection.ipynb示例代码运行良好。
但是问题是当我尝试使用活动对象检测时。我遵循(https://pythonprogramming.net/video-tensorflow-object-detection-api-tutorial/)本教程。我的第三个牢房似乎有问题。我应该将mscoco_label_map.pbtxt(存在于对象检测文件夹的数据中)移动到某个地方吗?也是为什么有操作系统错误。它不是内置在python中吗?
感谢您的帮助人员
# What model to download.
MODEL_NAME = 'ssd_mobilenet_v1_coco_11_06_2017'
MODEL_FILE = MODEL_NAME + '.tar.gz'
DOWNLOAD_BASE = 'http://download.tensorflow.org/models/object_detection/'
# Path to frozen detection graph. This is the actual model that is used
for
the object detection.
PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'
# List of the strings that is used to add correct label for each box.
PATH_TO_LABELS = os.path.join('data', 'mscoco_label_map.pbtxt')
NUM_CLASSES = 90
MODEL_NAME = 'ssd_mobilenet_v1_coco_11_06_2017'
MODEL_FILE = MODEL_NAME + '.tar.gz'
DOWNLOAD_BASE = 'http://download.tensorflow.org/models/object_detection/'
# Path to frozen detection graph. This is the actual model that is used for the object detection.
PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'
# List of the strings that is used to add correct label for each box.
PATH_TO_LABELS = os.path.join('data', 'mscoco_label_map.pbtxt')
NUM_CLASSES = 90
# ## Download ModelTraceback (most recent call last):
File "<ipython-input-2-08073e128cca>", line 9, in <module>
PATH_TO_LABELS = os.path.join('data', 'mscoco_label_map.pbtxt')
NameError: name 'os' is not defined