What’s all the buzz about? Passive acoustic monitoring of bees
Data files
Sep 22, 2026 version files 3.88 GB
-
koogu_submitted.zip
3.88 GB
-
Rcode_for_dryad_final.zip
155.57 KB
-
README.md
18.92 KB
Abstract
There has been a growing need for non-lethal methods of monitoring pollinators. Despite advances in passive acoustic monitoring (PAM) transforming other fields of wildlife research, its application to pollinator monitoring has remained limited. However, bees produce distinctive flight and sonication sounds, making them promising candidates for PAM. We developed two convolutional neural network models to detect bee acoustic signals from field recordings. Our dataset comprised 594 recordings collected over five years from 43 sites and encompassed a broad range of habitat types and background noise conditions. The models primarily target honey bees (Apis mellifera) and bumble bees (Bombus spp.). Model 1 detects overall bee activity, including honey bee and bumble bee flight and sonication sounds as well as foraging sounds produced by other species such as the eastern carpenter bee (Xylocopa virginica). Model 2 distinguishes honey bee flight, bumble bee flight, and bumble bee sonication. Both models were validated against independent field observations made by trained observers.
Here we present the Python code for training and testing the convolutional neural network models (and associated audio data and annotations), as well as the R code and corresponding tabular data summarizing the audio data collected (e.g., location, bee identification, year), the ground-truthing trials (comparing visual observations made by a trained observer with model detections), and the distance trials (assessing how far from the audio recorder bees were still picked up by the model, and whether model confidence affected the distance).
Dataset DOI: 10.5061/dryad.sbcc2frnh
Authors: Laura L. Figueroa*, Christopher R. Myers, Anna B. Kohlberg, Lauren Cody, Shyam Madhusudhana, and Laurel B. Symes
*Corresponding author: Laura L. Figueroa (University of Massachusetts Amherst, Environmental Conservation, 160 Holdsworth Way, llf44@umass.edu)
Dataset DOI: 10.5061/dryad.sbcc2frnh
Description of the data and file structure
There are two zipped folders, one with the code and files for constructing the CNN models via koogu ("koogu_submitted") and the other has the R code and files for the statistical analyses and figures ("Rcode_for_dryad").
Files and variables
File: koogu_submitted.zip
Description: code and files for constructing the CNN models via koogu
File: Rcode_for_dryad_final.zip
Description: R code and files for the statistical analyses and figures
---------------------------------
DATA & FILE OVERVIEW
----------------------------------
See below for detailed descriptions of tabular data files.
Directory of CNN model figures (koogu_submitted folder)
Also see README.txt in koogu_submitted/.
File name: training_pipeline.py
Description: Python code for training models and generating Precision-Recall plots (model training)
Notes: requires a Python environment containing: koogu (this work used v. 0.7.2; https://github.com/shyamblast/Koogu), tensorflow (this work used v. 2.18.0), matplotlib, and numpy
File name: process_PR_data.py
Description: Python code for post-processing trained model to generate CSV files for Precision-Recall (model assessment)
File name: feeder.py
Description: auxiliary Python code used by training_pipeline.py
File name: training_data_table.csv
Description: CSV file containing pairs of audio+annotation files for training
File name: testing_data_table.csv
Description: CSV file containing pairs of audio+annotation files for testing
Folder name: final_CNN_files > CNN > annotations + audio
Description: folders with audio recordings (.wav files) and corresponding annotations (.txt files), separated by whether used in model training or testing
Rcode_for_dryad directory
R Code name: distance_trials.R
Description: This is the R code that corresponds to the analysis and figures of the distance trials (distance between microphone and foraging bee)
R Code name: general_summary.R
Description: This is the R code that corresponds to the general summary of the training and test data (detail the audio recordings collected in the field, including location, date, and bee species recorded)
R Code name: groundtruth_trials.R
Description: This is the R code that corresponds to the analysis and figures of the groundtruthing trials in which visual observations are compared to model detections in the field.
R Code name: precision_recall_graphs.R
Description: This is the R code that corresponds to the precision and recall graphs of the Model 1 and Model 2 outputs
Filename: bee_bioacoustics_data_compiled
Short description: dataset compiling all information associated with the audio recordings made for the training and testing of the two CNN models
Filename: combined_distance
Short description: dataset associated with distance trials
Filename: false_positives
Short description: dataset associated with false positive assessment
Filename: groundtruth_2022_field_data
Short description: dataset associated with field observations of ground truth trials
Filename: groundtruth_2022_post_raven
Short description: dataset associated with model output (RavenPro) of ground truth trials
Filename: model1_bee
Short description: dataset associated with Model 1 assessments for class "bee" (precision and recall curves)
Filename: model2_bumble_flight
Short description: dataset associated with Model 2 assessments for class "bumble bee flight" (precision and recall curves)
Filename: model2_buzz
Short description: dataset associated with Model 2 assessments for class "bumble bee sonication" (precision and recall curves)
Filename: model2_honey_flight
Short description: dataset associated with Model 2 assessments for class "honey bee flight" (precision and recall curves)
Missing values
Missing data points are represented with "NA" across all tabular data files, and represent data that was either not acquired or not relevant.
-----------------------------------------------------------------------------------
DATA DESCRIPTION FOR: bee_bioacoustics_data_compiled
Columns:
A. Name: file_name
Description: Unique filename of the audio recording file associated with the observation.
B. Name: Location
Description: Broad geographic location where the recording was collected (e.g., greenhouse, garden, solar facility, indoors, or meadow).
C. Name: Site
Description: Specific sampling site (unique ID of the site).
D. Name: State
Description: U.S. state where the recording was collected.
E. Name: Date
Description: Calendar date on which the recording was made, month/day/year.
F. Name: Year
Description: Year in which the recording was collected.
G. Name: Time
Description: Local time at which the recording began, in 24-hour format.
H. Name: Duration
Description: Length of the audio recording, reported in seconds.
I. Name: Background
Description: Description of environmental or non-target sounds present in the recording (e.g., wind, human voice, birds, car).
J. Name: Conditions
Description: General weather and environmental conditions during recording (e.g., sunny, cloudy, windy, partly cloudy).
K. Name: Temp
Description: Ambient air temperature at the time of recording in Fahrenheit.
L. Name: Notes
Description: Additional comments about spectrogram.
M. Name: Buzz
Description: Whether the recording constituted a buzz (for bumble bees).
N. Name: Species
Description: Taxonomic identification of the bee, recorded at the lowest taxonomic level available.
O. Name: Species_grouped
Description: When multiple taxonomic groups were present in one recording, all are listed here (e.g., A.mellifera_Bombus.sp because both honey bees and bumble bees were present in the recording).
P. Name: Caste
Description: Bee caste associated with the observation, such as worker, queen, or male (drone), when known.
Q. Name: Recorder
Description: Device, recording system, or equipment used to collect the audio sample, primarily Swift (SwiftOne), but also DR-100mkII and cell phones.
R. Name: Observer
Description: Person who conducted the observation, annotation, or field collection associated with the recording.
S. Name: Foraging_Plant
Description: Plant species or floral resource being visited by the bee during the recording, when observed.
T. Name: Quality
Description: Assessment of recording quality or suitability for analysis, based on factors such as noise, clarity, and signal strength.
U. Name: previous_description
Description: Legacy description or annotation associated with the recording from an earlier version of the dataset.
V. Name: model_inclusion
Description: Indicates whether the recording was included in model training or testing.
W. Name: model_inclusion_notes
Description: Notes associated with model inclusion.
-----------------------------------------------------------------
DATA DESCRIPTION FOR: combined_distance
Columns:
A. Name: file_name
Description: Unique filename of the processed file.
B. Name: file_duration
Description: Total duration of the audio recording or processed file in minutes:seconds.
C. Name: confidence_interval
Description: The confidence threshold (minimum) selected in RavenPro (either 0.5 or 0.9)
D. Name: detections
Description: Number of acoustic detections identified by the model.
E. Name: begin_time_s
Description: Start time of the detected sound event within the source recording, measured in seconds from the beginning of the recording.
F. Name: end_time_s
Description: End time of the detected sound event within the source recording, measured in seconds from the beginning of the recording.
G. Name: low_freq_hz
Description: Lower frequency bound of the detected sound event (80 Hz).
H. Name: high_freq_hz
Description: Upper frequency bound of the detected sound event (3815 Hz).
I. Name: score
Description: Model confidence score (values closer to 1 indicate higher model confidence)
J. Name: label
Description: Class label assigned to the detected sound event ("bee" because Model 1).
K. Name: trial_ID
Description: Unique trial ID.
L. Name: distance_cm
Description: Distance between the recorder and the sound source, measured in centimeters. This was the value used in the analyses.
M. Name: date
Description: Calendar date on which the recording or experimental trial was conducted (day/month/year).
N. Name: distance_cm_close
Description: Closest measured distance between the recorder and the sound source during the trial, in centimeters.
O. Name: distance_cm_far_end
Description: Farthest measured distance between the recorder and the sound source during the trial, in centimeters.
P. Name: recorder
Description: Specific audio recorder used to collect the audio sample.
Q. Name: sound
Description: notes about whether the audio recording was perceived by the annotator as loud or quiet.
R. Name: spectrogram
Description: notes about whether the spectrogram was visually clear.
S. Name: location
Description: whether the trial was conducted indoors or outdoors.
T. Name: number_of_bees
Description: Number of bees present during the trial.
U. Name: colony
Description: Identifier for the bee colony associated with the recording.
V. Name: detections_raven
Description: Whether or not the model run through RavenPro detected bees.
----------------------------------------------------------
DATA DESCRIPTION FOR: false_positives
Columns:
A. Name: model
Description: Clarifying that all false positive assessments were based on Model 1 outputs.
B. Name: file_date
Description: Calendar date associated with the audio recording or analysis file (month/day/year).
C. Name: file_name
Description: Unique filename of the audio file.
D. Name: file_duration
Description: Total duration of the audio recording, reported in minutes:seconds.
E. Name: ci_model
Description: The confidence threshold (minimum) selected in RavenPro (all 0.5)
F. Name: detections
Description: Number of acoustic detections identified within the recording or analysis period.
G. Name: true_positive
Description: Indicates whether a detection was verified as a true positive following manual review or validation (0 = false positive, 1 = true positive).
H. Name: begin_time_(s)
Description: Start time of the detected sound event within the recording, measured in seconds from the beginning of the file.
I. Name: end_time_(s)
Description: End time of the detected sound event within the recording, measured in seconds from the beginning of the file.
J. Name: low_freq_(Hz)
Description: Lower frequency limit of the detected sound event (80 Hz).
K. Name: high_freq_(Hz)
Description: Upper frequency limit of the detected sound event (3815 Hz).
L. Name: score
Description: Model confidence score (values closer to 1 indicate higher model confidence)
M. Name: label
Description: Class label assigned to the detected sound event ("bee" because Model 1).
N. Name: notes
Description: Additional comments, observations, or reviewer notes associated with the detection or annotation.
------------------------------------------------------------------------------
DATA DESCRIPTION FOR: groundtruth_2022_field_data
Columns:
A. Name: file_name
Description: Unique filename of the audio recording file associated with the observation.
B. Name: quadrat_type_cm
Description: Size or type of quadrat used during sampling, reported in centimeters (either 25x25 or 50x50)
C. Name: site
Description: Unique identifier or name of the sampling site where observations were collected (collected in Florence Community Garden, MA)
D. Name: date
Description: Calendar date on which the observation or recording was conducted (9/21/2022)
E. Name: time
Description: Local time at which sampling or recording began.
F. Name: condition
Description: Weather and environmental conditions during sampling (partly sunny)
G. Name: temperature_F
Description: Ambient air temperature at the time of sampling, measured in degrees Fahrenheit (75F)
H. Name: background_noise
Description: Description of environmental or anthropogenic sounds present during sampling (e.g., car, wind, human voice).
I. Name: notes
Description: Additional comments or observations recorded during data collection.
J. Name: data_all
Description: Combined summary of all insect observations recorded during the sampling event.
K. Name: Bombus.sp
Description: Count of bumble bee (Bombus spp.) observations recorded during the sampling event.
L. Name: A.mellifera
Description: Count of honey bee (Apis mellifera) observations recorded during the sampling event.
M. Name: Diptera
Description: Count of fly (Diptera) observations recorded during the sampling event.
N. Name: Wasp
Description: Count of wasp observations recorded during the sampling event.
O. Name: Unknown_bee
Description: Count of bee observations that could not be identified to a specific taxonomic group.
P. Name: Unidentified_insect
Description: Count of insect observations that could not be identified to a taxonomic group.
Q. Name: total_tally
Description: Total number of all insect observations recorded during the sampling event.
R. Name: all_bees
Description: Total number of all bee observations recorded during the sampling event.
--------------------------------------------------------------------------------
DATA DESCRIPTION FOR: groundtruth_2022_post_raven
Columns:
A. Name: file_name
Description: Unique filename of the audio recording.
B. Name: file_date
Description: Calendar date associated with the audio recording or analysis file (9/21/2022)
C. Name: file_duration
Description: Total duration of the audio recording, reported in minutes:seconds.
D. Name: model
Description: Name or identifier of the machine learning model used to generate detections or classifications (Model 1 or Model 2)
E. Name: ci
Description: Confidence threshold specified in RavenPro (0.5)
F. Name: detections
Description: Number of acoustic detections identified within the recording or analysis period by the model for that entire file.
G. Name: begin_time_s
Description: Start time of the detected sound event within the recording, measured in seconds from the beginning of the file.
H. Name: end_time_s
Description: End time of the detected sound event within the recording, measured in seconds from the beginning of the file.
I. Name: low_freq_Hz
Description: Lower frequency limit of the detected sound event (80 Hz)
J. Name: high_freq_Hz
Description: Upper frequency limit of the detected sound event (3815 Hz)
K. Name: score
Description: Model confidence score (values closer to 1 indicate higher model confidence)
L. Name: label
Description: Class assigned to the detected sound event (e.g., Model 1: bee, Model 2: honey bee flight (hb_flight), bumble bee flight (bo_flight), and bumble bee sonication (bo_buzz)).
M. Name: true_positives
Description: Number of detections that were verified as true positives following manual review or validation (only completed for Model 1).
N. Name: notes
Description: Additional comments, observations, or reviewer notes associated with the detection or annotation.
---------------------------------------------------------
DATA DESCRIPTION FOR: model1_bee
Columns:
A. Name: class_name
Description: Name of the class or category being evaluated by the model ("bee").
B. Name: threshold
Description: Decision threshold used to determine whether a model prediction is classified as a positive detection.
C. Name: recall
Description: Proportion of true positive detections correctly identified by the model, calculated as true positives divided by the sum of true positives and false negatives.
D. Name: precision
Description: Proportion of positive detections that are correct, calculated as true positives divided by the sum of true positives and false positives.
----------------------------------------------------------------------
DATA DESCRIPTION FOR: model2_bumble_flight
Columns:
A. Name: class_name
Description: Name of the class or category being evaluated by the model ("bo_flight" = bumble bee flight).
B. Name: threshold
Description: Decision threshold used to determine whether a model prediction is classified as a positive detection.
C. Name: recall
Description: Proportion of true positive detections correctly identified by the model, calculated as true positives divided by the sum of true positives and false negatives.
D. Name: precision
Description: Proportion of positive detections that are correct, calculated as true positives divided by the sum of true positives and false positives.
---------------------------------------------------------
DATA DESCRIPTION FOR: model2_buzz
Columns:
A. Name: class_name
Description: Name of the class or category being evaluated by the model ("bo_buzz" = bumble bee sonication).
B. Name: threshold
Description: Decision threshold used to determine whether a model prediction is classified as a positive detection.
C. Name: recall
Description: Proportion of true positive detections correctly identified by the model, calculated as true positives divided by the sum of true positives and false negatives.
D. Name: precision
Description: Proportion of positive detections that are correct, calculated as true positives divided by the sum of true positives and false positives.
-------------------------------------------------------------------
DATA DESCRIPTION FOR: model2_honey_flight
Columns:
A. Name: class_name
Description: Name of the class or category being evaluated by the model ("hb_flight" = honey bee flight).
B. Name: threshold
Description: Decision threshold used to determine whether a model prediction is classified as a positive detection.
C. Name: recall
Description: Proportion of true positive detections correctly identified by the model, calculated as true positives divided by the sum of true positives and false negatives.
D. Name: precision
Description: Proportion of positive detections that are correct, calculated as true positives divided by the sum of true positives and false positives.
Code/software
Python and R
