EMG-GUI: Real-time EMG visualization with OpenBCI and Python

pareeknikhilpareeknikhil Canada
edited December 2 in Software

Hi everyone,

I wanted to share an open-source project I have been developing while exploring surface electromyography (sEMG), muscle activity representation, and its potential applications in prosthetics and human–machine interfaces.

While working with the OpenBCI Cyton board, I found myself wanting a dedicated, Python-native environment where I could visualize muscle activity in both the time and frequency domains, collect structured EMG datasets, and integrate the acquisition process into my own research workflows.

This led me to develop EMG-GUI, an open-source Python library for real-time EMG signal acquisition, processing, visualization and recording using OpenBCI hardware.

The project is actively maintained, and I would love to share it with the community, gather feedback, and connect with others working in similar areas.

Real-time EMG visualization

EMG-GUI demonstration

EMG-GUI provides a dedicated environment for exploring multichannel EMG signals in real time. It allows users to observe muscle activation patterns, examine their frequency characteristics and compare signals before and after filtering.

Some of its current capabilities include:

  • Real-time multichannel visualization: View raw and filtered EMG signals simultaneously.
  • Live spectrograms: Explore the time-frequency characteristics of muscle activity independently for each channel.
  • Automatic scaling and adaptive layouts: Visualizations adjust to signal amplitudes and available window space.
  • Data acquisition and recording: Record raw EMG signals in CSV format for subsequent analysis.
  • Movement annotations: Mark the beginning and end of movements during recording, which can be particularly useful when collecting datasets for machine learning.
  • Recording playback: Revisit previously acquired signals without reconnecting the hardware.
  • Synthetic data support: Explore the library without requiring a physical OpenBCI device.

The library currently supports configurations for OpenBCI Cyton, Cyton Daisy and Ganglion through BrainFlow.

A Python-native approach

EMG-GUI is designed as a Python library rather than solely a standalone application, allowing researchers and developers to integrate it into their existing experimental and machine learning workflows.

It is built using BrainFlow, PyQt5 and ModernGL, with GPU-accelerated rendering and a multithreaded architecture that separates data acquisition and recording from visualization.

EMG-GUI system architecture

The library is available on PyPI and can be installed using pip install emg-gui.

It supports Windows, macOS and Linux, with additional system dependencies required on some Linux distributions.

Installation instructions, architecture details, API references and usage examples are available in the GitHub repository.

You can also try the synthetic board example without requiring OpenBCI hardware.

Open to contributions and collaborations

Although the project originated from my interest in EMG representation learning and prosthetic control, I hope it can serve as a useful resource for the broader biosignal research community.

The project is under active development, and I would particularly welcome feedback and contributions in areas such as:

  • Signal processing and visualization
  • Hardware compatibility and cross-platform testing
  • Data acquisition and machine learning integration
  • New features, documentation and research applications

Contributions do not necessarily have to involve writing code. Feedback, feature suggestions and testing with different hardware configurations would be equally valuable.

I would also love to connect with researchers, students and developers working on EMG-based gesture recognition, myoelectric prosthetics, human–machine interfaces or related areas for potential collaborations.

Project resources

A special thanks to the OpenBCI and BrainFlow communities for making open and accessible biosignal research possible.

I would be curious to hear from the community: What challenges do you encounter when working with EMG signals, and what capabilities would you find useful in a dedicated EMG acquisition and visualization library?

Looking forward to your feedback, discussions and potential collaborations!

Comments

Sign In or Register to comment.