Xilinx / QNN-MO-PYNQ

BSD 3-Clause "New" or "Revised" License
242 stars 114 forks source link

Not able to run tiny-yolo-image-loop.ipynb #8

Closed Nopileos2 closed 6 years ago

Nopileos2 commented 6 years ago

I was not able to run tiny-yolo-image-loop.ipynb out of the box, when trying to run the code in the box after "2. Launch Demo", I got this error

NameError                                 Traceback (most recent call last)`
<ipython-input-3-282cc81fa050> in <module>()
     59             print("class: {}\tprobability: {}".format(det[1], det[0]))
     60         res = Image.open(file_name_out.value.decode() + ".png")
---> 61         display(res)

NameError: name 'display' is not defined

I was able to fix this with adding the following line to the imports

from IPython.display import display

giuliogamba commented 6 years ago

Hi,

which PYNQ image are you using? You can discover the version with the instruction: python3.6 -m pip show pynq

Nopileos2 commented 6 years ago

Hello sorry for the delayed response, this is the output of the command:

Name: pynq Version: 1.4 Summary: Python for Xilinx package Home-page: https://github.com/Xilinx/PYNQ Author: XilinxPythonProject Author-email: pynq_support@xilinx.com License: UNKNOWN Location: /opt/python3.6/lib/python3.6/site-packages Requires:

giuliogamba commented 6 years ago

Hi,

so the problem is that you are using an old PYNQ image. Please download the latest 2.1 PYNQ image here. You can follow the instructions available here.