SSDMobileNetV2
Before you begin, complete the environment setup:
- Host Model Conversion Tool — install NeuroPilot Converter
- Device Environment Setup — install Neuron SDK
Host-Side Model Conversion
If you only need to run the model on the device, you can skip Host-Side conversion and use pre-compiled DLA models.
Clone the Repository
git clone https://github.com/Ronin-1124/nio12l-model-zoo.git
cd nio12l-model-zoo
Download and Export Model
If you haven't installed project dependencies, run this in the project root:
pip install -r requirements.txt
cd examples/ssd_mobilenet_v2/convert_model
conda activate np8
python download_model.py
python export_onnx.py
Prepare Calibration Data
cd ../../..
python prepare_calibration_data.py path=./datasets/coco128/images/train2017 imgsz=300
Convert Model
cd examples/ssd_mobilenet_v2/convert_model
python convert_mtk_fp32.py
python convert_mtk_int8.py
After conversion, the following files are generated in examples/ssd_mobilenet_v2/model/:
int8/ssd_mobilenet_v2_mtk_int8.tflitefp32/ssd_mobilenet_v2_mtk_fp32.tflite
Device-Side Deployment
Clone the Repository
git clone https://github.com/Ronin-1124/nio12l-model-zoo.git
cd nio12l-model-zoo
Get Models
Method 1: Download Pre-Compiled DLA (Recommended)
wget -P examples/ssd_mobilenet_v2/model/int8 https://github.com/Ronin-1124/nio12l-model-zoo/releases/download/v2026.05.11-dla/ssd_mobilenet_v2_int8.dla
wget -P examples/ssd_mobilenet_v2/model/fp32 https://github.com/Ronin-1124/nio12l-model-zoo/releases/download/v2026.05.11-dla/ssd_mobilenet_v2_fp32.dla
Method 2: Convert from Host
Transfer Models
scp ssd_mobilenet_v2_mtk_int8.tflite <user>@<device>:/path/to/nio12l-model-zoo/examples/ssd_mobilenet_v2/model/int8/
scp ssd_mobilenet_v2_mtk_fp32.tflite <user>@<device>:/path/to/nio12l-model-zoo/examples/ssd_mobilenet_v2/model/fp32/
Convert to DLA
cd examples/ssd_mobilenet_v2/model/int8
ncc-tflite --arch=mdla2.0 -d ssd_mobilenet_v2_int8.dla ssd_mobilenet_v2_mtk_int8.tflite
cd ../fp32
ncc-tflite --arch=mdla2.0 -d ssd_mobilenet_v2_fp32.dla ssd_mobilenet_v2_mtk_fp32.tflite --relax-fp32
Build
cd /path/to/nio12l-model-zoo
cmake -S . -B build
cmake --build build -j
Run
Default uses INT8 model:
./build/ssd_mobilenet_v2_demo
Use FP32 model and specify an image:
./build/ssd_mobilenet_v2_demo --fp32 --image assets/images/bus.jpg
Performance reference (1000-inference average):
| Precision | Time (ms) | FPS |
|---|---|---|
| INT8 | 10.006 | 99.94 |
| FP32 | 18.299 | 54.65 |
Results are saved in outputs/ssd_mobilenet_v2/ (vis/ for visualization images, detections/ for JSON).