【发布时间】:2017-11-05 06:34:43
【问题描述】:
我正在研究 github 上的 tensorflow 对象检测 API 教程:https://github.com/tensorflow/models/blob/master/research/object_detection/README.md
我在尝试运行 object_detection_tutorial.py 文件时遇到此错误:
"C:\Users\David\Desktop\ObjectDetection\models\object_detection\object_detection_tutorial2.py", line 32, in <module>
get_ipython().run_line_magic('matplotlib', 'inline')
NameError: name 'get_ipython' is not defined
有人介意我的正确方向吗?
还有人有在自己的图像上运行此程序的经验吗?我想在我在房子周围拍的一些照片上对其进行测试,但我不确定如何在 python 中正确编写它,它与这里的这部分有关吗?:
# For the sake of simplicity we will use only 2 images:
# image1.jpg
# image2.jpg
# If you want to test the code with your images, just add path to the images to the TEST_IMAGE_PATHS.
PATH_TO_TEST_IMAGES_DIR = 'test_images'
TEST_IMAGE_PATHS = [ os.path.join(PATH_TO_TEST_IMAGES_DIR, 'image{}.jpg'.format(i)) for i in range(1, 3) ]
【问题讨论】:
-
您的系统上是否安装了
ipython或jupyter?
标签: python tensorflow ipython object-detection