Camera-trap ML inference engine — Python API only (sparrow-engine CPU pipeline). The CLI binary (spe / spe-gpu) and HTTP server are NOT shipped via pip; install them via brew, the system installer (sparrow-engine-install.sh / .ps1), or the GitHub Release tarball. See https://github.com/microsoft/Pytorch-Wildlife/blob/sparrow-engine-dev/docs/user-manual.md
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparrow_engine-0.1.20-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: sparrow_engine-0.1.20-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c616dbc9691cf58c13d475067f5815863c2cb20c55dde3a3e8ca0ba97b70849
|
|
| MD5 |
5b9c99f6cecdfc5f49dc8136e2345ad2
|
|
| BLAKE2b-256 |
e664e7f63e8ccaa81c06a45dc8b46561951a71bdb1d0f35c81ed8ef8cb93280d
|
Provenance
The following attestation bundles were made for sparrow_engine-0.1.20-cp311-abi3-win_amd64.whl:
Publisher:
release.yml on microsoft/SPARROW-Engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparrow_engine-0.1.20-cp311-abi3-win_amd64.whl -
Subject digest:
1c616dbc9691cf58c13d475067f5815863c2cb20c55dde3a3e8ca0ba97b70849 - Sigstore transparency entry: 2096624378
- Sigstore integration time:
-
Permalink:
microsoft/SPARROW-Engine@75715992a70d5ec74041ea84fd65ab281b38986c -
Branch / Tag:
refs/tags/v0.1.20 - Owner: https://github.com/microsoft
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@75715992a70d5ec74041ea84fd65ab281b38986c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sparrow_engine-0.1.20-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: sparrow_engine-0.1.20-cp311-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f666ef6bf8f1b5284d3506e54e6da56da83a9765eabab4e70a59139be8ac7494
|
|
| MD5 |
297baea396e33623c13e4a490ead3d03
|
|
| BLAKE2b-256 |
dad68858a763102c506237ab76b6d2e2b419641ccbb82567b332f27400468b1b
|
Provenance
The following attestation bundles were made for sparrow_engine-0.1.20-cp311-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on microsoft/SPARROW-Engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparrow_engine-0.1.20-cp311-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
f666ef6bf8f1b5284d3506e54e6da56da83a9765eabab4e70a59139be8ac7494 - Sigstore transparency entry: 2096625159
- Sigstore integration time:
-
Permalink:
microsoft/SPARROW-Engine@75715992a70d5ec74041ea84fd65ab281b38986c -
Branch / Tag:
refs/tags/v0.1.20 - Owner: https://github.com/microsoft
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@75715992a70d5ec74041ea84fd65ab281b38986c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sparrow_engine-0.1.20-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: sparrow_engine-0.1.20-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.1 MB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ec4fe9144b85fe760ec35dfe16d60695bcbf3739f1d9146e8e8d7c65abeae7d
|
|
| MD5 |
b8bbd54be7ee48825d56ecb934da409b
|
|
| BLAKE2b-256 |
6cde282a33957ffc51c5e6fc2aaa85fa4d01d792a9533dc3ffeb8746adcdca1d
|
Provenance
The following attestation bundles were made for sparrow_engine-0.1.20-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on microsoft/SPARROW-Engine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sparrow_engine-0.1.20-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
7ec4fe9144b85fe760ec35dfe16d60695bcbf3739f1d9146e8e8d7c65abeae7d - Sigstore transparency entry: 2096624657
- Sigstore integration time:
-
Permalink:
microsoft/SPARROW-Engine@75715992a70d5ec74041ea84fd65ab281b38986c -
Branch / Tag:
refs/tags/v0.1.20 - Owner: https://github.com/microsoft
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@75715992a70d5ec74041ea84fd65ab281b38986c -
Trigger Event:
push
-
Statement type: