Pipeline details
Note
Data preparation writes media@pamDP, the metadata of all the recordings. The filter_media pipeline then produces media_work@pamDP, the subset of recordings that will be analyzed. Graphical soundscape, acoustic indices and species detection read media_work@pamDP, while quality control reads media@pamDP. When you run pamflow run or any of these three pipelines by name, filter_media runs first automatically.
1. Data preparation
pamflow run --pipeline data_preparation
Description
Reads field and audio data to standardize metadata using the pamDP standard. It outputs media and deployment formats, ensuring coherence between field sheets and collected audio files for later analysis and exchange.
Parameters
This pipeline uses two project-level parameters, normally set in conf/local/parameters.yml: audio_root_directory (folder with one subfolder of recordings per deployment) and timezone (IANA name, e.g. America/Bogota, used to localize the timestamps of the recordings and of the deployments). The location of the field deployment sheet is set in the Catalog entry field_deployments_sheet@pandas.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Retrieves media files from the specified audio root directory and links them with field deployment sheet data. |
|
|
|
Generates a summary of the media files (e.g., counts, durations, metadata). |
|
|
|
Converts the field deployments sheet and media summary into structured deployment data. |
|
|
2. Quality control
pamflow run --pipeline quality_control
Description
Allows a quick data exploration to flag underperforming sensors and ensure data integrity for reliable ecological analysis. It summarizes survey effort, plotting sensor locations, checking recording timelines, and detecting recordings with unusual duration or sample rate.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Generates visualizations and summary data of sensor performance metrics based on media data. |
|
|
|
Creates a map or plot showing sensor deployment locations using summarized media and deployment data. |
|
|
|
Produces a plot summarizing survey effort (e.g., recording hours or deployment durations). |
|
|
|
Flags recordings whose duration ( |
|
|
|
Generates timelapse audio samples and corresponding spectrogram images for visual and acoustic analysis. |
|
|
Parameters
Group |
Name |
Description |
Default Value |
|---|---|---|---|
|
|
Figure height (in inches) |
|
|
|
Figure width (in inches) |
|
|
|
Size of the location markers |
|
|
|
Color of the location markers |
|
|
|
Size of the text annotations (if 0 or negative, no text is shown) |
|
|
|
Transparency level of the markers |
|
|
|
Robust z-score (MAD) above which a value is flagged as an outlier |
|
|
|
Deployment names are drawn on the x axis only up to this number of deployments |
|
|
|
Figure height (in inches) |
|
|
|
Figure width (in inches) |
|
|
|
Figure height (in inches) |
|
|
|
Figure width (in inches) |
|
|
|
Number of data points per segment |
|
|
|
Number of overlapping points |
|
|
|
Frequency limits (Hz) |
|
|
|
Dynamic range in decibels |
|
|
|
Colormap options: ‘grey’, ‘viridis’, ‘plasma’, ‘inferno’, ‘cividis’ |
|
|
|
Length of each sample for timelapse (in seconds) |
|
|
|
Time interval between samples (e.g., ‘30min’) |
|
|
|
Specific date for timelapse (YYYY-MM-DD). If null, the date with the most data will be used. |
|
Outputs
All files are written to data/output/quality_control/:
Output |
File |
Description |
|---|---|---|
|
|
Minutes recorded by each recorder per day. |
|
|
Data behind the timeline figure. |
|
|
Map of the deployment locations. |
|
|
Summary card of the survey effort. |
|
|
% deviation of file length and sample rate from each deployment’s median. |
|
|
List of outlier files with the variable flagged and the deployment medians. |
|
|
One audio file ( |
3. Species detection
Description
Automates species detection using a TensorFlow or BirdNET model. It filters observations based on target species, then saves customized audio segments for revision. All data follows pamDP standards.
pamflow run --pipeline species_detection
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Runs the species detection algorithm in parallel using media and deployment data to generate unfiltered species observations. |
|
|
|
Filters unfiltered observations based on target species, minimum number of observations, and segment size parameters. |
|
|
|
Selects up to |
|
|
|
Generates an audio folder dataset from created segments for downstream processing or manual validation. |
|
|
|
Produces manual annotation files from segment data for human validation or annotation tools. |
|
|
|
Creates summary plots visualizing total and temporal patterns of species observations relative to media data. |
|
|
|
Plots the number or distribution of observations per species to visualize detection results. |
|
|
Parameters
Group |
Name |
Description |
Default Value |
|---|---|---|---|
|
|
Number of cores used in parallelization. |
|
|
|
Minimum number of detections required for a species to be included in the observations format. |
|
|
|
Maximum number of sample segments generated per species (fewer are used if a species has fewer available observations). |
|
|
|
File name template for the manual annotation files, one per species. The word |
|
|
|
Length in seconds of each audio segment extracted for manual validation. |
|
|
|
Path to a custom BirdNET classifier model file. |
|
|
|
Path to the labels file of the custom classifier. Each line must follow the format |
|
Outputs
All files are written to data/output/species_detection/:
Output |
File |
Description |
|---|---|---|
|
|
All detections of the model, regardless of species. |
|
|
Detections filtered by |
|
|
Selected segments (up to |
|
|
Audio clips ( |
|
|
One Excel file per species to be filled by an expert. |
|
|
Summary figure of the observations. |
|
|
Number of detections per species. |
4. Acoustic indices
pamflow run --pipeline acoustic_indices
Description
Processes audio files to calculate various acoustic indices. These indices provide a quantitative overview of the soundscape, useful for a wide range of analyses.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Computes acoustic indices from media data based on provided parameters, generating partitioned datasets for further ecological or acoustic analysis. |
|
|
Parameters
Group |
Name |
Description |
Default Value |
|---|---|---|---|
|
|
Length of each segment for FFT during preprocessing. |
|
|
|
Number of points to overlap between FFT segments. |
|
|
|
Sampling rate for acoustic index analysis. |
|
|
|
Type of filter applied to the audio signal (e.g., bandpass). |
|
|
|
Frequency cutoff range for the filter in Hz. |
|
|
|
Filter order defining the steepness of the filter roll-off. |
|
|
— |
Acoustic Complexity Index (no additional parameters). |
— |
|
|
Minimum frequency (Hz) for index calculation. |
|
|
|
Maximum frequency (Hz) for index calculation. |
|
|
|
Frequency bin width (Hz) used in analysis. |
|
|
|
Diversity index type used (e.g., shannon). |
|
|
|
Threshold level (in dB) for inclusion in the index computation. |
|
|
|
Frequency range (Hz) for BI index computation. |
|
|
— |
Spectral entropy in the frequency domain (no parameters). |
— |
|
— |
Temporal entropy index (no parameters). |
— |
|
— |
Overall acoustic entropy combining temporal and spectral dimensions (no parameters). |
— |
|
|
Frequency range (Hz) for biophony band. |
|
|
|
Frequency range (Hz) for anthrophony band. |
|
|
|
Peak detection mode used (e.g., linear). |
|
|
|
Minimum amplitude threshold for peaks. |
|
|
|
Minimum frequency distance (Hz) between detected peaks. |
|
|
|
Slope values for spectral peak analysis (if applicable). |
|
|
|
Minimum prominence value for peak detection. |
|
|
— |
Root Mean Square energy index (no parameters). |
— |
|
|
Threshold level (in dB) for spectral cover index computation. |
|
|
|
Frequency range (Hz) for low-frequency band. |
|
|
|
Number of CPU cores used for parallel processing. |
|
5. Graphical soundscape
pamflow run --pipeline graphical_soundscape
Description
Computes a representation of the most prominent spectro-temporal dynamics over a 24-hour window per each deployment. For each deployment, a data file (graph_<deploymentID>.csv) and a figure (graph_<deploymentID>.png) are saved together in data/output/graphical_soundscape/.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Generates graphical representations of the soundscape using media data and visualization parameters, producing both data outputs and image plots for analysis. |
|
|
Parameters
Group |
Name |
Description |
Default Value |
|---|---|---|---|
|
|
Target sampling frequency used when processing audio data. |
|
|
|
Window size used to compute the spectrogram. |
|
|
|
Overlap between consecutive windows in the spectrogram computation. |
|
|
|
Dynamic range in decibels for spectrogram visualization. |
|
|
|
Minimum distance between detected peaks in the spectrogram. |
|
|
|
Absolute threshold (in dB) for peak detection. |
|
|
|
Number of CPU cores used for parallelization. |
|
6. Detection validation
pamflow run --pipeline detection_validation
Description
Estimates, per species, the probability that a detection is correct as a function of the model’s confidence score, using manually annotated audio segments. It fits a logistic regression (positive ~ classificationProbability) per species and derives a recommended working threshold — the score above which detections meet a target precision — along with a diagnostic of whether enough annotations exist to trust that threshold.
Note
Unlike the other pipelines, detection_validation is not part of the default pamflow run flow. It depends on a manual step: the manual_annotations .xlsx files produced by species_detection must first be reviewed and have their positive column filled in by an expert. Once that’s done, run this pipeline explicitly with the command above.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Concatenates all per-species manual annotation files, normalizes the free-text |
|
|
|
Fits a per-species logistic regression of detection correctness against classification score, flagging species with insufficient sample size or perfect separation instead of fitting. |
|
|
|
Inverts each fitted curve to compute the score threshold that meets the target precision, and assigns a validity status per species. |
|
|
|
Generates one diagnostic plot per species showing the annotated segments, fitted curve, confidence band, and recommended threshold. |
|
|
The key output, detection_validation_summary.csv, reports a status per species that determines whether the recommended threshold (t_star) can be trusted:
Status |
Meaning |
|---|---|
|
A valid threshold was found; |
|
Too few annotations (or too few per class) to fit a model. |
|
Scores perfectly separate positives from negatives; the fit is degenerate. |
|
The fitted relationship is not statistically significant (likelihood-ratio test). |
|
Higher scores are associated with lower correctness probability. |
|
No observed score reaches the target precision. |
|
Even the lowest observed score already meets the target precision. |
Parameters
Group |
Name |
Description |
Default Value |
|---|---|---|---|
|
|
Minimum desired probability that a detection at the recommended threshold is correct. |
|
|
|
Significance threshold for the likelihood-ratio test (fitted model vs. intercept-only null model). |
|
|
|
Confidence level used for the coefficient and plotted confidence band. |
|
|
|
Minimum number of annotations required to attempt a fit for a species. |
|
|
|
Minimum number of positive and of negative annotations required to attempt a fit. |
|
|
|
Transform applied to the score before fitting: |
|
|
|
How |
|
|
|
Recognized free-text values (case-insensitive) treated as a positive annotation. |
|
|
|
Recognized free-text values (case-insensitive) treated as a negative annotation. |
|
|
|
Recognized free-text values (case-insensitive) treated as an uncertain annotation. |
|
7. Filter media
Description
Selects the recordings that the heavy processing pipelines will use. It reads media@pamDP (all the recordings found by data_preparation) and writes media_work@pamDP. graphical_soundscape, acoustic_indices and species_detection read media_work@pamDP. This lets you test the workflow on a few deployments, or process the deployments in batches, without changing the audio folder. filter_media has no pipeline name of its own: it runs automatically at the beginning of pamflow run and of those three pipelines.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Keeps only the recordings of the deployments listed in |
|
|
Parameters
Group |
Name |
Description |
Default Value |
|---|---|---|---|
|
List of |
|
Example, in conf/local/parameters.yml:
deployments_filter: ["MC-002", "MC-007"]
Quality control and export read media@pamDP, so they are not affected by the filter.
8. Export
pamflow run --pipeline export
Description
Converts the pamDP tables to the camtrapDP/GBIF format for publication or exchange. It reads the files written by data_preparation and species_detection (media, deployments and observations), so those pipelines must have been run first. It is not part of pamflow run.
Nodes
Node name |
Description |
Inputs |
Outputs |
|---|---|---|---|
|
Moves the audio-specific columns ( |
|
|
|
Renames |
|
|
|
Converts |
|
|
This pipeline has no parameters. The outputs are written to data/output/export/: media_gbif.csv, deployments_gbif.csv and observations_gbif.csv.