yolov3

YOLOv3 in PyTorch > ONNX > CoreML > TFLite
授权协议 GPL-3.0 License
开发语言 Python
所属分类 神经网络/人工智能、 机器学习/深度学习
软件类型 开源软件
地区 不详
投 递 者 谈炳
操作系统 跨平台
开源组织
适用人群 未知
 软件概览
 

CI CPU testing

This repository represents Ultralytics open-source research into future object detection methods, and incorporates lessons learned and best practices evolved over thousands of hours of training and evolution on anonymized client datasets. All code and models are under active development, and are subject to modification or deletion without notice. Use at your own risk.

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

Branch Notice

The ultralytics/yolov3 repository is now divided into two branches:

$ git clone https://github.com/ultralytics/yolov3  # master branch (default)
  • Archive branch: Backwards-compatible with original darknet *.cfg models (no longer maintained ⚠️ ).
$ git clone https://github.com/ultralytics/yolov3 -b archive  # archive branch

Pretrained Checkpoints

Model size
(pixels)
mAPval
0.5:0.95
mAPtest
0.5:0.95
mAPval
0.5
Speed
V100 (ms)
params
(M)
FLOPS
640 (B)
YOLOv3-tiny 640 17.6 17.6 34.8 1.2 8.8 13.2
YOLOv3 640 43.3 43.3 63.0 4.1 61.9 156.3
YOLOv3-SPP 640 44.3 44.3 64.6 4.1 63.0 157.1
YOLOv5l 640 48.2 48.2 66.9 3.7 47.0 115.4
Table Notes (click to expand)
  • APtest denotes COCO test-dev2017 server results, all other AP results denote val2017 accuracy.
  • 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
  • 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
  • All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation).

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ 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):

Inference

detect.py runs inference on a variety of sources, downloading models automatically from the latest YOLOv3 release and saving results to 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

To run batched inference with YOLOv3 and 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).

$ python train.py --data coco.yaml --cfg yolov3.yaml      --weights '' --batch-size 24
                                         yolov3-spp.yaml                            24
                                         yolov3-tiny.yaml                           64

Citation

About Us

Ultralytics is a U.S.-based particle physics and AI startup with over 6 years of expertise supporting government, academic and business clients. We offer a wide range of vision AI services, spanning from simple expert advice up to delivery of fully customized, end-to-end production solutions, including:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For business inquiries and professional support requests please visit us at https://ultralytics.com.

Contact

Issues should be raised directly in the repository. For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.

 相关资料
  • tfcoreml TensorFlow (TF) to CoreML Converter Dependencies tensorflow >= 1.5.0 coremltools >= 0.8 numpy >= 1.6.2 protobuf >= 3.1.0 six >= 1.10.0 Installation Install From Source To get the latest versi

  • ONNX,即 Open Neural Network Exchange ,是微软和 Facebook 发布的一个深度学习开发工具生态系统,旨在让 AI 开发人员能够随着项目发展而选择正确的工具。 ONNX 所针对的是深度学习开发生态中最关键的问题之一,在任意一个框架上训练的神经网络模型,无法直接在另一个框架上用。开发者需要耗费大量时间精力把模型从一个开发平台移植到另一个。因此,如何实现不同框架之间

  • Since iOS 11, Apple released Core ML framework to help developers integrate machine learning models into applications. The official documentation We've put up the largest collection of machine learnin

  • ONNX Runtime 是一个跨平台的推理和训练机器学习加速器。 ONNX Runtime 推理可以实现更快的客户体验和更低的成本,支持PyTorch和TensorFlow/Keras等深度学习框架的模型,以及scikit-learn、LightGBM、XGBoost等经典机器学习库。ONNX运行时与不同的硬件、驱动程序和操作系统兼容,并通过利用硬件加速器(如适用)以及图形优化和转换,提供最佳性

  • Kaldi-ONNX 是一个将 Kaldi 的模型文件转换为 ONNX 模型的工具。 转换得到的 ONNX 模型可以借助 MACE 框架部署到 Android、iOS、Linux 或者 Windows 设备端进行推理运算。 此工具支持 Kaldi 的 Nnet2 和 Nnet3 模型,大部分 Nnet2 和 Nnet3 组件都已支持。此外,针对 Nnet3, 这个工具也支持将部分描述符(Descr

  • 译者:冯宝宝 本教程将向您展示如何使用ONNX将已从PyTorch导出的神经模型传输模型转换为Apple CoreML格式。这将允许您在Apple设备上轻松运行深度学习模型,在这种情况下,可以从摄像机直播演示。 什么是ONNX ONNX(开放式神经网络交换)是一种表示深度学习模型的开放格式。借助ONNX,AI开发人员可以更轻松地在最先进的工具之间移动模型,并选择最适合它们的组合。ONNX由合作伙伴

  • 译者:冯宝宝 在本教程中,我们将介绍如何使用ONNX将PyTorch中定义的模型转换为ONNX格式,然后将其加载到Caffe2中。一旦进入Caffe2,我们就可以运行模型来仔细检查它是否正确导出,然后我们展示了如何使用Caffe2功能(如移动导出器)在移动设备上执行模型。 在本教程中,你需要安装onnx和Caffe2。您可以使用pip install onnx获取onnx的二进制版本。 注意: 本

  • 最近在搞国产 GPU 的适配 用的 GPU 是 ascend310 遇到一个问题,网上说的都是什么离线模型使用 但是,我想知道的是这个 om 可以用 python 调用推理吗? 比如 onnx 模型可以用 onnxruntime 包调用推理 但是华为的 om 模型怎么用 python 调用?