# Official YOLOv7
Implementation of paper - [YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2207.02696)
[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/yolov7-trainable-bag-of-freebies-sets-new/real-time-object-detection-on-coco)](https://paperswithcode.com/sota/real-time-object-detection-on-coco?p=yolov7-trainable-bag-of-freebies-sets-new)
[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/akhaliq/yolov7)
<a href="https://colab.research.google.com/gist/AlexeyAB/b769f5795e65fdab80086f6cb7940dae/yolov7detection.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
[![arxiv.org](http://img.shields.io/badge/cs.CV-arXiv%3A2207.02696-B31B1B.svg)](https://arxiv.org/abs/2207.02696)
<div align="center">
<a href="./">
<img src="./figure/performance.png" width="79%"/>
</a>
</div>
## Web Demo
- Integrated into [Huggingface Spaces ����](https://huggingface.co/spaces/akhaliq/yolov7) using [Gradio](https://github.com/gradio-app/gradio). Try out the Web Demo [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/akhaliq/yolov7)
## Performance
MS COCO
| Model | Test Size | AP<sup>test</sup> | AP<sub>50</sub><sup>test</sup> | AP<sub>75</sub><sup>test</sup> | batch 1 fps | batch 32 average time |
| :-- | :-: | :-: | :-: | :-: | :-: | :-: |
| [**YOLOv7**](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt) | 640 | **51.4%** | **69.7%** | **55.9%** | 161 *fps* | 2.8 *ms* |
| [**YOLOv7-X**](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x.pt) | 640 | **53.1%** | **71.2%** | **57.8%** | 114 *fps* | 4.3 *ms* |
| | | | | | | |
| [**YOLOv7-W6**](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-w6.pt) | 1280 | **54.9%** | **72.6%** | **60.1%** | 84 *fps* | 7.6 *ms* |
| [**YOLOv7-E6**](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt) | 1280 | **56.0%** | **73.5%** | **61.2%** | 56 *fps* | 12.3 *ms* |
| [**YOLOv7-D6**](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-d6.pt) | 1280 | **56.6%** | **74.0%** | **61.8%** | 44 *fps* | 15.0 *ms* |
| [**YOLOv7-E6E**](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6e.pt) | 1280 | **56.8%** | **74.4%** | **62.1%** | 36 *fps* | 18.7 *ms* |
## Installation
Docker environment (recommended)
<details><summary> <b>Expand</b> </summary>
``` shell
# create the docker container, you can change the share memory size if you have more.
nvidia-docker run --name yolov7 -it -v your_coco_path/:/coco/ -v your_code_path/:/yolov7 --shm-size=64g nvcr.io/nvidia/pytorch:21.08-py3
# apt install required packages
apt update
apt install -y zip htop screen libgl1-mesa-glx
# pip install required packages
pip install seaborn thop
# go to code folder
cd /yolov7
```
</details>
## Testing
[`yolov7.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt) [`yolov7x.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x.pt) [`yolov7-w6.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-w6.pt) [`yolov7-e6.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt) [`yolov7-d6.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-d6.pt) [`yolov7-e6e.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6e.pt)
``` shell
python test.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.65 --device 0 --weights yolov7.pt --name yolov7_640_val
```
You will get the results:
```
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.51206
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.69730
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.55521
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.35247
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.55937
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.66693
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.38453
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.63765
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.68772
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.53766
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.73549
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.83868
```
To measure accuracy, download [COCO-annotations for Pycocotools](http://images.cocodataset.org/annotations/annotations_trainval2017.zip).
## Training
Data preparation
``` shell
bash scripts/get_coco.sh
```
* Download MS COCO dataset images ([train](http://images.cocodataset.org/zips/train2017.zip), [val](http://images.cocodataset.org/zips/val2017.zip), [test](http://images.cocodataset.org/zips/test2017.zip)) and [labels](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/coco2017labels-segments.zip). If you have previously used a different version of YOLO, we strongly recommend that you delete `train2017.cache` and `val2017.cache` files, and redownload [labels](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/coco2017labels-segments.zip)
Single GPU training
``` shell
# train p5 models
python train.py --workers 8 --device 0 --batch-size 32 --data data/coco.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights '' --name yolov7 --hyp data/hyp.scratch.p5.yaml
# train p6 models
python train_aux.py --workers 8 --device 0 --batch-size 16 --data data/coco.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights '' --name yolov7-w6 --hyp data/hyp.scratch.p6.yaml
```
Multiple GPU training
``` shell
# train p5 models
python -m torch.distributed.launch --nproc_per_node 4 --master_port 9527 train.py --workers 8 --device 0,1,2,3 --sync-bn --batch-size 128 --data data/coco.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights '' --name yolov7 --hyp data/hyp.scratch.p5.yaml
# train p6 models
python -m torch.distributed.launch --nproc_per_node 8 --master_port 9527 train_aux.py --workers 8 --device 0,1,2,3,4,5,6,7 --sync-bn --batch-size 128 --data data/coco.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6.yaml --weights '' --name yolov7-w6 --hyp data/hyp.scratch.p6.yaml
```
## Transfer learning
[`yolov7_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7_training.pt) [`yolov7x_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x_training.pt) [`yolov7-w6_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-w6_training.pt) [`yolov7-e6_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6_training.pt) [`yolov7-d6_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-d6_training.pt) [`yolov7-e6e_training.pt`](https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6e_training.pt)
Single GPU finetuning for custom dataset
``` shell
# finetune p5 models
python train.py --workers 8 --device 0 --batch-size 32 --data data/custom.yaml --img 640 640 --cfg cfg/training/yolov7-custom.yaml --weights 'yolov7_training.pt' --name yolov7-custom --hyp data/hyp.scratch.custom.yaml
# finetune p6 models
python train_aux.py --workers 8 --device 0 --batch-size 16 --data data/custom.yaml --img 1280 1280 --cfg cfg/training/yolov7-w6-custom.yaml --weights 'yolov7-w6_training.pt' --name yolov7-w6-custom --hyp data/hyp.scratch.custom.yaml
```
## Re-parameterization
See [reparameterization.ipynb](tools/reparameterization.ipynb)
## Pose estimation
[`yolov7-w6-pose.pt`](https://github.com/WongKinYiu
没有合适的资源?快使用搜索试试~ 我知道了~
基于yolov7实现瓶子识别检测源码+训练好模型+配置文件+评估指标曲线.zip
共109个文件
yaml:35个
py:26个
jpg:18个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 111 浏览量
2023-01-09
18:41:01
上传
评论 2
收藏 97.48MB ZIP 举报
温馨提示
基于yolov7实现瓶子识别检测源码+训练好模型+配置文件+评估指标曲线.zip 模型识别检测类别为1类 ['瓶子'] 【模型介绍】 1.模型使用的是yolov7-tiny.yaml、hyp.scratch.custom.yam训练 2.模型使用高性能显卡+高质量数据集训练迭代200次得到,识别检测效果和评估指标曲线都不错,实际项目所用,不需要二次训练或者微调,可用作实际项目、课程实验作业、模型效果对比、毕业设计、课程设计等,请放心下载使用!
资源推荐
资源详情
资源评论
收起资源包目录
基于yolov7实现瓶子识别检测源码+训练好模型+配置文件+评估指标曲线.zip (109个子文件)
Dockerfile 821B
YOLOv7trt.ipynb 1.69MB
YOLOv7onnx.ipynb 1.47MB
end2end_tensorrt.ipynb 976KB
end2end_onnxruntime.ipynb 505KB
visualization.ipynb 482KB
instance.ipynb 477KB
keypoint.ipynb 465KB
reparameterization.ipynb 28KB
train_batch3.jpg 289KB
train_batch5.jpg 283KB
train_batch2.jpg 281KB
train_batch6.jpg 279KB
train_batch0.jpg 275KB
train_batch7.jpg 272KB
train_batch8.jpg 269KB
train_batch1.jpg 265KB
train_batch4.jpg 261KB
train_batch9.jpg 258KB
test_batch1_pred.jpg 249KB
test_batch1_labels.jpg 245KB
test_batch2_labels.jpg 243KB
test_batch2_pred.jpg 242KB
test_batch0_labels.jpg 217KB
test_batch0_pred.jpg 216KB
horses_prediction.jpg 151KB
horses.jpg 130KB
LICENSE.md 34KB
README.md 12KB
pose.png 347KB
results.png 213KB
performance.png 165KB
mask.png 102KB
PR_curve.png 85KB
R_curve.png 77KB
confusion_matrix.png 77KB
P_curve.png 77KB
F1_curve.png 76KB
yolov7.pt 72.09MB
best.pt 11.7MB
last.pt 11.7MB
common.py 82KB
loss.py 73KB
datasets.py 55KB
train_aux.py 36KB
train.py 36KB
general.py 36KB
yolo.py 35KB
plots.py 20KB
test.py 17KB
wandb_utils.py 16KB
torch_utils.py 15KB
experimental.py 10KB
metrics.py 9KB
detect.py 9KB
autoanchor.py 7KB
export.py 7KB
add_nms.py 6KB
google_utils.py 5KB
hubconf.py 3KB
activations.py 2KB
resume.py 1KB
log_dataset.py 815B
__init__.py 6B
__init__.py 6B
__init__.py 6B
__init__.py 5B
userdata.sh 1KB
get_coco.sh 820B
mime.sh 780B
results.txt 29KB
操作运行说明.txt 2KB
requirements.txt 950B
additional_requirements.txt 105B
yolov7-e6e.yaml 9KB
yolov7-e6e.yaml 9KB
yolov7-d6.yaml 6KB
yolov7-d6.yaml 6KB
yolov7-e6.yaml 5KB
yolov7-e6.yaml 5KB
yolov7-w6.yaml 5KB
yolov7-w6.yaml 5KB
yolov7-tiny.yaml 5KB
yolov7-tiny.yaml 5KB
yolov7x.yaml 4KB
yolov7x.yaml 4KB
yolov7.yaml 4KB
yolov7.yaml 4KB
yolov7-tiny-silu.yaml 3KB
yolor-w6.yaml 2KB
yolor-p6.yaml 2KB
yolor-d6.yaml 2KB
yolor-e6.yaml 2KB
yolor-csp-x.yaml 2KB
yolor-csp.yaml 2KB
yolov4-csp.yaml 2KB
yolov3-spp.yaml 1KB
yolov3.yaml 1KB
x50-csp.yaml 1KB
coco.yaml 1KB
共 109 条
- 1
- 2
资源评论
- GSkyCoder2024-11-03资源很受用,资源主总结的很全面,内容与描述一致,解决了我当下的问题。
- xinghua_57011982023-09-13总算找到了想要的资源,搞定遇到的大问题,赞赞赞!onnx2024-08-27感谢支持和认可!
onnx
- 粉丝: 9619
- 资源: 5597
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (源码)基于C语言的系统服务框架.zip
- (源码)基于Spring MVC和MyBatis的选课管理系统.zip
- (源码)基于ArcEngine的GIS数据处理系统.zip
- (源码)基于JavaFX和MySQL的医院挂号管理系统.zip
- (源码)基于IdentityServer4和Finbuckle.MultiTenant的多租户身份认证系统.zip
- (源码)基于Spring Boot和Vue3+ElementPlus的后台管理系统.zip
- (源码)基于C++和Qt框架的dearoot配置管理系统.zip
- (源码)基于 .NET 和 EasyHook 的虚拟文件系统.zip
- (源码)基于Python的金融文档智能分析系统.zip
- (源码)基于Java的医药管理系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功