bourdakos1 / Custom-Object-Detection

Custom Object Detection with TensorFlow

Home Page:https://medium.freecodecamp.org/tracking-the-millenium-falcon-with-tensorflow-c8c86419225e

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with last step trying to run object_detection_runner.py

joshterrill opened this issue · comments

I was able to generate my model and inference graph, but when it got down to going through the last step and running python3 ./object_detection/object_detection_runner.py I got this error:

root@ml-2:/home/science/Custom-Object-Detection# python3 ./object_detection/object_detection_runner.py 
Loading model...
detecting...
2019-01-18 08:47:33.209893: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA
detecting object in path: test_images/image-1.jpg
Traceback (most recent call last):
  File "./object_detection/object_detection_runner.py", line 93, in <module>
    detect_objects(image_path)
  File "./object_detection/object_detection_runner.py", line 59, in detect_objects
    fig = plt.figure()
  File "/usr/local/lib/python3.5/dist-packages/matplotlib/pyplot.py", line 535, in figure
    **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", line 81, in new_figure_manager
    return new_figure_manager_given_figure(num, figure)
  File "/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", line 89, in new_figure_manager_given_figure
    window = Tk.Tk()
  File "/usr/lib/python3.5/tkinter/__init__.py", line 1871, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

I've been following the steps laid out in this tutorial: https://medium.freecodecamp.org/tracking-the-millenium-falcon-with-tensorflow-c8c86419225e so all the test images that I've been training on and are trying to call the runner on are pointing to the same three test images that are in this project.

Any ideas on why this error is occurring? I tried googling it but didn't find much that seemed applicable.

Hi @joshterrill , this repo relies on a dated version of the TensorFlow api. We've moved to a more future proof version here: https://github.com/cloud-annotations/training
I encourage you to try it out and reopen this issue there if you are still running into problems