Object detection on the Raspberry Pi 4 with the Neural Compute Stick 2

Following on from the Coral USB experiment, the next step was to try it out with the NCS 2. Installation of OpenVINO on Raspbian Buster was straightforward. The rt-ai design was basically the same as for the Coral USB experiment but with the CoralSSD SPE replaced with the OpenVINO equivalent called CSSDPi. Both SPEs run ssd_mobilenet_v2_coco object detection.

Performance was pretty good – 17fps with 1280 x 720 frames. This is a little better than the Coral USB accelerator attained but then again the OpenVINO SPE is a C++ SPE while the Coral USB SPE is a Python SPE and image preparation and post processing takes its toll on performance. One day I am really going to use the C++ API to produce a new Coral USB SPE so that the two are on a level playing field. The raw inference time on the Coral USB accelerator is about 40mS or so meaning that there is plenty of opportunity for higher throughputs.

3 thoughts on “Object detection on the Raspberry Pi 4 with the Neural Compute Stick 2”

  1. Hi Richard,

    Thanks for your articles! So your rt-ai interface is very interesting.

    So we’re working on something we’d like you to try out when it’s done, if you’re interested: https://discuss.luxonis.com/d/30-luxonis-depthai-overview-and-status

    We’d be happy to send you one. We have a USB-interface version (say for use w/ RPi 4 or otherwise) and also a version that holds a Raspberry Pi Compute Module 3B+ (for the case where you want the whole thing to be self-sufficient w/out some external processor).

    And we’re also working on a version that’s a SoM w/ a Myriad X and an i.MX 8M onboard, for drop-in VPU and host all together on a single board.

    Would you have any interest in trying it out? If so we’ll plan on sending one when we have one to send!

    Also feel free to shoot me an email at brandon at luxonis dot com if there are any bits you want to discuss offline.



  2. Hi,
    I have spent the last hours trying to run the first example in the openvino raspbian installation on a raspberry 4 but i cannot get it to work.
    Either python3.7 cannot find cv2 or python3.5 has issues with numpy.
    I would be very happy if you could give me some details in how you managed to get this running.
    Best regards

    1. Regarding Python 3.5, did you try this command to build numpy?

      pip3.5 install numpy –upgrade –no-binary :all:

      That worked for me at least. I actually wasn’t using Python with OpenVINO – my SPEs are in C++. On the cv2 issue, did you install OpenCV with:

      pip3 install opencv-python

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.