- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I installed the ncsdk 1.12 version on a fresh RPi model 3 with Raspbian stretch.
I could run /ncappzoo/apps/hello_ncs_py with no issue.
When I am running the following script:
from mvnc import mvncapi as mvnc
# grab a list of all NCS devices plugged in to USB
print("[INFO] finding NCS devices...")
devices = mvnc.EnumerateDevices()
# if no devices found, exit the script
if len(devices) == 0:
print("[INFO] No devices found. Please plug in a NCS")
quit()
# use the first device since this is a simple test script
print("[INFO] found {} devices. device0 will be used. "
"opening device0...".format(len(devices)))
device = mvnc.Device(devices[0])
device.OpenDevice()
# open the CNN graph file
print("[INFO] loading the graph file into RPi memory...")
path = '/home/pi/ssd_on_pi/graph'
with open(path, mode="rb") as f:
graph_in_memory = f.read()
# load the graph into the NCS
print("[INFO] allocating the graph on the NCS...")
graph = device.AllocateGraph(graph_in_memory)
I have this error:
[INFO] finding NCS devices...
[INFO] found 1 devices. device0 will be used. opening device0...
[INFO] loading the graph file into RPi memory...
[INFO] allocating the graph on the NCS...
Traceback (most recent call last):
File "allocate_graph.py", line 25, in <module>
graph = device.AllocateGraph(graph_in_memory)
File "/usr/local/lib/python3.5/dist-packages/mvnc/mvncapi.py", line
203, in AllocateGraph
raise Exception(Status(status))
Exception: mvncStatus.ERROR
So initially I installed the API-only mode, I received this error when I ran the above file. Then, I uninstalled API-only and tried the full SDK, still the same error :(
I think the problem is that somehow I am not able to allocate the graph onto the device. I generated the graph using a separate ubuntu vm, and I was able to successfully run the above code in the vm.
Any clue what could be wrong here?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried generating the graph from ncsdk/examples/caffe/GoogLeNet in the vm and copied it to the Pi. When running run.py in Pi, the same error shows up :(
pi@raspberrypi:~/workspace/ncsdk-1.12.00.01/examples/caffe/GoogLeNet $
python3 run.py
Device 0 Address: 1.4.1 - VID/PID 03e7:2150
Starting wait for connect with 2000ms timeout
Found Address: 1.4.1 - VID/PID 03e7:2150
Found EP 0x81 : max packet size is 64 bytes
Found EP 0x01 : max packet size is 64 bytes
Found and opened device
Performing bulk write of 865724 bytes...
Successfully sent 865724 bytes of data in 2788.732941 ms (0.296055 MB/s)
Boot successful, device address 1.4.1
Found Address: 1.4.1 - VID/PID 03e7:f63b
done
Booted 1.4.1 -> VSC
Traceback (most recent call last):
File "run.py", line 66, in <module>
graph = device.AllocateGraph(blob)
File "/usr/local/lib/python3.5/dist-packages/mvnc/mvncapi.py", line
203, in AllocateGraph
raise Exception(Status(status))
Exception: mvncStatus.ERROR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HALP…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ama
- Does the NCSDK version on the VM side be v1.12?
- Does the sample other than hello_ncs_py and GoogLeNet work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@PINTO
- Yes, the graph is generated using ncsdk v1.12 as well.
- I have not tested other examples. I doubt other examples would work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ama
Does "~/workspace/ncsdk-1.12.00.01/examples/caffe/GoogLeNet/cpp/run_cpp" work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ama Have you tried using a powered USB hub?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel Yes I am indeed using a USB hub to connect the Movidius stick to the Pi. The only thing that is connected to the hub is the Pi. It is mainly because if I directly plug in the stick to the Pi, I will not have access to the other 3 USB ports :(, so essentially I am using the hub as a usb extension cable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel @PINTO Issue resolved. It is because that I am using a USB hub as an extension cable to connect the stick to the Pi. Everything works as expected when I am using an actual USB extension cable. I strongly suggest to have this added as a reminder in the RPi installation guidehttps://movidius.github.io/blog/ncs-apps-on-rpi/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ama Glad you figured it out and narrowed it down to your USB hub.
The brand of the USB hub I've been using is a 7 port powered Anker USB hub and they seem to work well with the NCS so far. We do recommend using a powered USB hub whenever you can, although its not required. I have this listed in my Troubleshooting guide at https://ncsforum.movidius.com/discussion/370/intel-ncs-troubleshooting-help-and-guidelines?new=1.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page