Frequently Asked Questions¶
Can I open the FiftyOne App in a browser?¶
Yes! In fact, this is the default behavior. Unless you’re working
in a notebook, the App will open in your default
web browser whenever you call
launch_app()
.
Check out the environments guide to see how to use FiftyOne in all common local, remote, cloud, and notebook environments.
Which web browsers does the FiftyOne App support?¶
The FiftyOne App fully supports Chrome, Firefox, and Safari.
You may find success using browsers like Edge, Opera, or Chromium, but your mileage will vary. Internet Explorer is explicitly unsupported at this time.
Why isn’t the App opening? Not connected to a session?¶
When you call fo.launch_app()
to
launch the FiftyOne App, the App will launch
asynchronously and return control to your Python process. The App will then
remain connected until the process exits.
If you are using the App in a script, you should use
session.wait()
to block execution
until you close it manually:
# Launch the App
session = fo.launch_app(...)
# (Perform any additional operations here)
# Blocks execution until the App is closed
session.wait()
If you launch the App in a script without including
session.wait()
, the App’s
connection will close when the script exits, and you will see a message like
“It looks like you are not connected to a session” in the browser tab that was
opened.
Why can’t I open the App from a script on Windows?¶
If you are a Windows user launching the FiftyOne App from a script, you should use the pattern below to avoid multiprocessing issues, since the App is served via a separate process:
import fiftyone as fo
dataset = fo.load_dataset(...)
if __name__ == "__main__":
# Ensures that the App processes are safely launched on Windows
session = fo.launch_app(dataset)
session.wait()
See this section for more details.
Can I use FiftyOne in a notebook?¶
Yes! FiftyOne supports Jupyter Notebooks, Google Colab Notebooks, Databricks Notebooks, and SageMaker Notebooks.
All the usual FiftyOne commands can be run in notebook environments, and the App will launch/update in the output of your notebook cells!
Check out the notebook environment guide for more information about running FiftyOne in notebooks.
Why isn’t the App loading in my cloud notebook?¶
Except for Google Colab and Databricks which have built-in App configuration, when working in a cloud notebook a proxy_url should be set in your FiftyOne App config.
Can I use FiftyOne in a remote notebook?¶
Yes! It is possible to work with a Jupyter notebook in your local browser that is served from a remote machine.
Refer to this section of the environment guide for instructions to achieve this.
Can I restrict access to my remote App instance?¶
By default, remote App sessions will listen to any connection to their ports. However, if desired, you can restrict access to an App session to a particular IP address or hostname by following these instructions.
Why aren’t plots appearing in my notebook?¶
If you are trying to view plots in a Jupyter
notebook but nothing appears after you call plot.show()
, then you likely need
to follow these instructions to install the
proper packages and/or Jupyter notebook extensions.
If the proper packages are installed but plots are still not displaying, try including the following commands in your notebook before creating any plots:
# Ensure that plotly.js is downloaded
import plotly.offline as po
po.init_notebook_mode(connected=True)
Can I access data stored on a remote server?¶
Yes! If you install FiftyOne on both your remote server and local machine, then you can load a dataset remotely and then explore it via an App session on your local machine.
Can I access data stored in the cloud?¶
Yes! Check out FiftyOne Teams.
What operating systems does FiftyOne support?¶
FiftyOne officially supports the latest versions of MacOS and Windows, as well as Amazon Linux 2 and 2023, Debian 9+ (x86_64 only), Ubuntu 18.04+, and RHEL/CentOS 7+.
Note
If installing on Ubuntu 22.04+, Debian, or RHEL/CentOS,
fiftyone-db==0.4.3
must be requested.
pip install fiftyone-db==0.4.3 fiftyone
What image file types are supported?¶
In general, FiftyOne supports all image types supported by your browser, which includes standard image types like JPEG, PNG, and BMP.
Some browsers like Safari natively support other image types such as TIFF, while others do not. You may be able to install a browser extension to work with additional image types, but Voxel51 does not currently recommend any such extensions in particular.
What video file types are supported?¶
Core methods that process videos can generally handle any codec supported by FFmpeg.
The App can play any video codec that is supported by
HTML5 video on your browser,
including MP4 (H.264), WebM, and Ogg. If you try to view a video with an
unsupported codec in the App, you will be prompted to use the
reencode_videos()
utility method
to re-encode the source video so it is viewable in the App.
What label types are supported?¶
FiftyOne provides support for all of the following label types for both image and video datasets:
Check out this guide for simple recipes to load labels in these formats.
What happened to my datasets from previous sessions?¶
By default, datasets are non-persistent, which means they are deleted from the database whenever you exit (all) Python sessions in which you’ve imported FiftyOne.
To make a dataset persistent, set its
persistent
property to
True
:
1 2 3 4 5 6 7 | import fiftyone as fo # This dataset will be deleted when you exit Python dataset = fo.Dataset("test") # Now the dataset is permanent dataset.persistent = True |
See this page for more details about dataset persistence.
Note
FiftyOne does not store the raw data in datasets directly (only the labels), so your source files on disk are never deleted!
Why didn’t changes to my dataset save?¶
Although adding samples to datasets immediately writes them to the
database, remember that any edits that you make to a
sample or its
frame labels will not be written to the database until
you call sample.save()
.
Similarly, setting the properties of a Dataset
object will be immediately
saved, but you must call
dataset.save()
whenever you
edit fields such as info
or
classes
in-place.
Refer to this section for more details about modifying samples and this section for more details about storing dataset-level information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import fiftyone as fo dataset = fo.Dataset(...) new_samples = [...] # Setting a property is automatically saved dataset.persistent = True dataset.info["hello"] = "world" dataset.save() # don't forget this! # Added samples are automatically saved dataset.add_samples(new_samples) for sample in dataset: sample["field"] = 51 sample.save() # don't forget this! |
Can I use FiftyOne in multiple shells?¶
Yes! Any changes you make to a dataset or its samples in one shell will be reflected in the other shells whenever you access that dataset. You can also launch multiple App instances.
Working with the same dataset in multiple shells simultaneously is generally
seamless, even if you are editing the dataset, as the Dataset
class does not
store its Sample
objects in-memory, it loads them from the database only when
they are requested. Therefore, if you add or modify a Sample
in one shell,
you will immediately have access to the updates the next time you request that
Sample
in other shells.
The one exception to this rule is that Dataset
and Sample
objects
themselves are singletons, so if you hold references to these objects
in-memory, they will not be automatically updated by re-accessing them, since
the existing instances will be returned back to you.
If a dataset may have been changed by another process, you can always manually
call Dataset.reload()
to reload
the Dataset
object and all in-memory Sample
instances that belong to it.
Can I launch multiple App instances on a machine?¶
Yes! Simply specify a different port
for each App instance that you create.
# Launch first App instance
fiftyone app launch <dataset1> --port XXXX
# Launch second App instance
fiftyone app launch <dataset2> --port YYYY
1 2 3 4 5 6 7 8 9 10 | import fiftyone as fo # Launch first App instance dataset1 = fo.load_dataset(...) session1 = fo.launch_app(dataset1, port=XXXX) # Launch second App instance # This can be done in either the same or another process dataset2 = fo.load_dataset(...) session2 = fo.launch_app(dataset2, port=YYYY) |
Can I connect multiple App instances to the same dataset?¶
Yes, multiple App instances can be connected to the same Dataset
via remote
sessions.
Note
Keep in mind that all users must have ssh access to the system from which the remote session(s) are launched in order to connect to them.
You can achieve multiple connections in two ways:
Option 1: Same dataset, multiple sessions
The typical way to connect multiple App instances to the same dataset is to
create a separate remote session instance on the machine that houses the
Dataset
of interest for each local App instance that you want to create.
See this FAQ for instructions on
doing this.
Option 2: Same dataset, same session
Another option is to connect multiple App instances to a single remote session.
First, create a remote session on the system that
houses the Dataset
using either the CLI or Python:
# On remote machine
fiftyone app launch <dataset> --remote # (optional) --port XXXX
1 2 3 4 5 6 | # On remote machine import fiftyone as fo dataset = fo.load_dataset(...) session = fo.launch_app(dataset, remote=True) # (optional) port=XXXX |
Then one or more users can use the CLI on their local machine to connect to the remote session.
Note
When multiple App instances are connected to the same Session
, any
actions taken that affect the session (e.g.,
loading a view) will be reflected in all connected
App instances.
Can I connect to multiple remote sessions?¶
Yes, you can launch multiple instances of the App locally, each connected to a different remote session.
The key here is to specify a different local port for each App instance that you create.
Suppose you are connecting to multiple remote Session
instances that were
created on different remote systems (e.g., an EC2 instance and a remote server
that you own), using commands similar to:
# On each remote machine
fiftyone app launch <dataset> --remote --port RRRR
1 2 3 4 5 6 | # On each remote machine import fiftyone as fo dataset = fo.load_dataset(...) session = fo.launch_app(dataset, remote=True, port=RRRR) |
On your local machine, you can
connect to these remote sessions using a
different local port XXXX
and YYYY
for each.
If you do not have FiftyOne installed on your local machine, open a new terminal window on your local machine and execute the following command to setup port forwarding to connect to your remote sessions:
ssh -N -L XXXX:localhost:RRRR1 [<username1>@]<hostname1>
# Then open `http://localhost:XXXX` in your web browser
ssh -N -L YYYY:localhost:RRRR2 [<username2>@]<hostname2>
# Then open `http://localhost:YYYY` in your web browser
In the above, [<username#>@]<hostname#>
refers to a remote machine and
RRRR#
is the remote port that you used for the remote session.
Alternatively, if you have FiftyOne installed on your local machine, you can use the CLI to automatically configure port forwarding and open the App in your browser as follows:
# Connect to first remote session
fiftyone app connect \
--destination [<username1>@]<hostname1> \
--port RRRR1
--local-port XXXX
# Connect to second remote session
fiftyone app connect \
--destination [<username2>@]<hostname2> \
--port RRRR2
--local-port YYYY
Note
You can also serve multiple remote sessions from the same machine.
Can I serve multiple remote sessions from a machine?¶
Yes, you can create multiple remote sessions on the same remote machine by
specifying different ports for each Session
that you create:
# On remote machine
# Create first remote session
fiftyone app launch <dataset1> --remote --port XXXX
# On remote machine
# Create second remote session
fiftyone app launch <dataset2> --remote --port YYYY
1 2 3 4 5 6 7 8 9 10 11 | # On remote machine import fiftyone as fo # Create first remote session dataset1 = fo.load_dataset(...) session1 = fo.launch_app(dataset1, remote=True, port=XXXX) # Create second remote session # This can be done in the same or another process dataset2 = fo.load_dataset(...) session2 = fo.launch_app(dataset2, remote=True, port=YYYY) |
On your local machine(s), you can now connect to the remote sessions. Connections can be set up using port forwarding in the following way:
ssh -N -L WWWW:localhost:XXXX [<username>@]<hostname>
# Then open `http://localhost:WWWW` in your web browser
ssh -N -L ZZZZ:localhost:YYYY [<username>@]<hostname>
# Then open `http://localhost:ZZZZ` in your web browser
In the above, [<username>@]<hostname>
refers to your remote machine, and
WWWW
and ZZZZ
are any 4 digit ports on your local machine(s).
Alternatively, if you have FiftyOne installed on your local machine, you can use the CLI to automatically configure port forwarding and open the App in your browser as follows:
# On a local machine
# Connect to first remote session
fiftyone app connect \
--destination [<username>@]<hostname> \
--port XXXX \
--local-port WWWW
# On a local machine
# Connect to second remote session
fiftyone app connect \
--destination [<username>@]<hostname> \
--port YYYY \
--local-port ZZZZ
Can I use my own MongoDB database?¶
Yes, you can configure FiftyOne to connect to your own MongoDB instance by
setting the database_uri
property of your
FiftyOne config. Refer to
this page for more information.
Too many open files in system?¶
If you are a MacOS user and see a “too many open files in system” error when performing import/export operations with FiftyOne, then you likely need to increase the open files limit for your OS.
Following the instructions in this post should resolve the issue for you.
Can I downgrade to an older version of FiftyOne?¶
Certainly, refer to these instructions.
Are the Brain methods open source?¶
Although the core library is open source and the Brain methods are freely available for use for any commercial or non-commercial purposes, the Brain methods are closed source.
Check out the Brain documentation for detailed instructions on using the various Brain methods.
Does FiftyOne track me?¶
FiftyOne tracks anonymous UUID-based usage of the App by default. We are a small team building an open source project, and basic knowledge of how users are engaging with the project is critical to informing the roadmap of the project.
Note
You can disable tracking by setting the do_not_track
flag of your
FiftyOne config.