birdnet.geo.models.v2_4 package¶
Submodules¶
birdnet.geo.models.v2_4.model module¶
- class birdnet.geo.models.v2_4.model.GeoDownloaderBaseV2_4¶
Bases:
object-
AVAILABLE_LANGUAGES:
OrderedSet[str] = OrderedSet(['af', 'ar', 'cs', 'da', 'de', 'en_uk', 'en_us', 'es', 'fi', 'fr', 'hu', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'uk', 'zh'])¶
-
AVAILABLE_LANGUAGES:
- class birdnet.geo.models.v2_4.model.GeoModelV2_4(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 6,522 classes of the official 2.4 output.
The label list of the acoustic 2.4 model, so it includes that model’s 11 classes that are not species, such as Dog, Engine and Noise.
- 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 callrun(..)on it.- Return type:
- 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:
- property species_list: OrderedSet[str]¶
birdnet.geo.models.v2_4.pb module¶
- class birdnet.geo.models.v2_4.pb.GeoPBBackendFP32V2_4(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.v2_4.pb.GeoPBDownloaderV2_4¶
Bases:
GeoDownloaderBaseV2_4- classmethod get_model_path_and_labels(lang)¶
- Return type:
tuple[Path,OrderedSet[str]]
birdnet.geo.models.v2_4.tf module¶
- class birdnet.geo.models.v2_4.tf.GeoTFBackendFP32V2_4(model_path, device_name, half_precision, **kwargs)¶
Bases:
PinnedTFBackend,VersionedGeoBackendProtocol- classmethod encoding_out_idx()¶
- Return type:
int|None
- classmethod in_idx()¶
- Return type:
int
- classmethod precision()¶
- Return type:
Literal['int8','fp16','fp32']
- classmethod prediction_out_idx()¶
- Return type:
int
- classmethod supports_encoding()¶
- Return type:
bool
- classmethod year_round_week_inputs()¶
- Return type:
tuple[float,...]
- class birdnet.geo.models.v2_4.tf.GeoTFDownloaderV2_4¶
Bases:
GeoDownloaderBaseV2_4- classmethod get_model_path_and_labels(lang)¶
- Return type:
tuple[Path,OrderedSet[str]]