Improve classification comments (#8997)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-08-17 15:33:37 +02:00
1 parent d3ea0df8b9
commit e617569107
5 files changed
+16 -13

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
Run classification inference on images
Usage:
$ python classify/predict.py --weights yolov5s-cls.pt --source im.jpg
$ python classify/predict.py --weights yolov5s-cls.pt --source data/images/bus.jpg
"""
import argparse
+3 -1
View File
@@ -2,8 +2,10 @@
"""
Train a YOLOv5 classifier model on a classification dataset
Datasets: --data mnist, fashion-mnist, cifar10, cifar100, imagenette, imagewoof, imagenet, or 'path/to/custom/dataset'
YOLOv5-cls models: --model yolov5n-cls.pt, yolov5s-cls.pt, yolov5m-cls.pt, yolov5l-cls.pt, yolov5x-cls.pt
Torchvision models: --model resnet50, efficientnet_b0, etc. See https://pytorch.org/vision/stable/models.html
Usage:
Usage - Single-GPU and Multi-GPU DDP
$ python classify/train.py --model yolov5s-cls.pt --data cifar100 --epochs 5 --img 128
$ 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
"""
+2 -1
View File
@@ -3,7 +3,8 @@
Validate a classification model on a dataset
Usage:
$ python classify/val.py --weights yolov5s-cls.pt --data ../datasets/imagenet
$ 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
"""
import argparse