Repository navigation
v1.2.0
A custom classifier release. Custom classifiers trained on the BirdNET 3.0 base now load and run, load_custom can read the base version from the file, and recent 2.4 exports load again. Scores from a 2.4 Raven classifier change in this release.
Features
- Custom classifiers on the BirdNET 3.0 base.
birdnet.load_custom("acoustic", "3.0", "tf", ..)loads a 3.0 TFLite export forpredict(..)andencode(..), andload_custom(.., "3.0", "pb", .., is_raven=True)loads the 3.0 Raven SavedModel. by @Josef-Haupt in #111 version="auto"for custom TFLite classifiers.load_custom("acoustic", "auto", "tf", ..)reads the base version from the file. The newbirdnet.inspect_custom_tflite(model)describes a classifier file the same way, without importing TensorFlow into your process. by @Josef-Haupt in #111
Changes
- Scores from a 2.4 Raven classifier change. The sigmoid was applied twice, which compressed every score into 0.5 to 0.73;
predict(..)now returns the export's scores, so revisit thresholds tuned against the old values. by @Josef-Haupt in #111 - The acoustic 3.0
tfandpbbackends rejectbatch_sizeabove 1 with aValueError; their exports take one segment at a time, and a larger batch used to crash the worker or return a single row.onnxandpttake any batch size. by @Josef-Haupt in #111 - A Raven export's
labels/label_names.csvloads as a species list, without the id column in every name. by @Josef-Haupt in #111 classifier_typeis accepted but no longer selects anything; the layout is read from the file. by @Josef-Haupt in #111
Bugfixes
- Custom 2.4 classifiers exported with Keras 3 (TensorFlow 2.16 or newer) load again, instead of failing with "Failed to detect custom classifier type" or reading the wrong tensor. by @Josef-Haupt in #111
encode(..)on an append-mode custom 2.4 classifier returned wrong embeddings. by @Josef-Haupt in #111- A model that hangs while opening no longer holds
load_custompast its timeout. A Linux script that callsload_customorinspect_custom_tflitewithout a__main__guard now needs one, aspredict(..)already does. by @Josef-Haupt in #111 - On Windows, the lock around the one-time V3.0 label setup could be left behind, and every process waiting for it then timed out. by @Josef-Haupt in #111
pip install birdnet[tf]on Intel macOS could resolve to packages that do not import together. Thetfextra now pins TensorFlow 2.16 and pyarrow below 26 there. by @Josef-Haupt in #111
Known limitation
The acoustic 3.0 pb and onnx exports, and the custom 3.0 Raven export, return NaN scores for a segment with no variance such as digital silence. This is in the exports, not in birdnet.
Under the hood
- The test suite builds custom classifier exports from the official models and runs the custom classifier paths against them. by @Josef-Haupt in #111
Full Changelog: v1.1.1...v1.2.0