Skip to content

voxel51/fiftyone-examples

Repository files navigation

Β 

Examples

This repository contains examples of using FiftyOne to accomplish various common tasks.


Website β€’ Docs β€’ Try it Now β€’ Tutorials β€’ Blog β€’ Community

PyPI python PyPI version Downloads Docker Pulls Build License Discord Slack Medium Mailing list Twitter

πŸ‘‹ hey there!

We created an open-source tool that supercharges your computer vision and machine learning workflows by enabling you to visualize datasets, analyze models, and improve data quality more efficiently than ever before. Embark with us in this adventure 🀝. FiftyOne.

------------------------------------------------------------------

Prerequisites for beginners

prerequisites for beginners 🧸

Fiftyone requires Python (3.9 - 3.11), Git and other dependencies. To get started, select the guide for your operating system or environment, if you are an experienced developer you can avoid this section. If you are looking for scaling solution to be installed in Cloud Enterprise Systems, please take a look of Fiftyone Teams here

Windows

1. Install Python and Git

1.1 Install Python

Note: ⚠️ The version of Python that is available in the Microsoft Store is not recommended.

Download a Python installer from python.org. Choose Python 3.9, 3.10, or 3.11 and make sure to pick a 64-bit version. For example, this Python 3.10.11 installer. Double-click on the installer to run it, and follow the steps in the installer.

  • Check the box to add Python to your PATH, and to install py.
  • At the end of the installer, there is an option to disable the PATH length limit. It is recommended to click this.

1.2 Install Git

Download Git from this link. Double-click on the installer to run it, and follow the steps in the installer.

2. Install Microsoft Visual C++ Redistributable and FFMPEG (Optional)

Download Microsoft Visual C++ Redistributable. Double-click on the installer to run it, and follow the steps in the installer.

Install FFMPEG

Download FFMPEG binary from here. Set FFMPEG's path (e.g., C:\ffmpeg\bin) to the PATH environmental variable on Windows.

3. Create a Virtual Environment

  • Press Win + R. type cmd, and press Enter. Alternatively, search Command Prompt in the Start Menu.
  • Navigate to your project. cd C:\path\to\your\project
  • Create the environment python -m venv fiftyone_env
  • Activate the environment typing this in the command line window fiftyone_env\Scripts\activate
  • After activation, your command prompt should change and show the name of the virtual environment (fiftyon_env) C:\path\to\your\project
  • Now you are ready to install Fiftyone and all the requirements/packages/dependencies. Go to Installation section in this Readme file.
  • Once you want to deactivate your environment, just type deactivate
Linux

1. Install Python and Git

You may need to install some additional libraries on Ubuntu Linux. These steps work on a clean install of Ubuntu Desktop 20.04, and should also work on Ubuntu 22.04 and 20.10, and on Ubuntu Server.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-venv build-essential python3-dev git-all libgl1-mesa-dev ffmpeg
  • On Linux, you will need at least the openssl and libcurl packages.

  • On Debian-based distributions, you will need to install libcurl4 orlibcurl3 instead of libcurl, depending on the age of your distribution.

    For example:

# Ubuntu
sudo apt install libcurl4 openssl

# Fedora
sudo dnf install libcurl openssl

2. Create and activate the Virtual Environment

python3 -m venv fiftyone_env
source fiftyone_env/bin/activate

Now you are ready to install Fiftyone and all the requirements/packages/dependencies. Go to Installation section in this Readme file.

MacOS

1. Install Xcode Command Line Tools

xcode-select --install

2. Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After you install it, follow the instructions from the Homebrew installation to set it up.

3. Install Python and dependencies

brew install [email protected]
brew install protobuf

#optional but recommendeded
brew install ffmpeg

4. Create and activate the Virtual Environment

python3 -m venv fiftyone_env
source fiftyone_env/bin/activate

Now you are ready to install Fiftyone and all the requirements/packages/dependencies. Go to Installation section in this Readme file.

Docker

Refer to these instructions to see how to build and run Docker images containing source or release builds of FiftyOne.

Important Notes: Remember, you will need...

  • Python (3.9 - 3.11)
  • Node.js - on Linux, we recommend using nvm to install an up-to-date version.
  • Yarn - once Node.js is installed, you can enable Yarn via corepack enable

------------------------------------------------------------------

Usage πŸ”₯

Each example in this repository is provided as a Jupyter Notebook. The table of contents below provides handy links for each example:

Β  Click this link to run the notebook in Google Colab (no setup required!)

Β  Click this link to view the notebook in Jupyter nbviewer

Β  Click this link to download the notebook

Running examples locally

You can always clone this repository:

git clone https://github.com/voxel51/fiftyone-examples

