Date

Overview

For a while now I had wanted to mess around with some computer vision technologies.
Bonus points for something I could point Tensorflow at as well.
This is when I came across the DepthAI project.
Utilizing an Intel MyriadX as the VPU, it seems a good choice.
They have a few options but I ended up with the USB3 board and a single colour 4k camera.
This neat little USB board will let us offload all of the compute intensive AI vision work.

This guide will walk though the basic steps to setup the board and run the DepthAI demo.
The aim here to ensure you have an end to end working platform and hardware for future projects.

Pre-requests

  1. Opencv (+ any dependences)
  2. Intel OpenVino
  3. DepthAi python toolkit

OpenCV

For Gentoo this was a simple case of emerging media-libs/opencv
My enabled USE flags look like: eigen gtk jpeg openmp png python vaapi.
This also pulled in any dependencies I needed.

Intel OpenVino

The DepthAi python toolkit requires a set version of the Intel OpenVino toolkit.
At the time of writing this article that version was 2019-R2. The web site will ask for name, email all that sadly normal details.
However the form accepts anything, and gets you to to the download page, so feel free to enter what ever garbage you feel.
On the download page you will see a serial number. I never was prompted to enter this so maybe record it, but it seems not needed.

Download the "Full Package", this is around about 500mb of software but ensures you have all the needed tools and libraries.

Download page

Once it has downloaded, untar it to some temporary location.
Sadly Intel do not generate md5sums or sha checksums for the tarball, so your just going to trust it...

After you have extracted the tarball you will have two options for install install.sh or install_GUI.sh, I prefer a CLI installer so this guide will make use of the install.sh tool, but the GUI should be similar.

After you have scrolled thou a massive legal agreement type "accept" and move on.

I also do not like anyone getting free information from me so I ensure I select "I do NOT consent to the collection of my Information"

consent

I then like to change the install directory, however this is not really needed. Just a personal preference. I place the installed files at /opt/intel/openvino.

install dir

After that the installer will check for all the needed prerequisites. By this point in time you should have most if not all the prerequisites installed. The only missing one for me was the "Intel Graphics Compute Runtime".
I opted to skip this and move on with the install. After all it says it will install it later.

pre-reqs

The installer should now go off and install what ever it needs to.
Once this is done you should see something like this :

done

Hit Enter to exit the installer, nothing more to do here.

DepthAI python toolkit

Check on DepthAI's documentation site for latest guides, however its quite simple.

First : git clone https://github.com/luxonis/depthai-python-extras.git

This will take a little while the repo is a little large.

Second : pip3 install --user -e depthai-python-extras

The second command should be run outside of the cloned directory.
That's it. Take a read over there extensive documentation to get a better idea of what else you can do.

Running the demo

Ensure you have a camera and the DepthAI module connected.
Change into the depthai-python-extras.
Run python3 test.py.

You should see a camera window appear of what the DepthAi unit can "see".
Now try point the camera at something like a TV/LCD screen.

It should be able to detect what the object is.

As you can see the DepthAI demo has detected my laptop screen as "tvmonitor". This is correct according to the lables.

Demo


Comments

There are no comments yet. Email me and I will add your comment.