Perch V2 8-bit

Perch is a bioacoustics model trained to classify nearly 15,000 species, of which ~10,000 are birds.

โœจ Key Highlights

  • Optimized for edge deployment โ€” A quantized 8-bit variant of the Perch model capable of running in real time on Raspberry Pi 5.

๐Ÿ“ฆ Model Details

Model Description

This package contains a modified variant of the Perch V2 audio classifier distributed in the ernensbjorn/perch-v2-int8-tflite repository. It accepts a batch containing one five-second, 32 kHz audio clip and returns probabilities for 14,795 classes together with intermediate model representations.

  • Developed by: Google (upstream model)
  • Model type: Audio classifier
  • License: Apache-2.0
  • Base model: ernensbjorn/perch-v2-int8-tflite
  • Packaged variant: 8-bit LiteRT model with softmax output

Model Sources

๐Ÿš€ Get Started with the Model

Run with Compute Flow

Follow these steps to run Perch V2 8-bit on macOSยฎ with Apple Silicon or on Linuxยฎ with an Armยฎ-based CPU, such as a Raspberry Piยฎ 5.

Step 1: Clone Compute Flow and set up the virtual environment

git clone https://github.com/ARM-software/ComputeFlow.git && cd ComputeFlow

uv sync && source .venv/bin/activate

Step 2: Install the brick and model

compute-flow update
compute-flow model install audio_detection:perch perch-v2-8bit
compute-flow build native

Step 3: Run the Python CLI example

python -m cli_examples.audio_detection_cli \
  -m @manifest/perch/perch-v2-8bit/perch_v2_8bit_manifest.json \
  -a @sample/erithacus_rubecula.wav \
  -t 1

The example classifies the bundled samples/erithacus_rubecula.wav recording. Replace -a with a path to your own audio file.

๐Ÿ“Š Quality evaluation

For accuracy results, refer to the ernensbjorn/perch-v2-int8-tflite model card.

๐ŸŽฏ Performance evaluation

Performance results for this package will be reported in a future update.

๐Ÿ› ๏ธ Technical Specifications

Objective

The package provides Perch V2 for audio detection and classification.

Runtime Architecture

Component role Framework / format
Audio classifier LiteRT (.tflite)
Runtime configuration Audio-detection manifest (.json)
Class-name mapping JSON
Representative input Mono, 32 kHz, float32 WAV

Precision and Quantization

The packaged artifact is the repository's 8-bit LiteRT variant. Its public tensor interface uses float32 for the audio input and all four outputs.

Input Specification

Input Description
audio Float32 tensor with shape [1, 160000], representing one five-second audio clip sampled at 32 kHz

Output Specification

Output Description
spectrogram Float32 tensor with shape [1, 500, 128]
spatial_embedding Float32 tensor with shape [1, 16, 4, 1536]
embedding Float32 tensor with shape [1, 1536]
label Float32 tensor with shape [1, 14795] containing class probabilities

Repository Contents

  • assets/class_names.json โ€” class-name mapping referenced by the manifest.
  • perch_v2_8bit.tflite โ€” LiteRT audio-classification model referenced by the manifest.
  • perch_v2_8bit_manifest.json โ€” audio-classifier manifest.
  • samples/erithacus_rubecula.wav โ€” audio sample for testing the model with audio_detection_cli.
  • SHA256SUMS โ€” model-package checksums for reproducibility.

๐Ÿ—‚๏ธ Model and Asset Origin

  • Model: perch_v2_8bit.tflite was derived from perch_v2_original.tflite. The following changes were made for this package:

    • Set the batch dimension to 1.
    • Added a softmax layer to the label output so it returns probabilities.
    • Corrected the label signature entry to reference the actual subgraph output tensor.
    • Replaced 365 explicit BROADCAST_TO operations with equivalent implicit broadcasting and removed unreachable shape calculations.
  • Class names: assets/class_names.json was transformed from labels.txt.

  • Sample: samples/erithacus_rubecula.wav was created from Wikimedia Commons' European-robin recording, credited to Gilles San Martin, with:

    ffmpeg -y \
        -i 120401-132827_Erithacus_rubecula.ogg \
        -ac 1 \
        -ar 32000 \
        -t 55 \
        -af apad \
        -c:a pcm_f32le \
        samples/erithacus_rubecula.wav
    

๐Ÿ” Checksums

SHA256SUMS was generated by recursively hashing every regular file in the model bundle, including files in subdirectories, except the generated root SHA256SUMS and paths with a dotfile component.

From the model bundle root, verify the checked-out files with:

shasum -a 256 -c SHA256SUMS

Citation

If you use this model, cite the original Perch work:

@article{ghani2023global,
  title={Global birdsong embeddings enable superior transfer learning for bioacoustic classification},
  author={Ghani, Burooj and Denton, Tom and Kahl, Stefan and Klinck, Holger},
  journal={Scientific Reports},
  year={2023}
}
Downloads last month
132
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Arm/perch-v2-int8-litert

Quantized
(1)
this model