docs/en/datasets/detect/open-images-v7.md
Open Images V7 is a versatile and expansive dataset championed by Google. Aimed at propelling research in the realm of computer vision, it boasts a vast collection of images annotated with a plethora of data, including image-level labels, object bounding boxes, object segmentation masks, visual relationships, and localized narratives.
<p align="center"> <iframe loading="lazy" width="720" height="405" src="https://www.youtube.com/embed/u3pLlgzUeV8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen> </iframe><strong>Watch:</strong> <a href="https://www.ultralytics.com/glossary/object-detection">Object Detection</a> using OpenImagesV7 Pretrained Model
</p>| Model | size <sup>(pixels)</sup> | mAP<sup>val 50-95</sup> | Speed <sup>CPU ONNX (ms)</sup> | Speed <sup>A100 TensorRT (ms)</sup> | params <sup>(M)</sup> | FLOPs <sup>(B)</sup> | | ----------------------------------------------------------------------------------------- | --------------------------- | -------------------------- | ------------------------------------ | ----------------------------------------- | ------------------------ | ----------------------- | | YOLOv8n | 640 | 18.4 | 142.4 | 1.21 | 3.5 | 10.5 | | YOLOv8s | 640 | 27.7 | 183.1 | 1.40 | 11.4 | 29.7 | | YOLOv8m | 640 | 33.6 | 408.5 | 2.26 | 26.2 | 80.6 | | YOLOv8l | 640 | 34.9 | 596.9 | 2.43 | 44.1 | 167.4 | | YOLOv8x | 640 | 36.3 | 860.6 | 3.56 | 68.7 | 260.6 |
You can use these pretrained models for inference or fine-tuning as follows.
!!! example "Pretrained Model Usage Example"
=== "Python"
```python
from ultralytics import YOLO
# Load an Open Images Dataset V7 pretrained YOLOv8n model
model = YOLO("yolov8n-oiv7.pt")
# Run prediction
results = model.predict(source="image.jpg")
# Start training from the pretrained checkpoint
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
# Predict using an Open Images Dataset V7 pretrained model
yolo detect predict source=image.jpg model=yolov8n-oiv7.pt
# Start training from an Open Images Dataset V7 pretrained checkpoint
yolo detect train data=coco8.yaml model=yolov8n-oiv7.pt epochs=100 imgsz=640
```
Open Images V7 is structured in multiple components catering to varied computer vision challenges:
Open Images V7 is a cornerstone for training and evaluating state-of-the-art models in various computer vision tasks. The dataset's broad scope and high-quality annotations make it indispensable for researchers and developers specializing in computer vision.
Some key applications include:
Ultralytics maintains an open-images-v7.yaml file that specifies the dataset paths, class names, and other configuration details required for training.
!!! example "OpenImagesV7.yaml"
```yaml
--8<-- "ultralytics/cfg/datasets/open-images-v7.yaml"
```
To train a YOLO26n model on the Open Images V7 dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model Training page.
!!! warning
The complete Open Images V7 dataset comprises 1,743,042 training images and 41,620 validation images, requiring approximately **561 GB of storage space** upon download.
Executing the commands provided below will trigger an automatic download of the full dataset if it's not already present locally. Before running the below example it's crucial to:
- Verify that your device has enough storage capacity.
- Ensure a robust and speedy internet connection.
!!! example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
# Load a COCO-pretrained YOLO26n model
model = YOLO("yolo26n.pt")
# Train the model on the Open Images V7 dataset
results = model.train(data="open-images-v7.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
# Train a COCO-pretrained YOLO26n model on the Open Images V7 dataset
yolo detect train data=open-images-v7.yaml model=yolo26n.pt epochs=100 imgsz=640
```
Illustrations of the dataset help provide insights into its richness:
Researchers can gain invaluable insights into the array of computer vision challenges that the dataset addresses, from basic object detection to intricate relationship identification. The diversity of annotations makes Open Images V7 particularly valuable for developing models that can understand complex visual scenes.
For those employing Open Images V7 in their work, it's prudent to cite the relevant papers and acknowledge the creators:
!!! quote ""
=== "BibTeX"
```bibtex
@article{OpenImages,
author = {Alina Kuznetsova and Hassan Rom and Neil Alldrin and Jasper Uijlings and Ivan Krasin and Jordi Pont-Tuset and Shahab Kamali and Stefan Popov and Matteo Malloci and Alexander Kolesnikov and Tom Duerig and Vittorio Ferrari},
title = {The Open Images Dataset V4: Unified image classification, object detection, and visual relationship detection at scale},
year = {2020},
journal = {IJCV}
}
```
A heartfelt acknowledgment goes out to the Google AI team for creating and maintaining the Open Images V7 dataset. For a deep dive into the dataset and its offerings, navigate to the official Open Images V7 website.
Open Images V7 is an extensive and versatile dataset created by Google, designed to advance research in computer vision. It includes image-level labels, object bounding boxes, object segmentation masks, visual relationships, and localized narratives, making it ideal for various computer vision tasks such as object detection, segmentation, and relationship detection.
To train a YOLO26 model on the Open Images V7 dataset, you can use both Python and CLI commands. Here's an example of training the YOLO26n model for 100 epochs with an image size of 640:
!!! example "Train Example"
=== "Python"
```python
from ultralytics import YOLO
# Load a COCO-pretrained YOLO26n model
model = YOLO("yolo26n.pt")
# Train the model on the Open Images V7 dataset
results = model.train(data="open-images-v7.yaml", epochs=100, imgsz=640)
```
=== "CLI"
```bash
# Train a COCO-pretrained YOLO26n model on the Open Images V7 dataset
yolo detect train data=open-images-v7.yaml model=yolo26n.pt epochs=100 imgsz=640
```
For more details on arguments and settings, refer to the Training page.
The Open Images V7 dataset includes approximately 9 million images with various annotations:
Ultralytics provides several YOLOv8 pretrained models for the Open Images V7 dataset, each with different sizes and performance metrics:
| Model | size <sup>(pixels)</sup> | mAP<sup>val 50-95</sup> | Speed <sup>CPU ONNX (ms)</sup> | Speed <sup>A100 TensorRT (ms)</sup> | params <sup>(M)</sup> | FLOPs <sup>(B)</sup> | | ----------------------------------------------------------------------------------------- | --------------------------- | -------------------------- | ------------------------------------ | ----------------------------------------- | ------------------------ | ----------------------- | | YOLOv8n | 640 | 18.4 | 142.4 | 1.21 | 3.5 | 10.5 | | YOLOv8s | 640 | 27.7 | 183.1 | 1.40 | 11.4 | 29.7 | | YOLOv8m | 640 | 33.6 | 408.5 | 2.26 | 26.2 | 80.6 | | YOLOv8l | 640 | 34.9 | 596.9 | 2.43 | 44.1 | 167.4 | | YOLOv8x | 640 | 36.3 | 860.6 | 3.56 | 68.7 | 260.6 |
The Open Images V7 dataset supports a variety of computer vision tasks including:
Its comprehensive annotations and broad scope make it suitable for training and evaluating advanced machine learning models, as highlighted in practical use cases detailed in our applications section.