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.
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!
Counting classes using the FiftyOne API
Community Slack member Nahid asked,
“Is there a way to show the count of different classes in a YOLOv5 dataset with the FiftyOne API programmatically?”
Although this can be easily done in the UI, you get a similar result with the API with something like:
For more information about the
count_values
function, check out
the Docs.Adding predictions to videos
Community Slack member Stan asked,
“I want to use FiftyOne to add predictions to all the videos in my video dataset. Is there a way around extracting the frames first or having to rematch the frames to the video in the video dataset?”
There are two potential patterns you could build off of. The first one is applicable if you are using a custom model.
Deleting samples with uniqueness less than some value
Community Slack member ZKW asked,
“Is there a method that would allow me to delete samples with uniqueness less than 0.2 in a dataset?”
Here is one way to get the job done:
Adding a VOC label to a sample
Community Slack member ht asked,
“I have an existing dataset in the following structure:
├── labels
├── left
└── right
With labels
containing .xml file in VOC format (boundingbox) and left
and right
containing images from the left and right view. I would like to create a GroupDataset
. How can I add the VOC label to each sample?”
Check out the fiftyone.utils.voc.VOCAnnotation
class representing a VOC annotations file.
For more information about utilities for working with datasets in VOC format, check out
the Docs.Getting started with model predictions in FiftyOne
Community Slack member NB asked,
“I am new to FiftyOne and exploring how to use it in my model training pipeline which uses TensorFlow Lite. How can I get started?”
Model predictions stored in other formats can always be loaded iteratively through a simple Python loop. The example below shows how to add object detection predictions to a dataset, but plenty of other label types are also supported.
Join the FiftyOne community!
Join the thousands of engineers and data scientists already using FiftyOne to solve some of the most challenging problems in computer vision today!