Welcome to our weekly FiftyOne tips and tricks blog where we recap interesting questions and answers that have recently popped up on
Slack,
GitHub, Stack Overflow, and Reddit.
As an open source community, the FiftyOne community is open to all. This means everyone is welcome to ask questions, and everyone is welcome to answer them. Continue reading to see the latest questions asked and answers provided!
Wait, what’s FiftyOne?
FiftyOne is an open source machine learning toolset that enables data science teams to improve the performance of their computer vision models by helping them curate high quality datasets, evaluate models, find mistakes, visualize embeddings, and get to production faster.
Ok, let’s dive into this week’s tips and tricks!
Annotating and labeling images with FiftyOne
Community Slack member Martin asked:
Can FiftyOne be used to annotate or label images?
FiftyOne is not an annotation tool
per se, but it does integrate with a variety of popular annotation tools like
CVAT,
Label Studio,
Labelbox and
V7.
With these integrations, FiftyOne provides an API to create tasks and jobs, upload data, define label schemas, and download annotations programmatically in Python. For example, let’s create annotation tasks in CVAT:
Then, once the annotation work is complete, we merge the annotations back into FiftyOne:
Using a FiftyOne Plugin to save image files
Community Slack member Victoria asked:
I'm trying to build a custom FiftyOne Plugin and want to execute a bash command that saves images to the file system. Where are the files actually being stored? My command looks like this:
If you are using a virtual environment (recommended), by default they should be saved to something similar to:
/Users/username/miniconda3/envs/fo/lib/python3.10/site-packages/fiftyone/server
For more information on how to use the file explorer capabilities of plugins, check out the FiftyOne Plugin code for IO
on GitHub.Returning JSON when working with the AnnotationResults class
Community Slack member ZKW asked:
It would be great if the class AnnotationResults
had an instance method like to_json()
that would return JSON that could be converted into AnnotationResults
. Is there a possible workaround you can suggest?
Two options to try here. You can call results.serialize()
to get a JSON dict of the results object and there's also a results.write_json()
that you can use to write the results to a file. To see the docstring in a notebook use:
Adding a detector model to FiftyOne
Community Slack member John T asked:
Is it possible to use my own detector model and add it to FiftyOne's inference
functionality?
A rough code example might look something like this:
Adding RGB colors to classes in a point cloud
Community Slack member Nadu asked:
I'm using FiftyOne with a point cloud dataset. I want to add labels and give a color to each class in the point cloud? Is this possible?