Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Tutorials

This directory contains end-to-end tutorials that show how to generate a binary file for a specific model using the VectorBlox SDK. Tutorials are organized by model source. For a detailed breakdown of three of our tutorials, please refer to the Tutorial Walkthrough Guide.

Tutorials Overview

Each tutorial includes a shell script that demonstrates the complete pipeline:

  1. Download the source model.
  2. Convert the model to TensorFlow Lite (if needed) using one of the following: openvino2tensorflow, onnx2tf, or tflite_quantize.
  3. Run tflite_preprocess to add a preprocessing layer before generating the binary.
  4. Generate the binary with VectorBlox's graph generation tool: vnnx_compile.
  5. Simulate and run inference using the Python script in example/python with the provided test image.

These scripts illustrate the complete pipeline for generating a model's binary file. Users may use or modify these scripts to generate a binary file for their own custom model, tailored to their use cases.

To run a tutorial script, change into the model's tutorial directory and run:

(vbx_env) ~/SDK/VectorBlox-SDK/tutorials/SOURCE_NAME/MODEL_NAME$ bash MODEL_NAME.sh

Tutorial Metrics

No Compression (subset)

Source Tutorial Input
(H,W,C)
Runtime
(ms)
Task Metric TFLITE VNNX
PINTO 081_MiDaS_v2 [256, 256, 3] 121.921 depth estimation depthdelta1 (nyuv2) 60.89 59.93
kaggle efficientnet-lite0 [224, 224, 3] 16.481 classification Top1 70.8 70.4
onnx onnx_resnet18-v1 [224, 224, 3] 25.741 classification Top1 69.1 68.9
openvino mobilenet-v1-1.0-224 [224, 224, 3] 11.811 classification Top1 70.1 70.1
qualcomm FFNet-122NS-LowRes_512x288 [288, 512, 3] 76.168 segmentation meanIoU (cityscapes) 44.82 44.45
qualcomm MobileNet-v3-Large-Quantized [224, 224, 3] 22.895 classification Top1 69.6 68.8
qualcomm QuickSRNetMedium-Quantized [128, 128, 3] 9.353 image enhancement PSNR (bsd300) 26.79 26.81
tensorflow mobilenet_v2 [224, 224, 3] 12.875 classification Top1 70.2 70.1
ultralytics yolov5n [640, 640, 3] 38.817 object detection mAP⁵⁰⁻⁹⁵ 22.88 22.95
ultralytics yolov8n [640, 640, 3] 54.129 object detection mAP⁵⁰⁻⁹⁵ 37.4 37.38
ultralytics yolov8n-cls [224, 224, 3] 4.104 classification Top1 67.2 67.3
ultralytics yolov8n-obb [1024, 1024, 3] 142.268 obb detection mAP⁵⁰⁻⁹⁵
ultralytics yolov8n-pose_512x288_split [288, 512, 3] 21.998 pose detection Pose Detection
ultralytics yolov8n-seg [640, 640, 3] 70.769 instance segmentation
ultralytics yolov9t [640, 640, 3] 65.068 object detection mAP⁵⁰⁻⁹⁵ 37.92 38.18

Compression

Source Tutorial Input
(H,W,C)
Runtime
(ms)
Task Metric TFLITE VNNX
compressed yolov8n_comp66 [640, 640, 3] 35.85 object detection mAP⁵⁰⁻⁹⁵ 37.18 37.3
compressed yolov8s_comp68 [640, 640, 3] 90.812 object detection mAP⁵⁰⁻⁹⁵ 46.11 46.15

Unstructured Compression

Source Tutorial Input
(H,W,C)
Runtime
(ms)
Task Metric TFLITE
unstructure_compressed resnet18_86s_07p [224, 224, 3] 14.63 classification Top1 65.6
unstructure_compressed yolov5n_70s_512x512 [512, 512, 3] 19.779 object detection mAP⁵⁰⁻⁹⁵ 20.2
unstructure_compressed yolov8n_50s_25p_512x288 [288, 512, 3] 15.428 object detection mAP⁵⁰⁻⁹⁵ 34.6
unstructure_compressed yolov8n_50s_25p_512x512 [512, 512, 3] 25.265 object detection mAP⁵⁰⁻⁹⁵
unstructure_compressed yolov8n_pose_50s_25p_512x288_split [288, 512, 3] 15.507 pose detection
unstructure_compressed yolov9s_70s_15p_512x288 [288, 512, 3] 32.95 object detection 43.2
unstructure_compressed yolov9s_70s_15p_512x512 [512, 512, 3] 55.576 object detection