Welcome to our weekly FiftyOne tips and tricks blog where we give practical pointers for using FiftyOne on topics inspired by discussions in the open source community. This week we’ll cover
configuring FiftyOne and
the FiftyOne App to craft your ideal experience working with computer vision data.
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.
[@portabletext/react] Unknown block type "externalImage", specify a component for it in the `components.types` prop
Ok, let’s dive into this week’s tips and tricks!
A primer on configurations
FiftyOne is built for flexibility, customization, and extensibility. Want to integrate with annotation tools? Check out our tight integrations with
CVAT,
Labelbox, and
Label Studio. Want to work with benchmark datasets or evaluation routines? We’ve got you covered with native support for
COCO,
Open Images, and more. FiftyOne integrates seamlessly into a variety of computer vision workflows, allowing you to tailor your experience to your specific needs.
FiftyOne is made up of the FiftyOne Library, which is a software development kit (SDK), and the FiftyOne App, which is a GUI for visualizing and graphically interacting with your computer vision data. With FiftyOne configs, and FiftyOne App configs, each can be configured separately. You get control over everything from databases to ML backends, default file formats, and layout in the app.
Continue reading for some tips and tricks to help you fashion FiftyOne and the FiftyOne App using configs!
Access your configs
The first step on the way to customizing your configs is accessing them. Fortunately, in FiftyOne your config and app config are available in Python as properties.
To see the global FiftyOne config, use
And to get the global app config, run the similar command
Additionally, every session has its own app config, which can be accessed via the config
property:
Learn more about
sessions in the FiftyOne Docs.
Modify your configs
Once you’ve identified your configs, there are multiple ways to modify them. If you want to set the default FiftyOne behavior to displaying progress bars, you can do so either by creating a JSON config file ~/.fiftyone/config.json
with the code:
Or you can the corresponding environment variable from the command line:
Lastly, you can achieve the same effect by setting the config directly in your Python code:
Facilitate your ML workflows
With FiftyOne configs, you can set up FiftyOne for optimized use in your machine learning workflows. When downloading models from the
FiftyOne Model Zoo, sometimes a model has both TensorFlow and PyTorch implementations available. By setting the
default_ml_backend
property in your FiftyOne config, you can specify the preferred ML library to use in these scenarios.
If you prefer Pytorch over TensorFlow, you can make this the default:
Additionally, you can specify what batch size you wish to use, if any, when applying models from the model zoo to datasets. Running this sets the default batch size to 100 samples.
Enable plugins
Plugin configurations are controlled via the ”plugins”
key in the app config. If you want to set the default camera position in the 3D visualizer, you can do so by modifying properties of the ”plugins.3d”
config in ~/.fiftyone/app_config.json
:
When we use the app config to set the default camera position in the 3D visualizer, the
Quickstart Groups dataset looks like this:
Configure the app on a per-dataset basis
In addition to the global app config, each dataset has its own app config, stored in the dataset.app_config
attribute. This allows you to configure behavior in the FiftyOne App on a per-dataset basis!
Continuing on with the 3D visualizer plugin example above, let’s suppose we are working with a bunch of grouped datasets (with point clouds), and for most of them we want to use a default camera position specified in the App config JSON file, with z = 100
so we are looking top-down. However, we have one particular dataset for which we would like the default view to be profile.
We can set the default app config for this dataset in Python without changing the default for the rest of our datasets:
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!