Are you sure you want to delete this access key?
comments | description | keywords |
---|---|---|
true | Explore the Ultralytics COCO8-Grayscale dataset, a versatile and manageable set of 8 images perfect for testing object detection models and training pipelines. | COCO8-Grayscale, Ultralytics, dataset, object detection, YOLO11, training, validation, machine learning, computer vision |
The Ultralytics COCO8-Grayscale dataset is a compact yet powerful object detection dataset, consisting of the first 8 images from the COCO train 2017 set and converted to grayscale format—4 for training and 4 for validation. This dataset is specifically designed for rapid testing, debugging, and experimentation with YOLO grayscale models and training pipelines. Its small size makes it highly manageable, while its diversity ensures it serves as an effective sanity check before scaling up to larger datasets.
Watch: How to Train Ultralytics YOLO11 on Grayscale Datasets 🚀
COCO8-Grayscale is fully compatible with Ultralytics HUB and YOLO11, enabling seamless integration into your computer vision workflows.
The COCO8-Grayscale dataset configuration is defined in a YAML (Yet Another Markup Language) file, which specifies dataset paths, class names, and other essential metadata. You can review the official coco8-grayscale.yaml
file in the Ultralytics GitHub repository.
!!! note
To train your RGB images in grayscale, you could simply add `channels: 1` to your dataset YAML file. This converts all images to grayscale during training, enabling you to utilize grayscale benefits without requiring a separate dataset.
!!! example "ultralytics/cfg/datasets/coco8-grayscale.yaml"
```yaml
--8<-- "ultralytics/cfg/datasets/coco8-grayscale.yaml"
```
To train a YOLO11n model on the COCO8-Grayscale dataset for 100 epochs with an image size of 640, use the following examples. For a full list of training options, see the YOLO Training documentation.
!!! example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
# Load a pretrained YOLO11n model
model = YOLO("yolo11n.pt")
# Train the model on COCO8-Grayscale
results = model.train(data="coco8-grayscale.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
# Train YOLO11n on COCO8-Grayscale using the command line
yolo detect train data=coco8-grayscale.yaml model=yolo11n.pt epochs=100 imgsz=640
```
Below is an example of a mosaiced training batch from the COCO8-Grayscale dataset:
This technique is especially useful for small datasets like COCO8-Grayscale, as it maximizes the value of each image during training.
If you use the COCO dataset in your research or development, please cite the following paper:
!!! quote ""
=== "BibTeX"
```bibtex
@misc{lin2015microsoft,
title={Microsoft COCO: Common Objects in Context},
author={Tsung-Yi Lin and Michael Maire and Serge Belongie and Lubomir Bourdev and Ross Girshick and James Hays and Pietro Perona and Deva Ramanan and C. Lawrence Zitnick and Piotr Dollár},
year={2015},
eprint={1405.0312},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```
Special thanks to the COCO Consortium for their ongoing contributions to the computer vision community.
The Ultralytics COCO8-Grayscale dataset is designed for rapid testing and debugging of object detection models. With only 8 images (4 for training, 4 for validation), it is ideal for verifying your YOLO training pipelines and ensuring everything works as expected before scaling to larger datasets. Explore the COCO8-Grayscale YAML configuration for more details.
You can train a YOLO11 model on COCO8-Grayscale using either Python or the CLI:
!!! example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
# Load a pretrained YOLO11n model
model = YOLO("yolo11n.pt")
# Train the model on COCO8-Grayscale
results = model.train(data="coco8-grayscale.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
yolo detect train data=coco8-grayscale.yaml model=yolo11n.pt epochs=100 imgsz=640
```
For additional training options, refer to the YOLO Training documentation.
Ultralytics HUB streamlines dataset management, training, and deployment for YOLO models—including COCO8-Grayscale. With features like cloud training, real-time monitoring, and intuitive dataset handling, HUB enables you to launch experiments with a single click and eliminates manual setup hassles. Learn more about Ultralytics HUB and how it can accelerate your computer vision projects.
Mosaic augmentation, as used in COCO8-Grayscale training, combines multiple images into one during each batch. This increases the diversity of objects and backgrounds, helping your YOLO model generalize better to new scenarios. Mosaic augmentation is especially valuable for small datasets, as it maximizes the information available in each training step. For more on this, see the training guide.
To validate your YOLO11 model after training on COCO8-Grayscale, use the model's validation commands in either Python or CLI. This evaluates your model's performance using standard metrics. For step-by-step instructions, visit the YOLO Validation documentation.
Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?