This example shows an implementation of Monocular Depth Estimation with Transfer Learning pretrained MobileNetV2 on DepthAI in the Gen2 API system. Blob is created with ONNX from PINTO's Model ZOO, which is then converted to OpenVINO IR with required flags and converted to blob.
There are two available blob's for different input sizes:
depth_estimation_mbnv2_240x320_openvino_2021.4_6shave
, for 240x320 (H x W) input, which runs with ~15 FPS, anddepth_estimation_mbnv2_480x640_openvino_2021.4_6shave
, for 480x640 (H x W) input, which runs with ~5 FPS.
Output of the model is a unnormalized density map of size (INPUT_HEIGHT / 2) x (INPUT_WIDTH / 2). We rescale the input frame to have the same size when showing the demo.
Install requirements:
python3 -m pip install -r requirements.txt
python3 main.py [options]
Options:
-w, --width
: Select width of the model for inference. Default:320
. Possible options:320
or640
.