--- license: apache-2.0 --- # YOLOv5: Target Detection Yolov5 is a one-stage structure target detection network framework, in which the main structure consists of 4 parts, including the network backbone composed of modified CSPNet, the high-resolution feature fusion module composed of FPN (Feature Paramid Network), composed of SPP (Spatial Pyramid Pooling) constitutes a pooling module, and three different detection heads are used to detect targets of different sizes. The YOLOv5 model can be found [here](https://github.com/ultralytics/yolov5) ## CONTENTS - [Performance](#performance) - [Model Conversion](#model-conversion) - [Inference](#inference) ## Performance |Device|SoC|Runtime|Model|Size (pixels)|Inference Time (ms)|Precision|Compute Unit|Model Download| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| |AidBox QCS6490|QCS6490|QNN|YOLOv5s(cutoff)|640|6.7|INT8|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS6490/cutoff_yolov5s_int8.qnn.serialized.bin)| |AidBox QCS6490|QCS6490|QNN|YOLOv5s(cutoff)|640|15.2|INT16|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS6490/cutoff_yolov5s_int16.qnn.serialized.bin)| |AidBox QCS6490|QCS6490|SNPE|YOLOv5s(cutoff)|640|5.5|INT8|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS6490/cutoff_yolov5s_int8_htp_snpe2.dlc)| |AidBox QCS6490|QCS6490|SNPE|YOLOv5s(cutoff)|640|13.4|INT16|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS6490/cutoff_yolov5s_int16_htp_snpe2.dlc)| |APLUX QCS8550|QCS8550|QNN|YOLOv5s(cutoff)|640|4.1|INT8|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS8550/cutoff_yolov5s_640_int8.qnn.serialized.bin)| |APLUX QCS8550|QCS8550|QNN|YOLOv5s(cutoff)|640|13.4|INT16|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS8550/cutoff_yolov5s_640_int16.qnn.serialized.bin)| |APLUX QCS8550|QCS8550|SNPE|YOLOv5s(cutoff)|640|2.3|INT8|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS8550/cutoff_yolov5s_int8_htp_snpe2.dlc)| |APLUX QCS8550|QCS8550|SNPE|YOLOv5s(cutoff)|640|5.8|INT16|NPU|[model download](https://huggingface.co/aidlux/YOLOv5/blob/main/Models/QCS8550/cutoff_yolov5s_int16_htp_snpe2.dlc)| |AidBox GS865|QCS8250|SNPE|YOLOv5s(cutoff)|640|21|INT8|NPU|[model download]()| ## Model Conversion Demo models converted from [**AIMO(AI Model Optimizier)**](https://aidlux.com/en/product/aimo). The source model **YOLOv5s.onnx** can be found [here](https://huggingface.co/aplux/YOLOv5/blob/main/yolov5s.onnx). The demo model conversion step on AIMO can be found blow: |Device|SoC|Runtime|Model|Size (pixels)|Precision|Compute Unit|AIMO Conversion Steps| |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:| |AidBox QCS6490|QCS6490|QNN|YOLOv5s(cutoff)|640|INT8|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS6490/aimo_yolov5s_qnn_int8.png)| |AidBox QCS6490|QCS6490|QNN|YOLOv5s(cutoff)|640|INT16|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS6490/aimo_yolov5s_qnn_int16.png)| |AidBox QCS6490|QCS6490|SNPE|YOLOv5s(cutoff)|640|INT8|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS6490/aimo_yolov5s_snpe_int8.png)| |AidBox QCS6490|QCS6490|SNPE|YOLOv5s(cutoff)|640|INT16|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS6490/aimo_yolov5s_snpe_int16.png)| |APLUX QCS8550|QCS8550|QNN|YOLOv5s(cutoff)|640|INT8|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS8550/aimo_yolov5s_qnn_int8.png)| |APLUX QCS8550|QCS8550|QNN|YOLOv5s(cutoff)|640|INT16|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS8550/aimo_yolov5s_qnn_int16.png)| |APLUX QCS8550|QCS8550|SNPE|YOLOv5s(cutoff)|640|INT8|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS8550/aimo_yolov5s_snpe_int8.png)| |APLUX QCS8550|QCS8550|SNPE|YOLOv5s(cutoff)|640|INT16|NPU|[View Steps](https://huggingface.co/aplux/YOLOv5/blob/main/AIMO/QCS8550/aimo_yolov5s_snpe_int16.png)| |AidBox GS865|QCS8250|SNPE|YOLOv5s(cutoff)|640|INT8|NPU|[View Steps]()| ## Inference ### Step1: convert model a. Prepare source model in onnx format. The source model can be found [here](https://huggingface.co/aplux/YOLOv5/blob/main/yolov5s.onnx). b. Login AIMO and convert source model to target format. The model conversion step can follow **AIMO Conversion Step** in [Model Conversion sheet](#model-conversion). c. After conversion task done, download target model file. ### Step2: install AidLite SDK The installation guide of AidLite SDK can be found [here](https://huggingface.co/datasets/aplux/AIToolKit/blob/main/AidLite%20SDK%20Development%20Documents.md#installation). ### Step3: run demo program