MyGit

v6.2

ultralytics/yolov5

版本发布时间: 2022-08-17 18:26:05

ultralytics/yolov5最新发布版本:v7.0(2022-11-22 23:29:09)


This release incorporates 401 PRs from 41 contributors since our last release in February 2022. It adds Classification training, validation, prediction and export (to all 11 formats), and also provides ImageNet-pretrained YOLOv5m-cls, ResNet (18, 34, 50, 101) and EfficientNet (b0-b3) models.

My main goal with this release is to introduce super simple YOLOv5 classification workflows just like our existing object detection models. The new v6.2 YOLOv5-cls models below are just a start, we will continue to improve these going forward together with our existing detection models. We'd love your contributions on this effort!

Our next release, v6.3 is scheduled for September and will bring official instance segmentation support to YOLOv5, with a major v7.0 release later this year updating architectures across all 3 tasks - classification, detection and segmentation.

Important Updates

New Classification Checkpoints

We trained YOLOv5-cls classification models on ImageNet for 90 epochs using a 4xA100 instance, and we trained ResNet and EfficientNet models alongside with the same default training settings to compare. We exported all models to ONNX FP32 for CPU speed tests and to TensorRT FP16 for GPU speed tests. We ran all speed tests on Google Colab Pro for easy reproducibility.

Model size
(pixels)
accuracy
top1
accuracy
top5
Train time
90 epochs
4x A100 (hours)
Speed
ONNX-CPU
(ms)
Speed
TensorRT-V100
(ms)
params
(M)
FLOPs
@224 (B)
YOLOv5n-cls 224 64.6 85.4 7:59 3.3 0.5 2.5 0.5
YOLOv5s-cls 224 71.5 90.2 8:09 6.6 0.6 5.4 1.4
YOLOv5m-cls 224 75.9 92.9 10:06 15.5 0.9 12.9 3.9
YOLOv5l-cls 224 78.0 94.0 11:56 26.9 1.4 26.5 8.5
YOLOv5x-cls 224 79.0 94.4 15:04 54.3 1.8 48.1 15.9
ResNet18 224 70.3 89.5 6:47 11.2 0.5 11.7 3.7
ResNet34 224 73.9 91.8 8:33 20.6 0.9 21.8 7.4
ResNet50 224 76.8 93.4 11:10 23.4 1.0 25.6 8.5
ResNet101 224 78.5 94.3 17:10 42.1 1.9 44.5 15.9
EfficientNet_b0 224 75.1 92.4 13:03 12.5 1.3 5.3 1.0
EfficientNet_b1 224 76.4 93.2 17:04 14.9 1.6 7.8 1.5
EfficientNet_b2 224 76.6 93.4 17:10 15.9 1.6 9.1 1.7
EfficientNet_b3 224 77.7 94.0 19:19 18.9 1.9 12.2 2.4

New Classification Model Usage Examples

Train

YOLOv5 classification training supports auto-download of MNIST, Fashion-MNIST, CIFAR10, CIFAR100, Imagenette, Imagewoof, and ImageNet datasets with the --data argument. To start training on MNIST for example use --data mnist.

# Single-GPU
python classify/train.py --model yolov5s-cls.pt --data cifar100 --epochs 5 --img 224 --batch 128

# Multi-GPU DDP
python -m torch.distributed.run --nproc_per_node 4 --master_port 1 classify/train.py --model yolov5s-cls.pt --data imagenet --epochs 5 --img 224 --device 0,1,2,3

Val

Validate YOLOv5m-cls accuracy on ImageNet-1k dataset:

bash data/scripts/get_imagenet.sh --val  # download ImageNet val split (6.3G, 50000 images)
python classify/val.py --weights yolov5m-cls.pt --data ../datasets/imagenet --img 224  # validate

Predict

Use pretrained YOLOv5s-cls.pt to predict bus.jpg:

python classify/predict.py --weights yolov5s-cls.pt --data data/images/bus.jpg
model = torch.hub.load('ultralytics/yolov5', 'custom', 'yolov5s-cls.pt')  # load from PyTorch Hub

Export

Export a group of trained YOLOv5s-cls, ResNet and EfficientNet models to ONNX and TensorRT:

python export.py --weights yolov5s-cls.pt resnet50.pt efficientnet_b0.pt --include onnx engine --img 224

Changelog

🛠️ New Features and Bug Fixes (401)
😃 New Contributors (41)

相关地址:原始地址 下载(tar) 下载(zip)

1、 efficientnet_b0.pt 10.34MB

2、 efficientnet_b1.pt 15.23MB

3、 efficientnet_b2.pt 17.74MB

4、 efficientnet_b3.pt 23.77MB

5、 exp10-m-base.pt 63.21MB

6、 exp11m-5056.pt 63.21MB

7、 resnet101.pt 85.42MB

8、 resnet18.pt 22.38MB

9、 resnet34.pt 41.71MB

10、 resnet50.pt 48.98MB

11、 yolov5l-cls.pt 50.88MB

12、 yolov5l-seg.pt 91.9MB

13、 yolov5l.pt 89.29MB

14、 yolov5l6.pt 147.36MB

15、 yolov5m-cls.pt 24.89MB

16、 yolov5m-seg.pt 42.36MB

17、 yolov5m.pt 40.82MB

18、 yolov5m6.pt 68.96MB

19、 yolov5n-cls.pt 4.87MB

20、 yolov5n-seg.pt 4.11MB

21、 yolov5n.pt 3.87MB

22、 yolov5n6.pt 6.86MB

23、 yolov5s-cls.pt 10.52MB

24、 yolov5s-seg.pt 14.87MB

25、 yolov5s.pt 14.12MB

26、 yolov5s6.pt 24.78MB

27、 yolov5x-cls.pt 92.03MB

28、 yolov5x-seg.pt 170.01MB

29、 yolov5x.pt 166.05MB

30、 yolov5x6.pt 269.62MB

查看:2022-08-17发行的版本