YOLOv3

 

CI CPU testing

YOLOv5-P5 640 Figure (click to expand)

Figure Notes (click to expand)
  • GPU Speed measures end-to-end time per image averaged over 5000 COCO val2017 images using a V100 GPU with batch size 32, and includes image preprocessing, PyTorch FP16 inference, postprocessing and NMS.
  • EfficientDet data from google/automl at batch size 8.
  • Reproduce by python test.py --task study --data coco.yaml --iou 0.7 --weights yolov3.pt yolov3-spp.pt yolov3-tiny.pt yolov5l.pt

GPU的速度测量端到端的时间平均超过5000 COCO val2017图像使用V100 GPU,批量32,包括图像预处理、PyTorch FP16推理、后处理和NMS。
批量大小为8时,来自google/automl的高效数据集。
通过python test.py复制–任务研究–数据coco.yaml–iou 0.7–权重yolov3.pt yolov3-spp.pt yolov3-tiny.pt yolov5l.pt

Branch Notice

The ultralytics/yolov3 repository is now divided into two branches:
ultralytics/yolov3存储库现在分为两个分支:

  • Master branch: Forward-compatible with all YOLOv5 models and methods (recommended ✅).
    主分支:向前兼容所有YOLOv5模型和方法(推荐)✅).
$ git clone https://github.com/ultralytics/yolov3  # master branch (default)
  • Archive branch: Backwards-compatible with original darknet .cfg models (no longer maintained ⚠️).
    归档分支:向后兼容原始的darknet
    .cfg模型(不再维护)⚠️).
$ git clone https://github.com/ultralytics/yolov3 -b archive  # archive branch

Pretrained Checkpoints

预训练检查站

Modelsize
(pixels)
mAPval
0.5:0.95
mAPtest
0.5:0.95
mAPval
0.5
Speed
V100 (ms)
params
(M)
FLOPS
640 (B)
YOLOv3-tiny64017.617.634.81.28.813.2
YOLOv364043.343.363.04.161.9156.3
YOLOv3-SPP64044.344.364.64.163.0157.1
YOLOv5l64048.248.266.93.747.0115.4
Table Notes (click to expand)
  • APtest denotes COCO test-dev2017 server results, all other AP results denote val2017 accuracy.
    APtest表示COCO test-dev2017服务器结果,所有其他AP结果表示val2017准确性

  • AP values are for single-model single-scale unless otherwise noted. Reproduce mAP by python test.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65
    *除非另有说明,AP值适用于单模型单比例。通过python test.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65再现地图

  • SpeedGPU averaged over 5000 COCO val2017 images using a GCP n1-standard-16 V100 instance, and includes FP16 inference, postprocessing and NMS. Reproduce speed by python test.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45
    SpeedGPU使用GCP n1-standard-16 V100实例,平均超过5000张COCO val2017图像,包括FP16推理、后处理和NMS。通过python test.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45再现速度

  • All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation).
    所有的检查点都被训练成300个历元,带有默认设置和超参数(没有自动增强)。

Requirements

要求

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:
安装了所有requirements.txt依赖项的Python 3.8或更高版本,包括torch>=1.7。要安装:

$ pip install -r requirements.txt

Tutorials

教程

Environments

环境

YOLOv3 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
YOLOv3可以在以下任何一个最新的验证环境中运行(所有依赖项包括CUDA/CUDNN、Python和PyTorch都已预装):

  • Google Colab and Kaggle notebooks with free GPU: Open In Colab Open In Kaggle
    带有免费GPU的Google Colab和Kaggle笔记本电脑
  • Google Cloud Deep Learning VM. See GCP Quickstart Guide
    谷歌云深度学习虚拟机。请参阅GCP快速入门指南
  • Amazon Deep Learning AMI. See AWS Quickstart Guide
    亚马逊深度学习。请参阅AWS快速入门指南
  • Docker Image. See Docker Quickstart Guide Docker Pulls
    Docker图像。请参阅Docker快速入门指南Docker Pulls

Inference

推论

detect.py runs inference on a variety of sources, downloading models automatically from the latest YOLOv3 release and saving results to runs/detect.
py在各种源上运行推断,从最新的YOLOv3版本自动下载模型,并将结果保存到runs/detect。

$ python detect.py --source 0  # webcam
                            file.jpg  # image 
                            file.mp4  # video
                            path/  # directory
                            path/*.jpg  # glob
                            'https://youtu.be/NUsoVlDFqZg'  # YouTube video
                            'rtsp://example.com/media.mp4'  # RTSP, RTMP, HTTP stream

To run inference on example images in data/images:
要对数据/图像中的示例图像进行推断:

$ python detect.py --source data/images --weights yolov3.pt --conf 0.25

PyTorch Hub

PyTorch中心。

To run batched inference with YOLOv3 and PyTorch Hub:
要使用YOLOv3和PyTorch Hub运行批处理推断:

import torch

# Model
model = torch.hub.load('ultralytics/yolov3', 'yolov3')  # or 'yolov3_spp', 'yolov3_tiny'

# Image
img = 'https://ultralytics.com/images/zidane.jpg'

# Inference
results = model(img)
results.print()  # or .show(), .save()

Training

培训

Run commands below to reproduce results on COCO dataset (dataset auto-downloads on first use). Training times for YOLOv3/YOLOv3-SPP/YOLOv3-tiny are 6/6/2 days on a single V100 (multi-GPU times faster). Use the largest --batch-size your GPU allows (batch sizes shown for 16 GB devices).

运行下面的命令在COCO数据集上重现结果(第一次使用时数据集自动下载)。YOLOv3/YOLOv3 SPP/YOLOv3 tiny在单个V100上的训练时间为6/6/2天(多个GPU的速度快了很多)。使用GPU允许的最大批量大小 --batch-size(为16GB设备显示的批量大小)。

$ python train.py --data coco.yaml --cfg yolov3.yaml      --weights '' --batch-size 24
                                         yolov3-spp.yaml                            24
                                         yolov3-tiny.yaml                           64
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值