<div align="center">
<p>
<a align="left" href="https://ultralytics.com/yolov5" target="_blank">
<img width="850" src="https://github.com/ultralytics/yolov5/releases/download/v1.0/splash.jpg"></a>
</p>
English | [ç®ä½ä¸æ](.github/README_cn.md)
<br>
<div>
<a href="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml"><img src="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml/badge.svg" alt="CI CPU testing"></a>
<a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="YOLOv5 Citation"></a>
<a href="https://hub.docker.com/r/ultralytics/yolov5"><img src="https://img.shields.io/docker/pulls/ultralytics/yolov5?logo=docker" alt="Docker Pulls"></a>
<br>
<a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
<a href="https://www.kaggle.com/ultralytics/yolov5"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
<a href="https://join.slack.com/t/ultralytics/shared_invite/zt-w29ei8bp-jczz7QYUmDtgo6r6KcMIAg"><img src="https://img.shields.io/badge/Slack-Join_Forum-blue.svg?logo=slack" alt="Join Forum"></a>
</div>
<br>
<p>
YOLOv5 ð is a family of object detection architectures and models pretrained on the COCO dataset, and represents <a href="https://ultralytics.com">Ultralytics</a>
open-source research into future vision AI methods, incorporating lessons learned and best practices evolved over thousands of hours of research and development.
</p>
<div align="center">
<a href="https://github.com/ultralytics" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-github.png" width="2%" alt="" /></a>
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="2%" alt="" />
<a href="https://www.linkedin.com/company/ultralytics" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-linkedin.png" width="2%" alt="" /></a>
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="2%" alt="" />
<a href="https://twitter.com/ultralytics" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-twitter.png" width="2%" alt="" /></a>
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="2%" alt="" />
<a href="https://www.producthunt.com/@glenn_jocher" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-producthunt.png" width="2%" alt="" /></a>
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="2%" alt="" />
<a href="https://youtube.com/ultralytics" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-youtube.png" width="2%" alt="" /></a>
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="2%" alt="" />
<a href="https://www.facebook.com/ultralytics" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-facebook.png" width="2%" alt="" /></a>
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-transparent.png" width="2%" alt="" />
<a href="https://www.instagram.com/ultralytics/" style="text-decoration:none;">
<img src="https://github.com/ultralytics/assets/raw/master/social/logo-social-instagram.png" width="2%" alt="" /></a>
</div>
<!--
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
<img width="800" src="https://github.com/ultralytics/yolov5/releases/download/v1.0/banner-api.png"></a>
-->
</div>
## <div align="center">Documentation</div>
See the [YOLOv5 Docs](https://docs.ultralytics.com) for full documentation on training, testing and deployment.
## <div align="center">Quick Start Examples</div>
<details open>
<summary>Install</summary>
Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a
[**Python>=3.7.0**](https://www.python.org/) environment, including
[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
```bash
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
```
</details>
<details open>
<summary>Inference</summary>
YOLOv5 [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36) inference. [Models](https://github.com/ultralytics/yolov5/tree/master/models) download automatically from the latest
YOLOv5 [release](https://github.com/ultralytics/yolov5/releases).
```python
import torch
# Model
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # or yolov5n - yolov5x6, custom
# Images
img = 'https://ultralytics.com/images/zidane.jpg' # or file, Path, PIL, OpenCV, numpy, list
# Inference
results = model(img)
# Results
results.print() # or .show(), .save(), .crop(), .pandas(), etc.
```
</details>
<details>
<summary>Inference with detect.py</summary>
`detect.py` runs inference on a variety of sources, downloading [models](https://github.com/ultralytics/yolov5/tree/master/models) automatically from
the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`.
```bash
python detect.py --source 0 # webcam
img.jpg # image
vid.mp4 # video
path/ # directory
'path/*.jpg' # glob
'https://youtu.be/Zgi9g1ksQHc' # YouTube
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
```
</details>
<details>
<summary>Training</summary>
The commands below reproduce YOLOv5 [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh)
results. [Models](https://github.com/ultralytics/yolov5/tree/master/models)
and [datasets](https://github.com/ultralytics/yolov5/tree/master/data) download automatically from the latest
YOLOv5 [release](https://github.com/ultralytics/yolov5/releases). Training times for YOLOv5n/s/m/l/x are
1/2/4/6/8 days on a V100 GPU ([Multi-GPU](https://github.com/ultralytics/yolov5/issues/475) times faster). Use the
largest `--batch-size` possible, or pass `--batch-size -1` for
YOLOv5 [AutoBatch](https://github.com/ultralytics/yolov5/pull/5092). Batch sizes shown for V100-16GB.
```bash
python train.py --data coco.yaml --cfg yolov5n.yaml --weights '' --batch-size 128
yolov5s 64
yolov5m 40
yolov5l 24
yolov5x 16
```
<img width="800" src="https://user-images.githubusercontent.com/26833433/90222759-949d8800-ddc1-11ea-9fa1-1c97eed2b963.png">
</details>
<details open>
<summary>Tutorials</summary>
- [Train Custom Data](https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data)Â ð RECOMMENDED
- [Tips for Best Training Results](https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results) âï¸
RECOMMENDED
- [Multi-GPU Training](https://github.com/ultralytics/yolov5/issues/475)
- [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36) ð NEW
- [TFLite, ONNX, CoreML, TensorRT Export](https://github.com/ultralytics/yolov5/issues/251) ð
- [Test-Time Augmentation (TTA)](https://github.com/ultralytics/yolov5/issues/303)
- [Model Ensembling](https://github.com/ultralytics/yolov5/issues/318)
- [Model Pruning/Sparsity](https://github.com/ultralytics/yolov5/issues/304)
- [Hyperpar
没有合适的资源?快使用搜索试试~ 我知道了~
YOLOv5调用本地模型推断的Flask应用示例,使用Flask上传图片并调用本地模型推断
共146个文件
py:49个
yaml:47个
txt:13个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 141 浏览量
2024-02-21
16:27:43
上传
评论
收藏 46.92MB ZIP 举报
温馨提示
YOLOv5调用本地模型推断的Flask应用示例,此项目基于yolov5-6.2修改,使用Flask上传图片并调用 本地模型 推断 运行说明 环境配置 conda create yolov5_flask_sample python=3.8 conda activate yolov5_flask_sample pip install -r requirements.txt 在requirements.txt中注释了部分torch、torchvision与非必要module 如果在requirements.txt中不注释torch相关module pip install -r requirements.txt会默认安装CPU版PyTorch 当然若该环境仅用于单次推断不用于训练则CPU版PyTorch足矣 使用如下命令行安装torch 1.13.1
资源推荐
资源详情
资源评论
收起资源包目录
YOLOv5调用本地模型推断的Flask应用示例,使用Flask上传图片并调用本地模型推断 (146个子文件)
setup.cfg 2KB
style.css 423B
Dockerfile 2KB
Dockerfile 821B
Dockerfile-arm64 2KB
Dockerfile-cpu 2KB
.dockerignore 4KB
.gitattributes 75B
.gitignore 4KB
index.html 2KB
tutorial.ipynb 57KB
batch_1_000029.jpg 526KB
bus.jpg 476KB
bus.jpg 476KB
zidane.jpg 165KB
zidane.jpg 165KB
LICENSE 34KB
README.md 29KB
README.md 11KB
README.md 10KB
CONTRIBUTING.md 5KB
README.md 5KB
README.md 2KB
2023-03-20_13-44-37-686458.png 4.27MB
image-20230320134447362.png 1.95MB
image-20230320133758365.png 1.72MB
2023-03-20_13-37-09-344434.png 1.44MB
image-20230320133604463.png 26KB
pytorch.png 11KB
yolov5s6.pt 24.78MB
TACO_yolov5s_300_epochs.pt 14.1MB
dataloaders.py 51KB
general.py 42KB
common.py 36KB
train.py 35KB
export.py 30KB
wandb_utils.py 27KB
tf.py 25KB
plots.py 22KB
val.py 19KB
torch_utils.py 19KB
yolo.py 16KB
train.py 15KB
detect.py 15KB
metrics.py 14KB
augmentations.py 14KB
__init__.py 13KB
loss.py 10KB
clearml_utils.py 7KB
autoanchor.py 7KB
downloads.py 7KB
benchmarks.py 7KB
val.py 7KB
hubconf.py 7KB
voc_label_2.0.py 5KB
hpo.py 5KB
experimental.py 4KB
predict.py 4KB
activations.py 3KB
autobatch.py 3KB
callbacks.py 2KB
app.py 2KB
restapi.py 1KB
sweep.py 1KB
resume.py 1KB
detect.py 1KB
__init__.py 1KB
log_dataset.py 1KB
makeTxt_2.0.py 1012B
config.py 418B
common_utils.py 374B
example_request.py 368B
dir_utils.py 350B
extensions.py 147B
testTorchEnv.py 112B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
get_imagenet.sh 2KB
get_coco.sh 2KB
userdata.sh 1KB
mime.sh 780B
get_coco128.sh 618B
download_weights.sh 590B
requirements.txt 1KB
requirements_backup.txt 1KB
additional_requirements.txt 105B
val.txt 0B
test.txt 0B
trainval.txt 0B
train.txt 0B
【训练前请先删除此文件】此处存放xml格式标注文件.txt 0B
val.txt 0B
【训练前请先删除此文件】此处存放生成的yolo格式的txt文件.txt 0B
test.txt 0B
【训练前请先删除此文件】此处存放数据集图片.txt 0B
train.txt 0B
ImageNet.yaml 16KB
共 146 条
- 1
- 2
资源评论
程序员柳
- 粉丝: 7999
- 资源: 1469
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功