6 Star 5 Fork 5

DeepSpark / DeepSparkInference

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.41 KB
一键复制 编辑 原始数据 按行查看 历史

YOLOv5-m

Description

The YOLOv5 architecture is designed for efficient and accurate object detection tasks in real-time scenarios. It employs a single convolutional neural network to simultaneously predict bounding boxes and class probabilities for multiple objects within an image.

Setup

Install

yum install mesa-libGL
pip3 install tqdm
pip3 install onnx
pip3 install onnxsim
pip3 install ultralytics
pip3 install pycocotools

Download

Pretrained model: https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m.pt

Dataset: http://images.cocodataset.org/zips/val2017.zip to download the validation dataset.

Model Conversion

python3 export.py --weight yolov5m.pt --output yolov5m.onnx

# Use onnxsim optimize onnx model
onnxsim yolov5m.onnx yolov5m_opt.onnx

Inference

export DATASETS_DIR=/Path/to/coco/

FP16

# Accuracy
bash scripts/infer_yolov5_fp16_accuracy.sh
# Performance
bash scripts/infer_yolov5_fp16_performance.sh

INT8

# Accuracy
bash scripts/infer_yolov5_int8_accuracy.sh
# Performance
bash scripts/infer_yolov5_int8_performance.sh

Results

Model BatchSize Precision FPS MAP@0.5 MAP@0.5:0.95
YOLOv5m 32 FP16 533.53 0.639 0.451
YOLOv5m 32 INT8 969.53 0.624 0.428
Python
1
https://gitee.com/deep-spark/deepsparkinference.git
git@gitee.com:deep-spark/deepsparkinference.git
deep-spark
deepsparkinference
DeepSparkInference
master

搜索帮助