Detection

detection sub-module within the ketos.neural_networks.dev_utils module

This module provides auxiliary functions to incorporate pre-trained ketos classifiers models into detection tools

Contents:

compute_score_running_avg(scores, window_size)

This function calculates the running average of a given list of scores, over a defined window size.

batch_load_hdf5_data(hdf5_file_path, ...[, ...])

Loads HDF5 data in batches from a specified file and yields it for processing.

batch_load_audio_file_data(loader, batch_size)

This function generates batches of audio data from a given AudioFrameLoader.

add_detection_buffer(detections_df, buffer)

Add a buffer to each detection in the DataFrame.

apply_detection_threshold(scores[, ...])

Filters out detection scores below or at a specified threshold and returns a list of tuples, where each tuple consists of a label (the index of the score) and the score itself.

filter_by_threshold(detections[, threshold, ...])

Filters out detection scores below a specified threshold and returns a DataFrame with the remaining detections.

convert_sequence_to_snapshot(detections[, ...])

Converts a sequence of scores into a snapshot of events that exceed a threshold.

filter_by_label(detecitons, labels)

Filters the input DataFrame by specified label(s).

merge_overlapping_detections(detections_df)

Merge overlapping or adjacent detections with the same label.

merge_consecutive_detections(detections_df, ...)

Merges consecutive detections in the given dataframe.