Skip to main content

sparrow-engine (Python)

Camera-trap ML inference engine — Python API. sparrow-engine loads ONNX models and runs detection, classification, and audio inference.

This package ships the Python API only (import sparrow_engine). The command-line binaries (spe / spe-gpu) and the HTTP server are distributed separately (Homebrew, the system installer, or the GitHub Release tarball) — pip install does not place them on your PATH.

Install

pip install sparrow-engine        # CPU build (depends on onnxruntime)
pip install sparrow-engine-gpu    # GPU/CUDA build (depends on onnxruntime-gpu)

Both distributions import as sparrow_engine and are drop-in replacements for each other. Install exactly one per environment; pip refuses to install both into the same environment. Neither wheel bundles ONNX Runtime or CUDA — those come from the runtime dependency (onnxruntime / onnxruntime-gpu).

Usage

import sparrow_engine

# Models are read from ~/.sparrow-engine/models (override with
# SPARROW_ENGINE_MODEL_DIR). Device defaults to "auto".
print(sparrow_engine.list_models())

# Object detection — returns list[DetectResult], one per input image.
results = sparrow_engine.detect("photo.jpg", model="MDV6-yolov10-c")
for det in results[0].detections:
    # bbox coordinates are normalized to [0, 1].
    print(det.label, det.confidence, det.bbox.x_min, det.bbox.y_min)

# Classification — result.top1 is the highest-confidence class (or None).
clf = sparrow_engine.classify("crop.jpg", model="Deepfaune-Europe")
print(clf[0].top1)

# Detect-then-classify pipeline (ad-hoc; no TOML required).
pipe = sparrow_engine.pipeline("photo.jpg", detector="MDV6-yolov10-c",
                               classifier="Deepfaune-Europe")

# Audio detection (WAV input).
audio = sparrow_engine.detect_audio("recording.wav", model="md-audiobirds-v1")

init(device=..., model_dir=...) is optional — the engine auto-initializes on the first inference call. detect / classify / detect_audio / pipeline each accept a file path, a directory, or a list of paths, and take an optional progress_callback(index, total, filename).

Documentation

See the user manual (docs/user-manual.md) in the sparrow-engine repository for the full model catalog, device selection, and the CLI / server surfaces.

Metadata

Release files for sparrow-engine 0.1.24

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

Built distributions (wheels)

Table of built distributions (wheels) for sparrow-engine 0.1.24
File Interpreter ABI Platform
sparrow_engine-0.1.24-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
sparrow_engine-0.1.24-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
sparrow_engine-0.1.24-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details

Total release size: 6.8 MB

Release files / sparrow_engine-0.1.24-cp311-abi3-win_amd64.whl

Download URL sparrow_engine-0.1.24-cp311-abi3-win_amd64.whl
Size 2.1 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
96165759febd3faef8780ebb3d7833f8119c81c90093294a15419369c2d7d86e
BLAKE2b-256 checksum
How to use checksums
9969adc505e1a1fd6ee0de0b6824472be246e52e207eab7b2f58fa4381e664e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 4, 2026.

Transparency log

Release files / sparrow_engine-0.1.24-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL sparrow_engine-0.1.24-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
c3ae0c25af6fa5e2e2c291a97f38f8588b9436e4fde83edd554bb2bac235f334
BLAKE2b-256 checksum
How to use checksums
d763cddcb8243dae9155e3777f93ac73e2febb291ed8c227971e7ce21ecd28cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 4, 2026.

Transparency log

Release files / sparrow_engine-0.1.24-cp311-abi3-macosx_11_0_arm64.whl

Download URL sparrow_engine-0.1.24-cp311-abi3-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9e005d8e0b46c3b00ae18100f5c48d0dc46c19ba85d80cd0fa09294a82212de7
BLAKE2b-256 checksum
How to use checksums
c06b947703f16073a89d52d2d31c6c03dab20182444ed0dd92c680e87bd1da35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.29

3 release files

0.1.28

3 release files

0.1.27

3 release files

This release

0.1.24 This release

3 release files

0.1.23

3 release files

0.1.15

3 release files

0.1.14

3 release files

0.1.13

3 release files

0.1.12

3 release files

0.1.11

3 release files

0.1.10

3 release files

0.1.9

3 release files

0.1.8

3 release files

0.1.7

3 release files

0.1.6

3 release files

0.1.5

3 release files

0.1.4

3 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