AI models

Through the NNComponent, DepthAI SDK abstracts:

  1. AI model sourcing using blobconverter from Open Model Zoo (OMZ) and DepthAI Model Zoo (DMZ).

  2. AI result decoding - currently SDK supports on-device decoding for YOLO and MobileNet based results using YoloDetectionNetwork and MobileNetDetectionNetwork nodes.

  3. Decoding of the config.json which allows an easy deployment of custom AI models trained using our notebooks and converted using https://tools.luxonis.com.

  4. Formatting of the AI model input frame - SDK uses BGR color order and Planar / CHW (Channel, Height, Width) layout conventions. If model accepts color images, it should accept 3 channels (B,G,R), and if it accepts grayscale images, it should accept 1 channel.

https://github.com/luxonis/depthai/assets/18037362/3d2422ca-6ed4-46fe-948e-7860f2ff066f

Netron app allows you to check model’s input layout

  1. Integration with 3rd party tools/services (Roboflow).

SDK supported models

With NNComponent you can easily try out a variety of different pre-trained models by simply changing the model name:

  from depthai_sdk import OakCamera

  with OakCamera() as oak:
      color = oak.create_camera('color')
-     nn = oak.create_nn('mobilenet-ssd', color)
+     nn = oak.create_nn('vehicle-detection-0202', color)
      oak.visualize([nn], fps=True)
      oak.start(blocking=True)

Both of the models above are supported by this SDK, so they will be downloaded and deployed to the OAK device along with the pipeline.

The following table lists all the models supported by the SDK. The model name is the same as the name used in the NNComponent constructor.

Name

Model Source

FPS*

age-gender-recognition-retail-0013

OMZ

33

emotions-recognition-retail-0003

OMZ

33

face-detection-adas-0001

OMZ

18

face-detection-retail-0004

OMZ

33

facemesh_192x192

DMZ

32

facial_landmarks_68_160x160

32

DMZ

human-pose-estimation-0001

OMZ

8

mobilenet-ssd

OMZ

31

mobilenetv2_imagenet_embedder_224x224

DMZ

/

pedestrian-detection-adas-0002

OMZ

19

person-detection-0200

OMZ

14

person-detection-retail-0013

OMZ

15

person-reidentification-retail-0288

OMZ

33

person-vehicle-bike-detection-crossroad-1016

OMZ

12

sbd_mask_classification_224x224

DMZ

64+

vehicle-detection-0202

OMZ

14

vehicle-detection-adas-0002

OMZ

14

vehicle-license-plate-detection-barrier-0106

OMZ

29

yolo-v3-tf

OMZ

3.5

yolo-v3-tiny-tf

OMZ

33

yolov4_coco_608x608

DMZ

1.1

yolov4_tiny_coco_416x416

DMZ

32

yolov5n_coco_416x416

DMZ

32

yolov6n_coco_640x640

DMZ

26

yolov6nr3_coco_640x352

DMZ

32

yolov7tiny_coco_640x352

DMZ

23

yolov7tiny_coco_416x416

DMZ

29

yolov8n_coco_640x352

DMZ

22

* - FPS was measured using only color camera (1080P) and 1 NN using callbacks (without visualization)

Got questions?

Head over to Discussion Forum for technical support or any other questions you might have.