birdnet.acoustic.models package

Subpackages

Submodules

birdnet.acoustic.models.base module

class birdnet.acoustic.models.base.AcousticModelBase(model_path, species_list, is_custom_model, backend_type, backend_kwargs)

Bases: ModelBase, ABC

Attributes:
backend_kwargs
backend_type
is_custom_model
model_path
n_species
species_list

Methods

get_version()

Return the string label that identifies the acoustic model version.

encode

encode_arrays

encode_session

get_sample_rate

get_segment_size_s

get_segment_size_samples

get_sig_fmax

get_sig_fmin

load

load_custom

predict

predict_arrays

predict_session

property backend_kwargs: dict[str, Any]
property backend_type: type[VersionedAcousticBackendProtocol]
abstractmethod encode(*args, **kwargs)
Return type:

AcousticEncodingResultBase

abstractmethod encode_arrays(*args, **kwargs)
Return type:

AcousticEncodingResultBase

abstractmethod encode_session(*args, **kwargs)
Return type:

AcousticEncodingSession

abstractmethod classmethod get_sample_rate()
Return type:

int

abstractmethod classmethod get_segment_size_s()
Return type:

float

abstractmethod classmethod get_segment_size_samples()
Return type:

int

abstractmethod classmethod get_sig_fmax()
Return type:

int

abstractmethod classmethod get_sig_fmin()
Return type:

int

abstractmethod classmethod get_version()

Return the string label that identifies the acoustic model version.

Return type:

Literal['2.4', '3.0']

Returns:

ACOUSTIC_MODEL_VERSIONS: Registered enum constant for the supported version.

abstractmethod predict(*args, **kwargs)
Return type:

AcousticPredictionResultBase

abstractmethod predict_arrays(*args, **kwargs)
Return type:

AcousticPredictionResultBase

abstractmethod predict_session(*args, **kwargs)
Return type:

AcousticPredictionSession

Module contents