birdnet.geo.models package

Subpackages

Submodules

birdnet.geo.models.base module

class birdnet.geo.models.base.GeoModelBase(model_path, species_list, is_custom_model, backend_type, backend_kwargs)

Bases: ModelBase

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

Literal['2.4', '3.0']

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

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

Module contents