Skip to content

Latest commit

 

History

History
209 lines (138 loc) · 5.94 KB

README.md

File metadata and controls

209 lines (138 loc) · 5.94 KB

Brain Plugin

A plugin that contains utilities for working with the FiftyOne Brain.

brain.mp4

Installation

fiftyone plugins download \
    https://github.com/voxel51/fiftyone-plugins \
    --plugin-names @voxel51/brain

Refer to the main README for more information about managing downloaded plugins and developing plugins locally.

Usage

  1. Launch the App:
import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
session = fo.launch_app(dataset)
  1. Press ` or click the Browse operations action to open the Operators list

  2. Select any of the operators listed below!

Operators

compute_visualization

You can use this operator to create embeddings visualizations for your datasets.

This operator is essentially a wrapper around compute_visualization():

import fiftyone.brain as fob

fob.compute_visualization(dataset_or_view, brain_key=brain_key, ...)

where the operator's form allows you to configure the brain key and all other relevant parameters.

compute_similarity

You can use this operator to create similarity indexes for your datasets.

This operator is essentially a wrapper around compute_similarity():

import fiftyone.brain as fob

fob.compute_similarity(dataset_or_view, brain_key=brain_key, ...)

where the operator's form allows you to configure the brain key and all other relevant parameters.

sort_by_similarity

You can use this operator to perform image/text similarity queries against any similarity indexes on your dataset.

This operator is essentially a wrapper around sort_by_similarity():

view = dataset.sort_by_similarity(query, brain_key=brain_key, k=k, ...)

This operator supports all of the following similarity queries:

add_similar_samples

You can use this operator to retrieve similar samples from another dataset to add to your current dataset.

This operator is essentially a wrapper around the following pseudocode:

view = src_dataset.sort_by_similarity(query, brain_key=brain_key, k=k)

dataset.add_samples(view)

This operator supports both image and text similarity queries, depending on whether you have samples currently selected in the App when you launch the operator:

  • If one or more samples currently selected, an image similarity query will be performed to retrieve similar images from src_dataset to your currently selected samples in dataset
  • Otherwise, a text similarity query will be performed to retrieve new images from src_dataset that match the provided text prompt

compute_uniqueness

You can use this operator to compute uniqueness for your datasets.

This operator is essentially a wrapper around compute_uniqueness():

import fiftyone.brain as fob

fob.compute_uniqueness(dataset_or_view, uniqueness_field, ...)

where the operator's form allows you to configure all relevant parameters.

compute_mistakenness

You can use this operator to compute mistakenness for your datasets.

This operator is essentially a wrapper around compute_mistakenness():

import fiftyone.brain as fob

fob.compute_mistakenness(dataset_or_view, pred_field, label_field, ...)

where the operator's form allows you to configure all relevant parameters.

compute_hardness

You can use this operator to compute hardness for your datasets.

This operator is essentially a wrapper around compute_hardness():

import fiftyone.brain as fob

fob.compute_hardness(dataset_or_view, label_field, ...)

where the operator's form allows you to configure all relevant parameters.

get_brain_info

You can use this operator to get information about brain runs.

This operator is essentially a wrapper around get_brain_info():

info = dataset_or_view.get_brain_info(brain_key)
print(info)

load_brain_view

You can use this operator to load the view on which a brain run was performed.

This operator is essentially a wrapper around load_brain_view():

view = dataset.load_brain_view(brain_key)

rename_brain_run

You can use this operator to rename brain runs.

This operator is essentially a wrapper around rename_brain_run():

dataset_or_view.rename_brain_run(brain_key, new_brain_key)

delete_brain_run

You can use this operator to delete brain runs.

This operator is essentially a wrapper around delete_brain_run():

dataset_or_view.delete_brain_run(brain_key)