datasets/detect/open-images-v7/ #7912
Replies: 10 comments 21 replies
-
Hey Ultralytics Users! Exciting news! 🎉 We've added the Open Images V7 dataset to our collection. It's perfect for enhancing your YOLO models across various applications. What's in it for you? 🌍 Diverse range of categories. Questions or need help? Just ask us! We're here to support your YOLO journey. Happy modeling! 🤖👀 |
Beta Was this translation helpful? Give feedback.
-
I only want to train 2 classes of images. Then how can I access OpenImagesV7.yaml for only two classes? |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for answering my doubt.
…On Fri, Jun 21, 2024, 23:39 Glenn Jocher ***@***.***> wrote:
@naga08krishna <https://github.com/naga08krishna> to train a YOLO model
on only two classes from the Open Images V7 dataset, you can modify the
open-images-v7.yaml file to include only the classes you're interested
in. Here’s how you can do it:
1. *Edit the YAML file*: Create a custom YAML file based on the
original open-images-v7.yaml and include only the two classes you want
to train on.
# Custom Open Images V7 dataset for two classespath: ../datasets/open-images-v7train: images/trainval: images/val
# Classesnames:
0: Airplane
1: Banana
2. *Train the model*: Use this custom YAML file to train your model.
Python Example
from ultralytics import YOLO
# Load a COCO-pretrained YOLOv8n modelmodel = YOLO("yolov8n.pt")
# Train the model on the custom Open Images V7 datasetresults = model.train(data="path/to/custom-open-images-v7.yaml", epochs=100, imgsz=640)
CLI Example
# Train a COCO-pretrained YOLOv8n model on the custom Open Images V7 dataset
yolo detect train data=path/to/custom-open-images-v7.yaml model=yolov8n.pt epochs=100 imgsz=640
This approach ensures that your training process focuses only on the
specified classes. For more details, you can refer to the Open Images V7
documentation
<https://docs.ultralytics.com/datasets/detect/open-images-v7/>.
Feel free to reach out if you have any more questions! 😊
—
Reply to this email directly, view it on GitHub
<#7912 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAV6QX2DCCC2MNMMXL4IJ2TZIRT45AVCNFSM6AAAAABCR3JU3KVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQNBSGY2DC>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi sorry to disturb you but please tell help me in this doubt
After downloading the images, when I try to convert the dataset into yolo
format I am getting below error repeatedly. Please help me in this.
[image: image.png]
[image: image.png]
And also tell me how to divide the dataset into train and validate datasets.
…On Sat, Jun 22, 2024 at 11:35 PM Glenn Jocher ***@***.***> wrote:
Hi @naga08krishna <https://github.com/naga08krishna>,
To train a YOLO model on only vegetable images from the Open Images V7
dataset, you can create a custom YAML file that includes only the classes
you're interested in. Here's how you can do it in Google Colab:
1. *Create a Custom YAML File*: Modify the open-images-v7.yaml to
include only the vegetable classes you need. For example, if you want to
include "Broccoli" and "Carrot", your YAML file would look like this:
# Custom Open Images V7 dataset for vegetable classespath: ../datasets/open-images-v7train: images/trainval: images/val
# Classesnames:
0: Broccoli
1: Carrot
2. *Download and Prepare the Dataset*: Use the fiftyone library to
download and filter the dataset for your specific classes. Here’s a Colab
script to help you get started:
# Install necessary libraries
!pip install fiftyone
import fiftyone as foimport fiftyone.zoo as foz
# Define the classes you want to includeclasses = ["Broccoli", "Carrot"]
# Load the Open Images V7 datasetdataset = foz.load_zoo_dataset(
"open-images-v7",
split="train",
label_types=["detections"],
classes=classes,
max_samples=1000, # Adjust this number based on your needs
dataset_dir="/content/open-images-v7"
)
# Export the dataset to YOLO formatdataset.export(
export_dir="/content/open-images-v7-yolo",
dataset_type=fo.types.YOLOv5Dataset,
label_field="detections",
classes=classes,
split="train"
)
3. *Train the Model*: Use the custom YAML file to train your model.
Python Example
from ultralytics import YOLO
# Load a COCO-pretrained YOLOv8n modelmodel = YOLO("yolov8n.pt")
# Train the model on the custom Open Images V7 datasetresults = model.train(data="/content/open-images-v7-yolo/custom-open-images-v7.yaml", epochs=100, imgsz=640)
CLI Example
# Train a COCO-pretrained YOLOv8n model on the custom Open Images V7 dataset
yolo detect train data=/content/open-images-v7-yolo/custom-open-images-v7.yaml model=yolov8n.pt epochs=100 imgsz=640
This approach ensures that your training process focuses only on the
specified vegetable classes. For more details, you can refer to the Open
Images V7 documentation
<https://docs.ultralytics.com/datasets/detect/open-images-v7/>.
Feel free to reach out if you have any more questions! 😊
—
Reply to this email directly, view it on GitHub
<#7912 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAV6QX2UTYJPQL6VRYD25T3ZIW4GJAVCNFSM6AAAAABCR3JU3KVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQNBYGIZTE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I have converted the dataset into yolo format but all the images are in the
training set only. Please tell me how to divide the dataset into training
and validate datasets
On Mon, Jun 24, 2024, 22:56 Naga Krishna Reddy ***@***.***>
wrote:
… Hi sorry to disturb you but please tell help me in this doubt
After downloading the images, when I try to convert the dataset into yolo
format I am getting below error repeatedly. Please help me in this.
[image: image.png]
[image: image.png]
And also tell me how to divide the dataset into train and validate
datasets.
On Sat, Jun 22, 2024 at 11:35 PM Glenn Jocher ***@***.***>
wrote:
> Hi @naga08krishna <https://github.com/naga08krishna>,
>
> To train a YOLO model on only vegetable images from the Open Images V7
> dataset, you can create a custom YAML file that includes only the classes
> you're interested in. Here's how you can do it in Google Colab:
>
> 1. *Create a Custom YAML File*: Modify the open-images-v7.yaml to
> include only the vegetable classes you need. For example, if you want to
> include "Broccoli" and "Carrot", your YAML file would look like this:
>
> # Custom Open Images V7 dataset for vegetable classespath: ../datasets/open-images-v7train: images/trainval: images/val
> # Classesnames:
> 0: Broccoli
> 1: Carrot
>
>
> 2. *Download and Prepare the Dataset*: Use the fiftyone library to
> download and filter the dataset for your specific classes. Here’s a Colab
> script to help you get started:
>
> # Install necessary libraries
> !pip install fiftyone
> import fiftyone as foimport fiftyone.zoo as foz
> # Define the classes you want to includeclasses = ["Broccoli", "Carrot"]
> # Load the Open Images V7 datasetdataset = foz.load_zoo_dataset(
> "open-images-v7",
> split="train",
> label_types=["detections"],
> classes=classes,
> max_samples=1000, # Adjust this number based on your needs
> dataset_dir="/content/open-images-v7"
> )
> # Export the dataset to YOLO formatdataset.export(
> export_dir="/content/open-images-v7-yolo",
> dataset_type=fo.types.YOLOv5Dataset,
> label_field="detections",
> classes=classes,
> split="train"
> )
>
>
> 3. *Train the Model*: Use the custom YAML file to train your model.
>
> Python Example
>
> from ultralytics import YOLO
> # Load a COCO-pretrained YOLOv8n modelmodel = YOLO("yolov8n.pt")
> # Train the model on the custom Open Images V7 datasetresults = model.train(data="/content/open-images-v7-yolo/custom-open-images-v7.yaml", epochs=100, imgsz=640)
>
> CLI Example
>
> # Train a COCO-pretrained YOLOv8n model on the custom Open Images V7 dataset
> yolo detect train data=/content/open-images-v7-yolo/custom-open-images-v7.yaml model=yolov8n.pt epochs=100 imgsz=640
>
> This approach ensures that your training process focuses only on the
> specified vegetable classes. For more details, you can refer to the Open
> Images V7 documentation
> <https://docs.ultralytics.com/datasets/detect/open-images-v7/>.
>
> Feel free to reach out if you have any more questions! 😊
>
> —
> Reply to this email directly, view it on GitHub
> <#7912 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BAV6QX2UTYJPQL6VRYD25T3ZIW4GJAVCNFSM6AAAAABCR3JU3KVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQNBYGIZTE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***
> com>
>
|
Beta Was this translation helpful? Give feedback.
-
I have downloaded and used the Ultralytics Open Images V7 Pretrained Models and they work great. However when I export to CoreML to use with XCode, the results are very different and much worse. There are many many more predictions and they're way off, the image attached predicted Snake, Treadmill, dumbell, Tent and many more at 99-100% confidence. See the images below for example of the output with the model as is and then converted to mlpackage format. Is there something wrong with the conversion process? My python code here: from ultralytics import YOLO model = YOLO("yolov8x-oiv7.pt") # load model model.export(format="coreml",nms=True) # convert model |
Beta Was this translation helpful? Give feedback.
-
For the pretrained Oi7 models, what hyperparameters were used? Was it the |
Beta Was this translation helpful? Give feedback.
-
I am trying to train the YOLOv8m model using python for selected classes. Here's my YAML file: # Ultralytics YOLO 🚀, AGPL-3.0 license
# Open Images v7 dataset https://storage.googleapis.com/openimages/web/index.html by Google
# Documentation: https://docs.ultralytics.com/datasets/detect/open-images-v7/
# Example usage: yolo train data=open-images-v7.yaml
# parent
# ├── ultralytics
# └── datasets
# └── open-images-v7 ← downloads here (561 GB)
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: fiftyone/open-images-v7 # dataset root dir
train: train # train images (relative to 'path') 1743042 images
val: validation # val images (relative to 'path') 41620 images
test: # test images (optional)
# Classes
names:
0: Bathroom accessory
1: Bathroom cabinet
2: Bathtub
3: Bed
4: Bench
.....
159: Wine glass
160: Wine rack
161: Wood-burning stove
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
from ultralytics.utils import LOGGER, SETTINGS, Path, is_ubuntu, get_ubuntu_version
from ultralytics.utils.checks import check_requirements, check_version
check_requirements('fiftyone')
if is_ubuntu() and check_version(get_ubuntu_version(), '>=22.04'):
# Ubuntu>=22.04 patch https://github.com/voxel51/fiftyone/issues/2961#issuecomment-1666519347
check_requirements('fiftyone-db-ubuntu2204')
import fiftyone as fo
import fiftyone.zoo as foz
import warnings
classes_list = ["Bathroom accessory","Bathroom cabinet","Bathtub","Bed", "Bench", "Bidet", "Blender", "Book", "Bookcase", "Bowl", "Box", "Bronze sculpture>
name = 'open-images-v7'
fraction = 1.0 # fraction of full dataset to use
LOGGER.warning('WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...')
for split in 'train', 'validation': # 1743042 train, 41620 val images
train = split == 'train'
# Load Open Images dataset
dataset = foz.load_zoo_dataset(name,
split=split,
label_types=['detections'],
classes = classes_list,
dataset_dir=Path(SETTINGS['datasets_dir']) / 'fiftyone' / name,
max_samples=round((1743042 if train else 41620) * fraction))
# Define classes
if train:
classes = dataset.default_classes # all classes
# classes = dataset.distinct('ground_truth.detections.label') # only observed classes
# Export to YOLO format
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=UserWarning, module="fiftyone.utils.yolo")
dataset.export(export_dir=str(Path(SETTINGS['datasets_dir']) / name),
dataset_type=fo.types.YOLOv5Dataset,
label_field='ground_truth',
split='val' if split == 'validation' else split,
classes=classes,
overwrite=train) I am running into this error after the first epoch:
I cannot figure out how to fix this error. |
Beta Was this translation helpful? Give feedback.
-
Install necessary libraries!pip install fiftyone import fiftyone as fo Define the classes you want to includeclasses = ["Broccoli", "Carrot"] Load the Open Images V7 datasetdataset = foz.load_zoo_dataset( Export the dataset to YOLO formatdataset.export( |
Beta Was this translation helpful? Give feedback.
-
Hello I'm Abinaya I want selective classes in Open Images v7 dataset I use class Id to extract spacific classes but it not work it detect all the the defult classes I want only selected class, I don't have training spcilities please can some one help me |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
datasets/detect/open-images-v7/
Dive into Google's Open Images V7, a comprehensive dataset offering a broad scope for computer vision research. Understand its usage with deep learning models.
https://docs.ultralytics.com/datasets/detect/open-images-v7/
Beta Was this translation helpful? Give feedback.
All reactions