tensorflow对象检测教程错误:ipython未定义

时间:2017-11-05 06:34:44

标签: python tensorflow ipython object-detection

我正在使用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) ]

1 个答案:

答案 0 :(得分:0)

要使1. Fill input with id "ivoucher". 2. Click button with class "voucher-add-check". 3. Wait 5 seconds 函数调用工作,您需要从IPython运行脚本。否则,没有当前活动的IPython shell实例。 documentation