# YOLOv5-Lite:lighter, faster and easier to deploy ![](https://zenodo.org/badge/DOI/10.5281/zenodo.5241425.svg)
![image](https://user-images.githubusercontent.com/82716366/135564164-3ec169c8-93a7-4ea3-b0dc-40f1059601ef.png)
Perform a series of ablation experiments on yolov5 to make it lighter (smaller Flops, lower memory, and fewer parameters) and faster (add shuffle channel, yolov5 head for channel reduce. It can infer at least 10+ FPS On the Raspberry Pi 4B when input the frame with 320×320) and is easier to deploy (removing the Focus layer and four slice operations, reducing the model quantization accuracy to an acceptable range).
## Comparison of ablation experiment results
ID|Model | Input_size|Flops| Params | Size(M) |Map@0.5|Map@.5:0.95
:-----:|:-----:|:-----:|:----------:|:----:|:----:|:----:|:----:|
001| yolo-fastest| 320×320|0.25G|0.35M|1.4| 24.4| -
002| NanoDet-m| 320×320| 0.72G|0.95M|1.8|- |20.6
003| yolo-fastest-xl| 320×320|0.72G|0.92M|3.5| 34.3| -
004| YOLOv5-Lite<sub>e</sub><sup>ours</sup>|320×320|0.88G|0.90M|2.0| 37.1|21.2|
005| yolov3-tiny| 416×416| 6.96G|6.06M|23.0| 33.1|16.6
006| yolov4-tiny| 416×416| 5.62G|8.86M| 33.7|40.2|21.7
007| YOLOv5-Lite<sub>s</sub><sup>ours</sup>| 416×416|1.66G |1.64M|3.4| 42.0|25.2
008| YOLOv5-Lite<sub>c</sub><sup>ours</sup>| 512×512|5.92G |4.57M|9.2| 50.9|32.5|
009| NanoDet-EfficientLite2| 512×512| 7.12G|4.71M|18.3|- |32.6
010| YOLOv5s(6.0)| 640×640| 16.5G|7.23M|14.0| 56.0|37.2
011| YOLOv5-Lite<sub>g</sub><sup>ours</sup>| 640×640|15.6G |5.39M|10.9| 57.6|39.1|
See the wiki: https://github.com/ppogg/YOLOv5-Lite/wiki/Test-the-map-of-models-about-coco
## Comparison on different platforms
Equipment|Computing backend|System|Input|Framework|v5Lite-s|v5Lite-c|v5Lite-g|YOLOv5s
:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:
Inter|@i5-10210U|window(x86)|640×640|openvino|-|46ms|-|131ms
Nvidia|@RTX 2080Ti|Linux(x86)|640×640|torch|-|-|15ms|14ms
Redmi K30|@Snapdragon 730G|Android(arm64)|320×320|ncnn|28ms|-|-|163ms
Raspberrypi 4B|@ARM Cortex-A72|Linux(arm64)|320×320|ncnn|84ms|-|-|371ms
Raspberrypi 4B|@ARM Cortex-A72|Linux(arm64)|320×320|mnn|76ms|-|-|356ms
* The above is a 4-thread test benchmark
* Raspberrypi 4B enable bf16s optimization,[Raspberrypi 64 Bit OS](http://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-08-24/)
### qq交流群:993965802
## ·Model Zoo·
#### @YOLOv5-Lites:
Model|Size|Backbone|Head|Framework|Design for
:---:|:---:|:---:|:---:|:---:|:---
v5Lite-s.pt|3.4m|shufflenetv2(Megvii)|v5Lites-head|Pytorch|Arm-cpu
v5Lite-s.bin<br />v5Lite-s.param|3.3m|shufflenetv2|v5Lites-head|ncnn|Arm-cpu
v5Lite-s-int8.bin<br />v5Lite-s-int8.param|1.7m|shufflenetv2|v5Lites-head|ncnn|Arm-cpu
v5Lite-s.mnn|3.3m|shufflenetv2|v5Lites-head|mnn|Arm-cpu
v5Lite-s-int4.mnn|987k|shufflenetv2|v5Lites-head|mnn|Arm-cpu
v5Lite-s-fp16.bin<br />v5Lite-s-fp16.xml|3.4m|shufflenetv2|v5Lites-head|openvivo|x86-cpu
v5Lite-s-fp32.bin<br />v5Lite-s-fp32.xml|6.8m|shufflenetv2|v5Lites-head|openvivo|x86-cpu
v5Lite-s-fp16.tflite|3.3m|shufflenetv2|v5Lites-head|tflite|arm-cpu
v5Lite-s-fp32.tflite|6.7m|shufflenetv2|v5Lites-head|tflite|arm-cpu
v5Lite-s-int8.tflite|1.8m|shufflenetv2|v5Lites-head|tflite|arm-cpu
#### @YOLOv5-Litec:
Model|Size|Backbone|Head|Framework|Design for
:---:|:---:|:---:|:---:|:---:|:---:
v5Lite-c.pt|9m|PPLcnet(Baidu)|v5Litec-head|Pytorch|x86-cpu / x86-vpu
v5Lite-c.bin<br />v5Lite-c.xml|8.7m|PPLcnet|v5Litec-head|openvivo|x86-cpu / x86-vpu
#### @YOLOv5-Liteg:
Model|Size|Backbone|Head|Framework|Design for
:---:|:---:|:---:|:---:|:---:|:---:
v5Lite-g.pt|10.9m|Repvgg(Tsinghua)|v5Liteg-head|Pytorch|x86-gpu / arm-gpu / arm-npu
v5Lite-g-int8.engine|8.5m|Repvgg|v5Liteg-head|Tensorrt|x86-gpu / arm-gpu / arm-npu
v5lite-g-int8.tmfile|8.7m|Repvgg|v5Liteg-head|Tengine| arm-npu
> #### Download Link:
>> - [ ] `YOLOv5—Lites.pt`: | [Baidu Drive](https://pan.baidu.com/s/1j0n0K1kqfv1Ouwa2QSnzCQ) | [Google Drive](https://drive.google.com/file/d/1ccLTmGB5AkKPjDOyxF3tW7JxGWemph9f/view?usp=sharing) |<br>
>>>> |──────`ncnn-fp16`: | [Baidu Drive](https://pan.baidu.com/s/1kWtwx1C0OTTxbwqJyIyXWg) | [Google Drive](https://drive.google.com/drive/folders/1w4mThJmqjhT1deIXMQAQ5xjWI3JNyzUl?usp=sharing) |<br>
>>>> |──────`ncnn-int8`: | [Baidu Drive](https://pan.baidu.com/s/1QX6-oNynrW-f3i0P0Hqe4w) | [Google Drive](https://drive.google.com/drive/folders/1YNtNVWlRqN8Dwc_9AtRkN0LFkDeJ92gN?usp=sharing) |<br>
>>>> |──────`mnn-fp16`: | [Baidu Drive](https://pan.baidu.com/s/12lOtPTl4xujWm5BbFJh3zA) | [Google Drive](https://drive.google.com/drive/folders/1PpFoZ4b8mVs1GmMxgf0WUtXUWaGK_JZe?usp=sharing) |<br>
>>>> |──────`mnn-int4`: | [Baidu Drive](https://pan.baidu.com/s/11fbjFi18xkq4ltAKUKDOCA) | [Google Drive](https://drive.google.com/drive/folders/1mSU8g94c77KKsHC-07p5V3tJOZYPQ-g6?usp=sharing) |<br>
>>>> └──────`tengine-fp32`: | [Baidu Drive](https://pan.baidu.com/s/123r630O8Fco7X59wFU1crA) | [Google Drive](https://drive.google.com/drive/folders/1VWmI2BC9MjH7BsrOz4VlSDVnZMXaxGOE?usp=sharing) |<br>
>> - [ ] `YOLOv5—Litec.pt`: [Baidu Drive](https://pan.baidu.com/s/1obs6uRB79m8e3uASVR6P1A) | [Google Drive](https://drive.google.com/file/d/1lHYRQKjqKCRXghUjwWkUB0HQ8ccKH6qa/view?usp=sharing) |<br>
>>>> └──────`openvino-fp16`: | [Baidu Drive](https://pan.baidu.com/s/18p8HAyGJdmo2hham250b4A) | [Google Drive](https://drive.google.com/drive/folders/1s4KPSC4B0shG0INmQ6kZuPLnlUKAATyv?usp=sharing) |<br>
>> - [ ] `YOLOv5—Liteg.pt`: | [Baidu Drive](https://pan.baidu.com/s/14zdTiTMI_9yTBgKGbv9pQw) | [Google Drive](https://drive.google.com/file/d/1oftzqOREGqDCerf7DtD5BZp9YWELlkMe/view?usp=sharing) |<br>
Baidu Drive Password: `pogg`
#### v5lite-s model: TFLite Float32, Float16, INT8, Dynamic range quantization, ONNX, TFJS, TensorRT, OpenVINO IR FP32/FP16, Myriad Inference Engin Blob, CoreML
[https://github.com/PINTO0309/PINTO_model_zoo/tree/main/180_YOLOv5-Lite](https://github.com/PINTO0309/PINTO_model_zoo/tree/main/180_YOLOv5-Lite)
#### Thanks for PINTO0309:[https://github.com/PINTO0309/PINTO_model_zoo/tree/main/180_YOLOv5-Lite](https://github.com/PINTO0309/PINTO_model_zoo/tree/main/180_YOLOv5-Lite)
## <div>How to use</div>
<details open>
<summary>Install</summary>
[**Python>=3.6.0**](https://www.python.org/) is required with all
[requirements.txt](https://github.com/ppogg/YOLOv5-Lite/blob/master/requirements.txt) installed including
[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/):
<!-- $ sudo apt update && apt install -y libgl1-mesa-glx libsm6 libxext6 libxrender-dev -->
```bash
$ git clone https://github.com/ppogg/YOLOv5-Lite
$ cd YOLOv5-Lite
$ pip install -r requirements.txt
```
</details>
<details>
<summary>Inference with detect.py</summary>
`detect.py` runs inference on a variety of sources, downloading models automatically from
the [latest YOLOv5-Lite release](https://github.com/ppogg/YOLOv5-Lite/releases) and saving results to `runs/detect`.
```bash
$ python detect.py --source 0 # webcam
file.jpg # image
file.mp4 # video
path/ # directory
path/*.jpg # glob
'https://youtu.be/NUsoVlDFqZg' # YouTube
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
```
</details>
<details open>
<summary>Training</summary>
```bash
$ python train.py --data coco.yaml --cfg v5lite-e.yaml --weights v5lite-e.pt --batch-size 128
v5lite-s.yaml --weights v5lite-s.pt --batch-size 128
v5lite-c.yaml v5lite-c.pt 96
v5lite-g.yaml v5lite-g.pt 64
```
If you use multi-gpu. It's faster several times:
```bash
$ python -m torch.di
没有合适的资源?快使用搜索试试~ 我知道了~
yolov5-lite
共2000个文件
flat:576个
jpg:230个
txt:222个
5星 · 超过95%的资源 需积分: 1 18 下载量 73 浏览量
2022-08-04
21:09:58
上传
评论 3
收藏 305.22MB ZIP 举报
温馨提示
采用yoloV5-lite进行数字识别,这个是移植过树莓派4B上的,直接加载到树莓派4B上,配置好环境就可以直接使用,帧率较低,一秒3帧左右
资源详情
资源评论
资源推荐
收起资源包目录
yolov5-lite (2000个子文件)
+0rtUI4ZJxjgV4ZDhZ0mC9G85DE= 837B
+0rtUI4ZJxjgV4ZDhZ0mC9G85DE= 837B
+2DJ5C1oQ9cfNgApMVT+bjlpI+M= 890B
+2DJ5C1oQ9cfNgApMVT+bjlpI+M= 890B
events.out.tfevents.1658823053.SC-202111171338.23352.0 784KB
events.out.tfevents.1658806408.SC-202111171338.19116.0 394KB
events.out.tfevents.1658801410.SC-202111171338.20932.0 199KB
events.out.tfevents.1658802313.SC-202111171338.17452.0 199KB
events.out.tfevents.1658797494.SC-202111171338.21372.0 199KB
events.out.tfevents.1658804652.SC-202111171338.20932.0 199KB
events.out.tfevents.1658802842.SC-202111171338.20388.0 199KB
events.out.tfevents.1658796599.SC-202111171338.21116.0 199KB
events.out.tfevents.1658798614.SC-202111171338.18032.0 199KB
events.out.tfevents.1658805230.SC-202111171338.20556.0 199KB
events.out.tfevents.1658804017.SC-202111171338.20560.0 69KB
events.out.tfevents.1658804374.SC-202111171338.18800.0 69KB
events.out.tfevents.1658805870.SC-202111171338.20496.0 37KB
events.out.tfevents.1658806227.SC-202111171338.19660.0 37KB
events.out.tfevents.1658796432.SC-202111171338.2544.0 8KB
events.out.tfevents.1658758187.SC-202111171338.12396.0 40B
events.out.tfevents.1658796382.SC-202111171338.18788.0 40B
events.out.tfevents.1658758227.SC-202111171338.12360.0 40B
events.out.tfevents.1658804621.SC-202111171338.17552.0 40B
events.out.tfevents.1658803991.SC-202111171338.17636.0 40B
events.out.tfevents.1658758499.SC-202111171338.9480.0 40B
events.out.tfevents.1658797437.SC-202111171338.15460.0 40B
events.out.tfevents.1658758784.SC-202111171338.5160.0 40B
events.out.tfevents.1658796105.SC-202111171338.19348.0 40B
1.8.0' 0B
1.0' 0B
0.9.0' 0B
2.0' 0B
1a16cySi9AAvM+L8mexZbG8DI+c= 2KB
1a16cySi9AAvM+L8mexZbG8DI+c= 2KB
1jYHRTSst9GpotozbEUzHqoIBYg= 1KB
1jYHRTSst9GpotozbEUzHqoIBYg= 1KB
2nO56vfRehieJ1aJf_kceef7ETk= 247B
2nO56vfRehieJ1aJf_kceef7ETk= 247B
2XFp2pHNN+6Hx5XuZjC7JxBa7+s= 806B
2XFp2pHNN+6Hx5XuZjC7JxBa7+s= 806B
3HSyLkLJaBzfcHyNUW0wYlKDKlE= 3KB
3HSyLkLJaBzfcHyNUW0wYlKDKlE= 3KB
4IhEm3pjyqO0YilGg0Wdf1VYV+c= 2KB
4IhEm3pjyqO0YilGg0Wdf1VYV+c= 2KB
65wAALFta+bJCgTeYxFOLKnk3zU= 979B
65wAALFta+bJCgTeYxFOLKnk3zU= 979B
8PJ7LCit1VI92POop+GFXzimUNU= 209KB
8PJ7LCit1VI92POop+GFXzimUNU= 209KB
8PJ7LCit1VI92POop+GFXzimUNU= 209KB
8PJ7LCit1VI92POop+GFXzimUNU= 209KB
9D4ZCRwI+re7Ba8zd8ZWLYiHW6c= 8KB
9D4ZCRwI+re7Ba8zd8ZWLYiHW6c= 8KB
a1GDqUD_VsICGXMxOraekqSoUPY= 5KB
a1GDqUD_VsICGXMxOraekqSoUPY= 5KB
resources-release.ap_ 254KB
com.tencent.ncnnyolox-debug.apk 15.94MB
gradlew.bat 2KB
c.bin 8.77MB
c.bin 8.77MB
s.bin 3.15MB
s.bin 3.15MB
v5lite-e.bin 1.74MB
e.bin 1.74MB
e.bin 1.74MB
ompver_CXX.bin 80KB
ompver_CXX.bin 80KB
CMakeDetermineCompilerABI_CXX.bin 80KB
CMakeDetermineCompilerABI_CXX.bin 80KB
CMakeDetermineCompilerABI_C.bin 80KB
CMakeDetermineCompilerABI_C.bin 80KB
feature_tests.bin 79KB
feature_tests.bin 79KB
ompver_C.bin 79KB
ompver_C.bin 79KB
CMakeDetermineCompilerABI_CXX.bin 39KB
CMakeDetermineCompilerABI_CXX.bin 39KB
CMakeDetermineCompilerABI_C.bin 39KB
CMakeDetermineCompilerABI_C.bin 39KB
feature_tests.bin 14KB
feature_tests.bin 14KB
feature_tests.bin 13KB
feature_tests.bin 13KB
CMakeDetermineCompilerABI_CXX.bin 11KB
CMakeDetermineCompilerABI_CXX.bin 11KB
CMakeDetermineCompilerABI_C.bin 11KB
CMakeDetermineCompilerABI_C.bin 11KB
ompver_CXX.bin 10KB
ompver_CXX.bin 10KB
CMakeDetermineCompilerABI_CXX.bin 10KB
CMakeDetermineCompilerABI_CXX.bin 10KB
CMakeDetermineCompilerABI_C.bin 10KB
CMakeDetermineCompilerABI_C.bin 10KB
ompver_C.bin 10KB
ompver_C.bin 10KB
ompver_CXX.bin 9KB
ompver_CXX.bin 9KB
CMakeDetermineCompilerABI_CXX.bin 9KB
CMakeDetermineCompilerABI_CXX.bin 9KB
CMakeDetermineCompilerABI_C.bin 9KB
CMakeDetermineCompilerABI_C.bin 9KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
孙启尧
- 粉丝: 714
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5