openimage

PHOTO EMBED

Fri Jan 26 2024 16:55:20 GMT+0000 (Coordinated Universal Time)

Saved by @odaat_detailer #python

import fiftyone as fo
from fiftyone.zoo import load_zoo_dataset

def download_vehicle_images():
    # Specify the classes of interest (e.g., vehicles, cars)
    classes_of_interest = ["Car", "Truck", "Motorcycle", "Bus", "Van"]

    # Specify the maximum number of samples you want to download
    max_samples = 100  # You can adjust this number as needed

    # Load the Open Images V7 dataset using FiftyOne
    dataset = load_zoo_dataset(
        "open-images-v7",
        split="validation",
        label_types=["detections", "segmentations", "points"],
        classes=classes_of_interest,
        max_samples=max_samples,
    )

    # Save the downloaded dataset
    dataset.export(export_dir="/path/to/save/vehicle/images")

if __name__ == "__main__":
    # Execute the download function
    download_vehicle_images()
content_copyCOPY

https://storage.googleapis.com/openimages/web/download_v7.html