and run any example locally. Make sure you have Jupyter installed and then run:

jupyter notebook examples/an_awesome_example.ipynb

------------------------------------------------------------------

List of Examples

Shortcuts Examples Description
quickstart A quickstart example for getting your feet wet with FiftyOne
walkthrough A more in-depth alternative to the quickstart that covers the basics of FiftyOne
zilliz_advent_of_code Welcome to FiftyOne: Zilliz Advent of Open Source Code 2023
ai_telephone Play multimodal AI telephone with text-to-image models, image-to-text models, and Fiftyone
clean_conceptual_captions Clean Google's Conceptual Captions Dataset with Fiftyone to train your own ControlNet
segment_anything_openvino Add object masks to a FiftyOne dataset with OpenVINO-optimized Segment Anything Model
comparing_YOLO_and_EfficientDet Compares the YOLOv4 and EfficientDet object detection models on the COCO dataset
digging_into_coco A simple example of how to find mistakes in your detection datasets
deepfakes_in_politics Evaluating deepfakes using a deepfake detection algorithm and visualizing the results in FiftyOne
emotion_recognition_presidential_debate Analyzing the 2020 US Presidential Debates using an emotion recognition model
image_uniqueness Using FiftyOne's image uniqueness method to analyze and extract insights from unlabeled datasets
structured_noise_injection Visually exploring a method for structured noise injection in GANs from CVPR 2020
visym_pip_175k Exploring the People in Public 175K Dataset from Visym Labs with FiftyOne
wrangling_datasets Using FiftyOne to load, manipulate, and export datasets in common formats
open_images_evaluation Evaluating the quality of the ground truth annotations of the Open Images Dataset with FiftyOne
working_with_feature_points A simple example of computing feature points for images and visualizing them in FiftyOne
image_deduplication Find and remove duplicate images in your image datasets with FiftyOne
hardness_for_image_classification Use the FiftyOne Brain to mine the hardest images in your classification dataset
pytorch_detection_training Using FiftyOne datasets to train a PyTorch object detection model
pytorchvideo_model_evaluation Evaluate and visualize PyTorchVideo models with FiftyOne
training_clearml_detector Train a model with ClearML and FiftyOne to detect DRAGONS!
converting_tags_to_classifications Convert classifications to tags and back to annotate them right in the FiftyOne App
Qdrant_FiftyOne_Recipe Nearest neighbor classification of embeddings with Qdrant
armbench_defect_detection Visualizing Defects in Amazon’s ARMBench Dataset Using Embeddings and OpenAI’s CLIP Model
openvino_model_horizontal_text_detection Horizontal text detection on Total-Text Dataset using OpenVino Model
chest_xray14 Load and explore the NIH's ChestX-ray14 dataset in FiftyOne
football_player_segmentation Detection and Segmentation on Football Player Segmentation Dataset using SAM
wildme_conservation_datasets Create a 'meta' dataset out of three WildMe conservation datasets in FiftyOne
CLI Tips & Tricks Use FiftyOne's Command Line Interface to expedite your workflows
Grouped Dataset Tips & Tricks Learn how to work with grouped datasets in FiftyOne
Keypoint Tips & Tricks Learn how to work with keypoint skeletons in FiftyOne
3D Detections Tips & Tricks Make your first 3D detection in point clouds using FiftyOne
Heatmaps Tips & Tricks Learn how to use heatmaps with a body pose estimation example
Video Labels Tips & Tricks Learn different label types in video datasets with ASL videos
Tracking Datasets with FiftyOne Learn how to load and work with tracking datasets with the help of FiftyOne
GradCam and More with FiftyOne Apply Model Explainability techniques to your workflows with FiftyOne and GradCam!

------------------------------------------------------------------

contributing to FiftyOne Examples 🧑

This repository is open source and community contributions are welcome!

Check out the contribution guide to learn how to get involved.

🀝 Join Our Community 🀝

Connect with us through your preferred channels:

Discord Slack Medium Twitter LinkedIn Facebook

Share your workflow improvements on social media and tag us @Voxel51 and #FiftyOne!.

🎊 You will be on our rewarded list. 🎊

------------------------------------------------------------------

contributors πŸ€“

Special thanks to these amazing people for contributing to FiftyOne Examples! πŸ™Œ

------------------------------------------------------------------

citation πŸ“–

If you use a specific contributed example in this repository, feel free to cite the project (but only if you love it 😊):

@article{moore2020fiftyone,
  title={FiftyOne},
  author={Moore, B. E. and Corso, J. J.},
  journal={GitHub. Note: https://github.com/voxel51/fiftyone},
  year={2020}
}