BioDCASE-Tiny 2026 competition (Task 3) - A machine learning competition for bird sound recognition on tiny hardware.
BioDCASE-Tiny is a competition for developing efficient machine learning models for bird audio recognition that can run on resource-constrained embedded devices. The project uses the ESP32-S3-Korvo-2 development board, which offers audio processing capabilities in a small form factor suitable for field deployment. This year we added a pytorch framework along the tensorflow framework from last year offering participants to choose between one of the two machine learning frameworks. Please, also visit the official BioDCASE 2026 Task 3 website for additional information.
- Dataset
- Setup and Installation
- Development
- Submission
- Limitations
- Support
- License
- Citation
- Acknowledgement
The dataset consists of 2750 audio field recordings of 3 s length from 10 bird species plus 1 background class from urban environments resulting in 11 classes in total. The dataset is available for download on Zenodo where additional details are provided as well.
- Python >=3.11 and <=3.13 with pip and venv
- Docker (runs ESP-IDF in a container) OR locally installed ESP-IDF
- (optional) ESP32-S3-Korvo-2 development board and two USB cables (power and serial connection)
Important
You can also participate in the challenge if you do not want to buy a Korvo-2 dev board, but consider that you will not be able to check if your model is actually deployable on the Korvo system.
If the deployable model (.tflite) does not exist or isn't able to run on our system, you will be ranked lower in the competition.
We still recommend to buy the Korvo-2 dev board to get the full embedded experience of this task.
- Clone the repository:
git clone https://github.com/birdnet-team/BioDCASE-Tiny-2026.git
cd BioDCASE-Tiny-2026-
Install your favorite python version (as long as it is able to build the requirements, see prerequisities for working version).
-
Create a virtual environment (recommended) here with python version 3.13 as example:
python3.13 -m venv .venv
source .venv/bin/activate- Install Python dependencies depending on the framework you want to use (pytorch or tensorflow):
pip install -r requirements_<pytorch|tensorflow>.txt- Install Docker on your system. Afterwards you have to activate the docker deamon and add it to your user group. On Linux (depends on your distribution) this can be achieved with:
systemctl status docker.socket
systemctl enable docker.socket
sudo gpasswd -a <your_username> dockerTo test if your Docker runs you can do:
docker run hello-world- (alternatively) install the ESP-IDF framework on your local PC and compile the code using
idf.pycommands. You have to have a look into the code of the repository and figure out which docker commands are used for building and deploying the code.
- Move the downloaded dataset to any location on your PC, for instance,
/path/to/your/downloaded/dataset/and editconfig.yamlfile at following location (the path can also be relative to the path you start the script):
datamodule:
dataset:
root_path: /path/to/your/downloaded/dataset/you can also change the intermediate and cache (feature) paths at:
datamodule:
intermediate:
root_path: ./output/01_intermediate/
caching:
root_path: ./output/02_features/- (optional) Make sure to add rights to your usb device connecting to the Korvo-2 dev board. This depends a bit on the system, on Linux, you have to add udev rules in
/etc/udev/rules.d/, e.g. add a file there/etc/udev/rules.d/10-custom-usb.ruleswith content:
# ubuntu vs. arch: GROUP="dialout" vs. GROUP="uucp"
# rule for esp32 (devkit-c or korvo)
KERNEL=="ttyUSB0", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GROUP="uucp", MODE="0666"
and add to your group ("uucp" for arch, "dialout" for ubuntu), then reload and restart your PC:
sudo gpasswd -a <your_username> uucp
sudo udevadm control --reload-rules
- (optional) Set your serial device port in the
config.yamlfor Linux it is usually/dev/ttyUSB0
generate_embedded_code:
serial_device: <YOUR_DEVICE> We recommend using Windows Subsystem for Linux (WSL) to run this project. To make your device accessible for WSL you can use this Guide. To determine your serial device port you can use the following command:
dmesg | grep ttyYou might also need to grant rights to run the deployment:
sudo adduser $USER dialout
sudo chmod a+rw $SERIAL_PORT- Modify
config.yamlto change feature extraction or model parameters. - Modify corresponding model files in either
pipeline_pytorch/orpipeline_tensorflow/framework folders.
Important
Writing custom features rather than using the implemented ones, requires implementing a numerically equivalent version on the embedded target too! This is a necessary condition for the evaluated model to behave identically on the host and on the embedded target likewise. Note, that this is a non-trivial undertaking and we generally advice to stick to already implemented feature extraction in this repository!
To run the complete pipeline on the pytorch framework execute:
python biodcase2026_tiny_ml_pytorch.pyand for the tensorflow framework:
python biodcase2026_tiny_ml_tensorflow.pyThis will run the data preprocessing, extraction of features, training of the model, and deployment on your development board. Once deployed, the benchmark code on the ESP32-S3 will display information about the runtime performance of the preprocessing steps and the deployed model via serial monitor (over USB cable).
biodcase2026_tiny_ml__<pytorch|tensorflow>.py- Main execution pipelinedatamodule.py- Datamodule for preprocessing, feature extraction, and data storagepipeline_pytorch/- Pytorch framework folderpipeline_tensorflow/- Tensorflow framework foldermodel_evaluation.py- Evaluate modelsbiodcase_tiny/embedded/firmware/main- Firmware source code that will be copied and modified for the ESP targetbiodcase_tiny/embedded/esp_target.py- ESP build target creationbiodcase_tiny/embedded/esp_toolchain.py- ESP toolchain with Docker IDF to build, flash, and monitorsubmission/- Guidelines and testing of your submission package
Both data processing and feature extraction is handled by datamodule.py and follows following steps:
- Raw audio files are read, checked, and stored.
- Features are extracted by
feature_handler.pyaccording to the configuration set inconfig.yamlwhere bothfeature_extractionandfeature_handler_add_kwargsare passed to theFeatureHandlerclass. The config to adapt is:
datamodule:
feature_extraction:
window_len: 4096
window_stride: 512
...
feature_handler_add_kwargs:
target_sample_rate: 24000
transpose_features_extracted: True
...
- The preprocessed data (intermediate) and features (caching) are stored and reloaded once they exist.
Therefore, if you change the feature extraction parameters you either have to delete the cached folders or set the
redoflags toTruein
datamodule:
redo_all: False
redo_intermediate: False
redo_cache: Falseor you change the ids in
datamodule:
intermediate:
root_path: './output/01_intermediate'
intermediate_id: 'intermediate0'
...
caching:
root_path: './output/02_features'
cache_id: 'cache0'
...If you want to run only the data preprocessing and feature extraction with a visualization of data samples (and audio playback) execute:
python datamodule.pyThe model training is started either by biodcase2026_tiny_ml_pytorch.py or biodcase2026_tiny_ml_tensorflow.py depending on your framework of choice.
When choosing the pytorch framework, the model files are located in ./pipeline_pytorch.
The model training process is managed in model_training.py where the training/validation steps are defined in model_base.py by the ModelBase class.
The model architecture can be customized in model_tiny_ml.py by overwriting any function you wish to change.
You can also create a new model file, but make sure that your model class inherits ModelBase which is required for the submission process.
To configure the model training change fields in config.yaml at:
pytorch_framework:
dataloader_train_kwargs:
batch_size: 32
shuffle: true
dataloader_validation_and_test_kwargs:
batch_size: 32
shuffle: false
model:
module: pipeline_pytorch.model_tiny_ml
attr: Baseline
args: []
kwargs:
device:
use_cpu: False
device_name: 'cuda:0'
criterion: {'module': 'torch.nn', 'attr': 'CrossEntropyLoss', 'kwargs': {}}
optimizer: {'module': 'torch.optim', 'attr': 'Adam', 'kwargs': {'lr': 0.001, 'betas': [0.9, 0.999]}}
verbose: False
model_training:
num_epochs: 100The dataloader kwargs are useful for setting the batch size in training.
In the model entry, the module is the python package (or file), attr the function (in this case the model class), and args and kwargs are passed to this model class.
When choosing the pytorch framework, the model files are located in ./pipeline_tensorflow.
The model training process is managed in model_training.py where Keras model creation and training step is defined in model.py.
This framework was adapted from previous year's BioDCASE 2025 competition.
You can configure your model training in config.yaml at:
tensorflow_framework:
model_training:
seed: 42
n_epochs: 100
shuffle_buff_n: 10000
batch_size: 32
early_stopping:
patience: 100Evaluate all models that were already trained and saved in ./output/03_models/ on classification performance with:
python model_evaluation.pyThe resource efficiency from the .tflite models is not evaluated but can be found in the report directories output/04_reports/ as monitor_report.yaml file which is saved after training and deployment.
Our model build and deployment procedure to the ESP32-S3-Korvo-2 development board follows following three main steps:
- Build target creation
- Compilation (Docker or ESP-IDF)
- Deployment and Monitoring (Docker or ESP-IDF)
In the build target creation step, the firmware in ./biodcase_tiny/embedded/firmware/main/ is copied and processed with Jinja where the serialized .tflite model (stored by the pipeline in e.g. ./output/03_models/pytorch) and feature extraction parameters are inserted.
The build target is stored in ./output/05_generated_embedded_code/src/.
Once the build target is ready, the compilation is done by:
python compile_embedded_src_code.pyAfterwards you can deploy the compiled code on the actual device with:
python deploy_embedded_compiled_code.pyNote: If you do not want to use docker, have a look into embedded_code_generation.py and biodcase_tiny/embedded/esp_toolchain.py where you find the corresponding idf.py commands for building (build), deploying (flash), and monitoring (monitor).
We still recommend to use docker, because it stores the monitor output to e.g. ./output/04_reports/pytorch/monitor_report.yaml where the resource efficiency metrics on the device are shown.
The ESP32-S3-Korvo-2 development board features:
- ESP32-S3 dual-core processor
- Built-in microphone array
- Audio codec for high-quality audio processing
- Wi-Fi and Bluetooth connectivity
- Software Support
and can be bought, for instance, here.
- Feature Extraction Parameters: Carefully tune the feature extraction parameters in
config.yaml. - Model Size: Keep your model compact. The ESP32-S3 has limited memory, so optimize your architecture accordingly.
- Profiling: Use the profiling tools to identify bottlenecks in your implementation.
- Memory Management: Be mindful of memory allocation on the ESP32. Monitor the allocations reported by the firmware.
- Docker Environment: The toolchain uses Docker to provide a consistent ESP-IDF environment, making it easier to build on any host system.
Rules and guidelines for submission are defined in the ./submission/README.md file here.
In short, you will have to submit a .zip file containing:
- Inference model
- (optional) Embedding model (tflite)
- (optional) Built embedded code (src)
- (alternative) Feature extraction algorithm that does not follow the baseline algorithm
- A YAML metadata file describing details of your submission
- Technical report (.pdf)
Your solution will be evaluated on a hidden test set and the scores and technical reports will be presented in the upcoming results section of the BioDCASE website.
The BioDCASE-Tiny competition evaluates models based on multiple criteria on Classification Performance and Resource Efficiency:
- Top-1 Accuracy: Accuracy of the highest predicted class to the target class
- ROC AUC: Area Under the Receiver Operating Characteristic Curve
- Model Size:
.tflitemodel file size (KB) - ESP32-S3 Processing Times: Feature extraction, model, and total time for running the audio classification on the ESP32-S3 (on Korvo-2 dev board)
- Peak Memory Usage: Maximum RAM usage during inference (KB)
Participants will be ranked according to all evaluation metrics.
The following table shows our baseline results on the pytorch framework evaluated on the validation dataset:
| Inference Model | Embedding Model | Embedded Performance on ESP32-S3 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ACC | ROC AUC | Size [Bytes] | MACs | ACC | ROC AUC | Size [Bytes] | MACs | Time Setup [ms] | Time Preprocessing [ms] | Time Model [ms] | Time Total [ms] | RAM Usage [Bytes] |
| 0.5647 | 0.8921 | 393109 | 23326923 | 0.5628 | 0.8923 | 111408 | 23315232 | 4.44 | 3.11 | 330.36 | 337.9 | 202556 |
The challenge results are now available at the BioDCASE2026 Task3 - results webpage. We thank each participant for joining the challenge and contributing research in tiny machine learning for bird sound recognition.
This framework does not yet use real microphone data from the Korvo-2 dev board! Instead, it runs a profiler to evaluate the model and feature extraction in size and time consumption. Therefore, we are looking for interested collaborators to improve this project (especially on the embedded side) and create an even better challenge starting point for future editions of BioDCASE.
If you find errors in code or if you have problems in getting started, please create a GitHub issue within this repository. We are happy to get any feedback to improve this repository!
This project is licensed under the Apache License 2.0 - see the license headers in individual files for details.
If you use the BioDCASE-Tiny framework or dataset in your research, please cite the following:
@misc{biodcase_tiny_2026_repo,
author = {Walter, Christian and Benhamadi, Yasmine and Seidel, Tom and Carmantini, Giovanni and Kahl, Stefan},
title = {BioDCASE-Tiny 2026: A Framework for Bird Species Recognition on Resource-Constrained Hardware},
year = {2026},
type = {Software},
publisher = {GitHub},
journal = {GitHub Repository},
howpublished = {\url{https://github.com/birdnet-team/BioDCASE-Tiny-2026}},
}@dataset{biodcase_tiny_2026_dataset,
author = {Kahl, Stefan, and Martin, Ralph},
title = {BioDCASE 2026 Task 3: Bioacoustics for Tiny Hardware Development Set},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.19453065},
url = {https://doi.org/10.5281/zenodo.19453065}
}- C.W. was supported by the University of Veterinary Medicine, Vienna
- Y.B. was supported by the EU MSCA Doctoral Network Bioacoustic AI (BioacAI, 101071532)
- T.S. and S.K. were supported by Chemnitz University of Technology