Indexes Plugin#

A plugin that contains utilities for working with FiftyOne database indexes.

Installation#

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

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#

manage_indexes#

You can use this operator to view, create, and delete database indexes, which are useful for speeding up queries on large datasets in Lightning Mode.

Note that, for large datasets, creating indexes can slow down write operations during the process and create overhead in MongoDB, so you should only create indexes for fields that you frequently query on.

For more information on indexes, see the MongoDB documentation.

This operator is a wrapper around the list_indexes(), get_index_information(), create_index(), and drop_index() methods:

dataset.create_index("uniqueness")
dataset.create_index("ground_truth.detections.label")

print(dataset.list_indexes())

dataset.drop_index("uniqueness")
dataset.drop_index("ground_truth.detections.label")