You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try tiny-yolo-image-loop.ipynb, then it has the problem as shown below
import sys
import os, platform
import json
import numpy as np
import cv2
from ctypes import c_char_p # i add import
from matplotlib import pyplot as plt
from PIL import Image
from datetime import datetime
from qnn import TinierYolo
from qnn import utils
sys.path.append("/opt/darknet/python/")
from darknet import *
from tests.test_qnn import test_tinier_yolo # i add import
Have you installed by using sudo pip3 install git+https://github.com/Xilinx/QNN-MO-PYNQ.git?
That command will also install a version of darknet, and compile the darknet python library (under /opt/darknet/python/) which is used in the example notebook.
The lib is instantiated in the darknet.py file
Hello,
I try tiny-yolo-image-loop.ipynb, then it has the problem as shown below
import sys
import os, platform
import json
import numpy as np
import cv2
from ctypes import c_char_p # i add import
from matplotlib import pyplot as plt
from PIL import Image
from datetime import datetime
from qnn import TinierYolo
from qnn import utils
sys.path.append("/opt/darknet/python/")
from darknet import *
from tests.test_qnn import test_tinier_yolo # i add import
%matplotlib inline
import IPython
conv0_weights = np.load('/home/xilinx/jupyter_notebooks/QNN-MO-PYNQ/qnn/params/tinier-yolo-conv0-W.npy', encoding="latin1")
conv0_weights_correct = np.transpose(conv0_weights, axes=(3, 2, 1, 0))
conv8_weights = np.load('/home/xilinx/jupyter_notebooks/QNN-MO-PYNQ/qnn/params/tinier-yolo-conv8-W.npy', encoding="latin1")
conv8_weights_correct = np.transpose(conv8_weights, axes=(3, 2, 1, 0))
conv0_bias = np.load('/home/xilinx/jupyter_notebooks/QNN-MO-PYNQ/qnn/params/tinier-yolo-conv0-bias.npy', encoding="latin1")
conv0_bias_broadcast = np.broadcast_to(conv0_bias[:,np.newaxis], (net['conv1']['input'][0],net['conv1']['input'][1]net['conv1']['input'][1]))
conv8_bias = np.load('/home/xilinx/jupyter_notebooks/QNN-MO-PYNQ/qnn/params/tinier-yolo-conv8-bias.npy', encoding="latin1")
conv8_bias_broadcast = np.broadcast_to(conv8_bias[:,np.newaxis], (125,1313))
cfg = c_char_p("/home/xilinx/jupyter_notebooks/QNN-MO-PYNQ/qnn/params/tinier-yolo-bwn-3bit-relu-nomaxpool.cfg".encode())
net_darknet = lib.parse_network_cfg(file_name_cfg)
NameError Traceback (most recent call last)
in ()
14 cfg = c_char_p("/home/xilinx/jupyter_notebooks/QNN-MO-PYNQ/qnn/params/tinier-yolo-bwn-3bit-relu-nomaxpool.cfg".encode())
15
---> 16 net_darknet = lib.parse_network_cfg(file_name_cfg)
NameError: name 'lib' is not defined
How can I solve this problem? Thank you.
The text was updated successfully, but these errors were encountered: