[Paper Review] Pipeline for recording datasets and running neural networks on the Bela embedded hardware platform
This paper presents a streamlined pipeline for recording multichannel sensor datasets and deploying real-time deep neural networks on the Bela embedded platform, using a Dockerized cross-compilation environment to accelerate build times. The approach enables non-expert users to prototype audio and music applications with embedded AI by abstracting low-level compilation and real-time threading complexities.
Deploying deep learning models on embedded devices is an arduous task: oftentimes, there exist no platform-specific instructions, and compilation times can be considerably large due to the limited computational resources available on-device. Moreover, many music-making applications demand real-time inference. Embedded hardware platforms for audio, such as Bela, offer an entry point for beginners into physical audio computing; however, the need for cross-compilation environments and low-level software development tools for deploying embedded deep learning models imposes high entry barriers on non-expert users. We present a pipeline for deploying neural networks in the Bela embedded hardware platform. In our pipeline, we include a tool to record a multichannel dataset of sensor signals. Additionally, we provide a dockerised cross-compilation environment for faster compilation. With this pipeline, we aim to provide a template for programmers and makers to prototype and experiment with neural networks for real-time embedded musical applications.
Motivation & Objective
- To reduce the high entry barrier for non-expert users in deploying deep learning models on embedded audio platforms like Bela.
- To address the lack of platform-specific instructions and long compilation times when deploying neural networks on resource-constrained devices.
- To enable real-time inference in musical applications by managing CPU scheduling and thread priorities effectively.
- To provide a reusable, modular pipeline that serves as a template for prototyping embedded AI in music and audio computing.
- To bridge the gap between the embedded hardware and deep learning communities in NIME (New Interfaces for Musical Expression).
Proposed method
- The pipeline includes a custom tool for recording multichannel sensor data from multiple Bela boards, enabling synchronized dataset collection for training.
- A Dockerized cross-compilation environment is provided to accelerate compilation times and ensure consistent build environments across systems.
- Neural network inference is offloaded to an auxiliary thread with lower priority than the audio thread to prevent buffer underruns.
- The audio thread (high priority) processes audio blocks in real time, while the inference task runs only when CPU cycles are available after audio processing.
- The system uses the Bela API’s render() function as the audio callback, which is triggered for each audio block and manages real-time signal flow.
- The pipeline supports model deployment with minimal low-level coding, abstracting CMake recipes and peripheral interfacing through a structured workflow.
Experimental results
Research questions
- RQ1How can the deployment pipeline for deep learning models on embedded audio platforms be simplified for non-expert users?
- RQ2What is the impact of using a Dockerized cross-compilation environment on build time and reproducibility for Bela-based projects?
- RQ3How can real-time inference be achieved on a CPU with limited resources without introducing audio latency or buffer underruns?
- RQ4Can a multichannel dataset recording tool be effectively integrated into a full AI deployment pipeline for embedded music applications?
- RQ5What role does thread prioritization play in enabling efficient and stable real-time inference on the Bela platform?
Key findings
- The Dockerized cross-compilation environment significantly reduces compilation times compared to native builds on the target device.
- The use of an auxiliary thread for inference allows real-time operation without disrupting the audio processing pipeline.
- The pipeline successfully enables real-time inference of deep neural networks on the Bela platform with low-latency audio I/O.
- The multichannel dataset recording tool facilitates synchronized data collection from multiple Bela boards, supporting training of sensor-based models.
- The pipeline reduces the complexity of deploying embedded AI in music applications, making it accessible to non-expert developers and makers.
- The approach demonstrates that real-time inference is feasible on the Bela platform when computational complexity is kept low and CPU scheduling is carefully managed.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.