birdnet.geo.models.v3_0 package

Submodules

birdnet.geo.models.v3_0.model module

class birdnet.geo.models.v3_0.model.GeoDownloaderBaseV3_0

Bases: V3LabelDownloaderBase

AVAILABLE_LANGUAGES: OrderedSet[str] = OrderedSet(['en_us', 'de', 'es', 'pl', 'fr', 'nl', 'ru', 'ja', 'cs', 'ca', 'pt', 'no', 'bg', 'sv', 'da', 'tr', 'sk', 'sr', 'uk', 'zh', 'fi', 'es_es', 'es_mx', 'es_ec', 'pt_pt', 'hr', 'lt', 'fa', 'cy'])
classmethod ensure_labels_available()
Return type:

None

classmethod get_lang_file(lang)
Return type:

Path

class birdnet.geo.models.v3_0.model.GeoModelV3_0(model_path, species_list, is_custom_model, backend_type, backend_kwargs)

Bases: GeoModelBase

property backend_kwargs: dict[str, Any]
property backend_type: type[VersionedGeoBackendProtocol]
final classmethod get_model_type()
Return type:

Literal['acoustic', 'geo']

final classmethod get_n_classes()

Return the 14,082 classes of the official 3.0 output.

All of them species: birds, insects, amphibians and mammals.

Return type:

int

final classmethod get_version()
Return type:

Literal['2.4', '3.0']

property is_custom_model: bool
classmethod load(model_path, species_list, backend_type, backend_kwargs)
Return type:

Self

classmethod load_custom(model_path, species_list, backend_type, backend_kwargs, check_validity)
Return type:

Self

property model_path: Path
property n_species: int
predict(latitude, longitude, /, *, week=None, year_round_aggregation='max', min_confidence=0.03, half_precision=False, device='CPU')

Predict the species present at a location, loading the backend for the call.

Opens a predict_session(..) with the same options, runs it once and unloads the backend again, so the backend load, not the inference, dominates the call. For several locations or weeks, open one session and call run(..) on it.

Return type:

GeoPredictionResult

predict_session(*, min_confidence=0.03, half_precision=False, device='CPU')

Open a session that keeps the backend loaded between run(..) calls.

Entering the session loads the backend once; each run(latitude, longitude, week=..) then costs one inference. Use it for several locations or weeks.

Return type:

GeoPredictionSession

property species_list: OrderedSet[str]

birdnet.geo.models.v3_0.tf module

class birdnet.geo.models.v3_0.tf.GeoTFBackendFP16V3_0(model_path, device_name, half_precision, **kwargs)

Bases: _GeoTFBackendV3_0

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

classmethod prediction_out_idx()
Return type:

int

class birdnet.geo.models.v3_0.tf.GeoTFBackendFP32V3_0(model_path, device_name, half_precision, **kwargs)

Bases: _GeoTFBackendV3_0

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

classmethod prediction_out_idx()
Return type:

int

class birdnet.geo.models.v3_0.tf.GeoTFBackendInt8V3_0(model_path, device_name, half_precision, **kwargs)

Bases: _GeoTFBackendV3_0

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

classmethod prediction_out_idx()
Return type:

int

class birdnet.geo.models.v3_0.tf.GeoTFDownloaderV3_0

Bases: _GeoSingleFileDownloaderV3_0

birdnet.geo.models.v3_0.tf.check_tf_library_for_v3_0(library)
Return type:

None

birdnet.geo.models.v3_0.tf.check_tf_runtime_compatibility_for_v3_0(library)
Return type:

None

birdnet.geo.models.v3_0.pb module

class birdnet.geo.models.v3_0.pb.GeoPBBackendFP32V3_0(model_path, device_name, half_precision, **kwargs)

Bases: PBBackend, VersionedGeoBackendProtocol

classmethod encoding_key()
Return type:

str | None

classmethod encoding_signature_name()
Return type:

str | None

classmethod input_key()
Return type:

str

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

classmethod prediction_key()
Return type:

str

classmethod prediction_signature_name()
Return type:

str

classmethod supports_encoding()
Return type:

bool

classmethod year_round_week_inputs()
Return type:

tuple[float, ...]

class birdnet.geo.models.v3_0.pb.GeoPBDownloaderV3_0

Bases: GeoDownloaderBaseV3_0

classmethod get_model_path_and_labels(lang)
Return type:

tuple[Path, OrderedSet[str]]

birdnet.geo.models.v3_0.pt module

class birdnet.geo.models.v3_0.pt.GeoPTBackendFP32V3_0(model_path, device_name, half_precision, **kwargs)

Bases: TorchBackend, VersionedGeoBackendProtocol

classmethod encoding_out_idx()
Return type:

int | None

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

classmethod prediction_needs_sigmoid()

Whether the model’s prediction head returns logits instead of sigmoid scores.

The exported TorchScript modules are not consistent about this: the acoustic model applies the activation itself, the geo model does not. Backends whose model returns logits declare it here so that all backends of a model yield the same scores.

Return type:

bool

classmethod prediction_out_idx()
Return type:

int

classmethod probe_input_size_samples()
Return type:

int

classmethod supports_encoding()
Return type:

bool

classmethod year_round_week_inputs()
Return type:

tuple[float, ...]

class birdnet.geo.models.v3_0.pt.GeoPTDownloaderV3_0

Bases: _GeoSingleFileDownloaderV3_0

birdnet.geo.models.v3_0.onnx module

class birdnet.geo.models.v3_0.onnx.GeoOnnxBackendFP16V3_0(model_path, device_name, half_precision, **kwargs)

Bases: _GeoOnnxBackendV3_0

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

class birdnet.geo.models.v3_0.onnx.GeoOnnxBackendFP32V3_0(model_path, device_name, half_precision, **kwargs)

Bases: _GeoOnnxBackendV3_0

classmethod precision()
Return type:

Literal['int8', 'fp16', 'fp32']

class birdnet.geo.models.v3_0.onnx.GeoOnnxDownloaderV3_0

Bases: _GeoSingleFileDownloaderV3_0

Module contents