birdnet.geo.inference package¶
Submodules¶
birdnet.geo.inference.configs module¶
- class birdnet.geo.inference.configs.InferenceConfig(model_conf, processing_conf)¶
Bases:
object-
model_conf:
ModelConfig¶
-
processing_conf:
ProcessingConfig¶
-
model_conf:
- class birdnet.geo.inference.configs.ModelConfig(species_list, path, version, is_custom, backend_type, backend_kwargs)¶
Bases:
object- Attributes:
- n_species
-
backend_kwargs:
dict[str,Any]¶
-
backend_type:
type[VersionedBackendProtocol]¶
-
is_custom:
bool¶
- property n_species: int¶
-
path:
Path¶
-
species_list:
OrderedSet[str]¶
-
version:
Literal['2.4','3.0']¶
- class birdnet.geo.inference.configs.PredictionConfig(min_confidence)¶
Bases:
objectMethods
validate_min_confidence
-
min_confidence:
float¶
- classmethod validate_min_confidence(min_confidence)¶
- Return type:
float
-
min_confidence:
- class birdnet.geo.inference.configs.ProcessingConfig(half_precision, device)¶
Bases:
objectMethods
validate_device
validate_half_precision
-
device:
str¶
-
half_precision:
bool¶
- classmethod validate_device(device)¶
- Return type:
str
- classmethod validate_half_precision(half_precision)¶
- Return type:
bool
-
device:
- class birdnet.geo.inference.configs.RunConfig(latitude, longitude, week, year_round_aggregation)¶
Bases:
objectMethods
validate_latitude
validate_longitude
validate_week
validate_year_round_aggregation
-
latitude:
float¶
-
longitude:
float¶
- classmethod validate_latitude(latitude)¶
- Return type:
float
- classmethod validate_longitude(longitude)¶
- Return type:
float
- classmethod validate_week(week)¶
- Return type:
int|None
- classmethod validate_year_round_aggregation(year_round_aggregation)¶
- Return type:
Literal['max','average']
-
week:
int|None¶
-
year_round_aggregation:
Literal['max','average']¶
-
latitude:
birdnet.geo.inference.prediction_result module¶
- class birdnet.geo.inference.prediction_result.GeoPredictionResult(model_path, model_version, model_precision, latitude, longitude, week, species_masked, species_ids, species_probs, species_list)¶
Bases:
ResultBase- Attributes:
- latitude
- longitude
- memory_size_MiB
- model_path
- model_precision
- model_version
- n_species
- species_ids
- species_list
- species_masked
- species_probs
- week
Methods
load
save
to_arrow_table
to_csv
to_dataframe
to_set
to_structured_array
to_txt
- property latitude: int¶
- property longitude: int¶
- property memory_size_MiB: float¶
- property n_species: int¶
- property species_ids: ndarray¶
- property species_list: ndarray¶
- property species_masked: ndarray¶
- property species_probs: ndarray¶
- to_arrow_table(sort_by='species')¶
- Return type:
Table
- to_csv(csv_out_path, sort_by='species', encoding='utf8')¶
- Return type:
None
- to_dataframe(sort_by='species')¶
- Return type:
DataFrame
- to_set()¶
- Return type:
set[str]
- to_structured_array(sort_by='species')¶
- Return type:
ndarray
- to_txt(txt_out_path, sort_by='species', encoding='utf8')¶
- Return type:
None
- property week: int¶
birdnet.geo.inference.session module¶
- class birdnet.geo.inference.session.GeoPredictionSession(species_list, model_path, model_is_custom, model_version, model_backend_type, model_backend_custom_kwargs, *, min_confidence, half_precision, device)¶
Bases:
GeoSessionBaseMethods
run
- run(latitude, longitude, /, *, week=None, year_round_aggregation='max')¶
- Return type:
- class birdnet.geo.inference.session.GeoSessionBase(conf, specific_config)¶
Bases:
SessionBase,ABCMethods
run