Reformat Markdown code blocks (#12795)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-05-18 18:58:06 +02:00 committed by GitHub
parent 2af71d15a6
commit fceea033ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
128 changed files with 1067 additions and 1018 deletions

View file

@ -36,10 +36,10 @@ To train a YOLO model on the Caltech-101 dataset for 100 epochs, you can use the
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='caltech101', epochs=100, imgsz=416)
results = model.train(data="caltech101", epochs=100, imgsz=416)
```
=== "CLI"

View file

@ -36,10 +36,10 @@ To train a YOLO model on the Caltech-256 dataset for 100 epochs, you can use the
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='caltech256', epochs=100, imgsz=416)
results = model.train(data="caltech256", epochs=100, imgsz=416)
```
=== "CLI"

View file

@ -39,10 +39,10 @@ To train a YOLO model on the CIFAR-10 dataset for 100 epochs with an image size
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='cifar10', epochs=100, imgsz=32)
results = model.train(data="cifar10", epochs=100, imgsz=32)
```
=== "CLI"

View file

@ -39,10 +39,10 @@ To train a YOLO model on the CIFAR-100 dataset for 100 epochs with an image size
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='cifar100', epochs=100, imgsz=32)
results = model.train(data="cifar100", epochs=100, imgsz=32)
```
=== "CLI"

View file

@ -53,10 +53,10 @@ To train a CNN model on the Fashion-MNIST dataset for 100 epochs with an image s
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='fashion-mnist', epochs=100, imgsz=28)
results = model.train(data="fashion-mnist", epochs=100, imgsz=28)
```
=== "CLI"

View file

@ -49,10 +49,10 @@ To train a deep learning model on the ImageNet dataset for 100 epochs with an im
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='imagenet', epochs=100, imgsz=224)
results = model.train(data="imagenet", epochs=100, imgsz=224)
```
=== "CLI"

View file

@ -35,10 +35,10 @@ To test a deep learning model on the ImageNet10 dataset with an image size of 22
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='imagenet10', epochs=5, imgsz=224)
results = model.train(data="imagenet10", epochs=5, imgsz=224)
```
=== "CLI"

View file

@ -37,10 +37,10 @@ To train a model on the ImageNette dataset for 100 epochs with a standard image
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='imagenette', epochs=100, imgsz=224)
results = model.train(data="imagenette", epochs=100, imgsz=224)
```
=== "CLI"
@ -72,10 +72,10 @@ To use these datasets, simply replace 'imagenette' with 'imagenette160' or 'imag
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model with ImageNette160
results = model.train(data='imagenette160', epochs=100, imgsz=160)
results = model.train(data="imagenette160", epochs=100, imgsz=160)
```
=== "CLI"
@ -93,10 +93,10 @@ To use these datasets, simply replace 'imagenette' with 'imagenette160' or 'imag
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model with ImageNette320
results = model.train(data='imagenette320', epochs=100, imgsz=320)
results = model.train(data="imagenette320", epochs=100, imgsz=320)
```
=== "CLI"

View file

@ -34,10 +34,10 @@ To train a CNN model on the ImageWoof dataset for 100 epochs with an image size
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='imagewoof', epochs=100, imgsz=224)
results = model.train(data="imagewoof", epochs=100, imgsz=224)
```
=== "CLI"
@ -63,13 +63,13 @@ To use these variants in your training, simply replace 'imagewoof' in the datase
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# For medium-sized dataset
model.train(data='imagewoof320', epochs=100, imgsz=224)
model.train(data="imagewoof320", epochs=100, imgsz=224)
# For small-sized dataset
model.train(data='imagewoof160', epochs=100, imgsz=224)
model.train(data="imagewoof160", epochs=100, imgsz=224)
```
It's important to note that using smaller images will likely yield lower performance in terms of classification accuracy. However, it's an excellent way to iterate quickly in the early stages of model development and prototyping.

View file

@ -86,10 +86,10 @@ This structured approach ensures that the model can effectively learn from well-
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='path/to/dataset', epochs=100, imgsz=640)
results = model.train(data="path/to/dataset", epochs=100, imgsz=640)
```
=== "CLI"

View file

@ -42,10 +42,10 @@ To train a CNN model on the MNIST dataset for 100 epochs with an image size of 3
from ultralytics import YOLO
# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)
model = YOLO("yolov8n-cls.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data='mnist', epochs=100, imgsz=32)
results = model.train(data="mnist", epochs=100, imgsz=32)
```
=== "CLI"