Skip to main content

Perch Hoplite

CI

Hoplite is a system for storing large volumes of embeddings from machine perception models. We focus on combining vector search with active learning workflows, aka agile modeling.

In brief, agile modeling is a process for rapidly developing classifiers using embeddings from a pre-trained 'foundation' model. For bioacoustics work, we find that new classifiers can often be developed for new signals in under an hour.

How does it work?

We first use a bioacoustics model to convert your unlabeled audio data into embeddings - these are like semantic 'fingerprints' of 5-second audio clips. Then, you can search the embeddings of your data by providing an example of what you're looking for. You then give feedback on the results - which examples are and are not what you're looking for. From this feedback, we can quickly train a classifier. You can then improve on the classifier with active learning: Examine the classifier outputs, provide more feedback, and re-train the classifier.

A key feature of this workflow is that we pre-compute the embeddings. This may take a while if you have a large amount of data, but the subsequent search and classifier training is very efficient.

To get started, load up the following Colab/Jupyter notebooks:

Repository Contents

This repository consists of four sub-libraries:

  • db – The core database functionality for storing embeddings and related metadata. The database also handles labels applied to embeddings and vector search, both exact and approximate.
  • agile – Tooling (and example notebooks) for agile modeling on top of the Hoplite db layer, combining search and active learning approaches. This library includes organizing labeled data and training linear classifiers over embeddings, as well as tooling for embedding large datasets.
  • zoo – A bioacoustics model zoo. A basic wrapper class is provided, and any model which can transform windows of audio samples into embeddings can then be used in the agile modeling workflow.
  • taxonomy – A database of taxonomic information, especially for handling conversions between the various bird taxonomies.

Each sub-library has its own documentation.

Installation

We recommend using uv or pip for installation. uv is a fast rust-based pip-compatible package installer and resolver.

First, install system dependencies for audio processing:

sudo apt-get update
sudo apt-get install libsndfile1 ffmpeg

With uv

If you don't have uv, you can install it via pipx install uv or pip install uv. If you are developing locally, clone the repository and install in editable mode:

git clone https://github.com/google-research/perch-hoplite.git
cd perch-hoplite
# Create and activate a virtual environment
uv venv
source .venv/bin/activate
uv pip install -e .

With pip

You can install the latest stable release from PyPI:

pip install perch-hoplite

Or install the latest version from GitHub:

pip install git+https://github.com/google-research/perch-hoplite.git

Running the Tests

After installation, you can run the tests to check that everything is working:

python -m unittest discover -s perch_hoplite/db/tests -p "*test.py"
python -m unittest discover -s perch_hoplite/taxonomy -p "*test.py"
python -m unittest discover -s perch_hoplite/zoo -p "*test.py"
python -m unittest discover -s perch_hoplite/agile/tests -p "*test.py"

Notes on Dependencies

Tensorflow is required for agile modeling (classifier training) and for using the Perch or BirdNET models, but is not installed by default. We recommend installing one of the Tensorflow options:

To install with Tensorflow (CPU version):

pip install 'perch-hoplite[tf]'

To install with Tensorflow with CUDA support (for GPU usage):

pip install 'perch-hoplite[tf-cuda]'

The zoo library contains wrappers for various bioacoustic models. Some of these require JAX. To install with JAX dependencies:

uv pip install -e '.[jax]'

or with pip:

pip install 'perch-hoplite[jax]'

If installing with uv in editable mode, you can use uv pip install -e '.[tf,jax]'.

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

Metadata

Release files for perch-hoplite 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for perch-hoplite 1.0.2
File Size Uploaded
perch_hoplite-1.0.2.tar.gz 4.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for perch-hoplite 1.0.2
File Interpreter ABI Platform
perch_hoplite-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 MB

Release files / perch_hoplite-1.0.2.tar.gz

Download URL perch_hoplite-1.0.2.tar.gz
Size 4.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a66c0ae3d28fa5d4326ed6b801a3cc9066f004ed9de2e2f0ea67737f5c774f75
BLAKE2b-256 checksum
How to use checksums
13e1d13803a94019ad09e7e8695335eb59793924bae47a7f3630c014945a201f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / perch_hoplite-1.0.2-py3-none-any.whl

Download URL perch_hoplite-1.0.2-py3-none-any.whl
Size 4.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c95e71b878c8e6d1986e42854fb22c9b902e313c2618f54391a245f387c0d80e
BLAKE2b-256 checksum
How to use checksums
103d3dee81f106403478aab567f4431bd319767845aa788bfd60f91ef9629534
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page