Close

Update On Training Custom Neural Models for DepthAI

A project log for Luxonis DepthAI

Spatial AI Meets Embedded Systems

brandonBrandon 04/08/2020 at 03:580 Comments

Meant to share this a while ago. So we have our initial online custom training for DepthAI now live on Colab.

https://colab.research.google.com/drive/1Eg-Pv7Amgc3THB6ZbnSaDJm0JAr0QPPU

So there are two notable limitations currently:

  1. DepthAI currently supports OpenVINO 2019 R3, which itself requires older versions of TensorFlow and so on. So this flow has all those old versions, which causes a lot of additional steps in Colab... a lot of uninstalling current versions of stuff and installing old versions. We are currently in the process of upgrading our DepthAI codebase to support OpenVINO 2020.1, see here. The updated training flow when that's done. (EDIT: we got that done fast, see the bottom of this post for the 2020.1 training flow)
  2. The final conversion for DepthAI (to .blob) for some reason will not run on Google Colab. So it requires a local machine to do it. We're planning on just making our own server for this purpose that Google Colab can talk to to do the conversion.

To test the custom training we took some images of apples and oranges and did a terrible job labeling them and then trained and converted the network and ran it on DepthAI. It's easy to get WAY better accuracies and detection rates by using something like basic.ai to generate a larger dataset.

To use the latest of everything (as of this writing), including OpenVINO (R2020.1), etc. use the following:

Training: https://colab.research.google.com/drive/1_bjLv6QH_SPQ4QQ4TX1l_45acBSbjQBu 

Running on DepthAI: https://github.com/luxonis/depthai-python-extras/tree/host_watchdog_r10.15

Cheers,

Brandon & the Luxonis Team

Discussions