class documentation

The Berkeley Deep Drive (BDD) dataset is one of the largest and most diverse video datasets for autonomous vehicles.

The BDD100K dataset contains 100,000 video clips collected from more than 50,000 rides covering New York, San Francisco Bay Area, and other regions. The dataset contains diverse scene types such as city streets, residential areas, and highways. Furthermore, the videos were recorded in diverse weather conditions at different times of the day.

The videos are split into training (70K), validation (10K) and testing (20K) sets. Each video is 40 seconds long with 720p resolution and a frame rate of 30fps. The frame at the 10th second of each video is annotated for image classification, detection, and segmentation tasks.

This version of the dataset contains only the 100K images extracted from the videos as described above, together with the image classification, detection, and segmentation labels.

In order to load the BDD100K dataset, you must download the source data manually. The directory should be organized in the following format:

source_dir/
    labels/
        bdd100k_labels_images_train.json
        bdd100k_labels_images_val.json
    images/
        100k/
            train/
            test/
            val/

You can register at https://bdd-data.berkeley.edu in order to get links to download the data.

Example usage:

import fiftyone as fo
import fiftyone.zoo as foz

# The path to the source files that you manually downloaded
source_dir = "/path/to/dir-with-bdd100k-files"

dataset = foz.load_zoo_dataset(
    "bdd100k",
    split="validation",
    source_dir=source_dir,
)

session = fo.launch_app(dataset)
Dataset size
7.10 GB
Source
https://bdd-data.berkeley.edu
Parameters
source_dirthe directory containing the manually downloaded BDD100K files
copy_fileswhether to move (False) or create copies (True) of the source files when populating the dataset directory
Method __init__ Undocumented
Instance Variable copy_files Undocumented
Instance Variable source_dir Undocumented
Property name The name of the dataset.
Property requires_manual_download Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Property supported_splits A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Property tags A tuple of tags for the dataset.
Method _download_and_prepare Internal implementation of downloading the dataset and preparing it for use in the given directory.

Inherited from ZooDataset (via FiftyOneDataset):

Static Method get_info_path Returns the path to the ZooDatasetInfo for the dataset.
Static Method has_info Determines whether the directory contains ZooDatasetInfo.
Static Method load_info Loads the ZooDatasetInfo from the given dataset directory.
Method download_and_prepare Downloads the dataset and prepares it for use.
Method get_split_dir Returns the directory for the given split of the dataset.
Method has_split Whether the dataset has the given split.
Method has_tag Whether the dataset has the given tag.
Property has_patches Whether the dataset has patches that may need to be applied to already downloaded files.
Property has_splits Whether the dataset has splits.
Property has_tags Whether the dataset has tags.
Property importer_kwargs A dict of default kwargs to pass to this dataset's fiftyone.utils.data.importers.DatasetImporter.
Property is_remote Whether the dataset is remotely-sourced.
Property parameters An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Property supports_partial_downloads Whether the dataset supports downloading partial subsets of its splits.
Method _get_splits_to_download Undocumented
Method _is_dataset_ready Undocumented
Method _is_split_ready Undocumented
Method _patch_if_necessary Internal method called when an already downloaded dataset may need to be patched.
def __init__(self, source_dir=None, copy_files=True): (source)

Undocumented

copy_files: True = (source)

Undocumented

source_dir: None = (source)

Undocumented

The name of the dataset.

@property
requires_manual_download = (source)

Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.

@property
supported_splits = (source)

A tuple of supported splits for the dataset, or None if the dataset does not have splits.

A tuple of tags for the dataset.

def _download_and_prepare(self, dataset_dir, scratch_dir, split): (source)

Internal implementation of downloading the dataset and preparing it for use in the given directory.

Parameters
dataset_dirthe directory in which to construct the dataset. If a split is provided, this is the directory for the split
scratch_dira scratch directory to use to download and prepare any required intermediate files
splitthe split to download, or None if the dataset does not have splits
Returns
tuple of
  • dataset_type: the fiftyone.types.Dataset type of the dataset
  • num_samples: the number of samples in the split. For datasets that support partial downloads, this can be None, which indicates that all content was already downloaded
  • classes: an optional list of class label strings