Shortcuts

FiftyOne User GuideΒΆ

Welcome to the FiftyOne User Guide!

Each section in this guide provides an example-centric deep dive into a core feature of FiftyOne, with the goal of getting you up-and-running with FiftyOne on your data quickly and easily.

FiftyOne Dataset basics

Learn about FiftyOne the Dataset class and its relation to Sample, Field, tags and DatasetView.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import fiftyone as fo

dataset = fo.Dataset(name="my_dataset")
sample = fo.Sample(filepath="path/to/img.png")
dataset.add_sample(sample)
sample.tags += ["train"]
sample["custom_field"] = 51
view = (
    dataset.view()
    .match_tag("test")
    .sort_by("custom_field", reverse=True)
    .limit(1)
)
for sample in view:
    print(sample)

Creating FiftyOne Datasets

Get your data into a FiftyOne Dataset using standard formats, custom formats, or load an open-source dataset via the Dataset Zoo.

1
2
3
4
5
dataset = fo.Dataset.from_dir(
    dataset_dir="/path/to/dataset",
    dataset_type=fo.types.COCODetectionDataset,
    name="my-coco-format-dataset",
)

Using datasets

Use a FiftyOne Dataset to search, sort, and modify your data:

1
2
3
4
5
6
7
view = (
    dataset.view()
    .match({"tags": "test"})
    .exists("metadata")
    .sort_by("filepath")
    .limit(5)
)

Exporting datasets

Export your dataset to disk in any number of formats.

1
dataset.export(export_dir, dataset_type=fo.types.COCODetectionDataset)

Visualizing datasets in the App

Visualize your dataset in the FiftyOne App and visualize your changes to it in real-time.

App

FiftyOne Brain

Use the FiftyOne Brain to automatically get insights into your Dataset

1
2
3
4
import fiftyone.brain as fob

fob.compute_uniqueness(dataset)
rank_view = dataset.view().sort_by("uniqueness")