![]() |
![]() |
![]() |
Annotating Datasets with Labelbox¶
All successful computer vision projects start with the same thing: LOTS OF LABELED DATA!
In this walkthrough, we’ll cover how to use the integration between FiftyOne and the popular annotation tool Labelbox to build a high-quality labeled dataset.
Specifically, this walkthrough covers:
Using the FiftyOne Brain to select unique samples for annotation
Annotating unlabeled samples with Labelbox
Improving existing annotations using FiftyOne tagging and Labelbox
Additional utilities for managing Labelbox annotation projects
So, what’s the takeaway?
FiftyOne Datasets are the best way to explore, understand, and improve your datasets and models. This walkthrough covers how to use our Labelbox integration to streamline the annotation creation and improvement process.
Setup¶
To get started, you need to install FiftyOne and the Labelbox Python client:
[ ]:
!pip install fiftyone labelbox
You’ll also need to set up a Labelbox account. FiftyOne supports both standard Labelbox cloud accounts and Labelbox enterprise solutions.
The easiest way to get started is to use the default Labelbox server, which simply requires creating an account and then providing your API key as shown below.
[ ]:
!export FIFTYONE_LABELBOX_API_KEY=...
Alternatively, for a more permanent solution, you can store your credentials in your FiftyOne annotation config located at ~/.fiftyone/annotation_config.json
:
[ ]:
{
"backends": {
"labelbox": {
"api_key": ...,
}
}
}
See this page for more advanced Labelbox setup options.
Raw Data¶
To start, you need to gather raw image or video data relevant to your task. The internet has a lot of places to look for free data. Assuming you have your raw data downloaded locally, you can easily load it into FiftyOne.
[2]:
import fiftyone as fo
[ ]:
dataset = fo.Dataset.from_dir(dataset_dir="/path/to/dir", dataset_type=fo.types.ImageDirectory)
Another method is to use publically available datasets that may be relevant. For example, the Open Images dataset contains millions of images available for public use and can be accessed directly through the FiftyOne Dataset Zoo.
[3]:
import fiftyone.zoo as foz
[15]:
dataset = foz.load_zoo_dataset(
"open-images-v6",
split="validation",
max_samples=100,
label_types=[],
dataset_name="labelbox_dataset",
)
Downloading split 'validation' to '/home/eric/fiftyone/open-images-v6/validation' if necessary
Necessary images already downloaded
Existing download of split 'validation' is sufficient
Loading 'open-images-v6' split 'validation'
100% |█████████████████| 100/100 [72.9ms elapsed, 0s remaining, 1.4K samples/s]
Dataset 'labelbox_dataset' created
Either way, once your data is in FiftyOne, we can visualize it in the FiftyOne App.
[18]:
session = fo.launch_app(dataset)