Skip to main content

A modular framework for simulated and experimental EMG dataset generation, motor unit decomposition algorithm benchmarking, and performance evaluation

Project description

MUniverse: Benchmarking Motor Unit Decomposition Algorithms

License: GPL v3 Python 3.11+

MUniverse is a modular framework for simulated and experimental EMG dataset generation, motor unit decomposition algorithm benchmarking, and performance evaluation. It integrates biomechanical simulation (via NeuroMotion), generative models (BioMime), standardized formats (e.g. BIDS/Croissant), and FAIR data hosting (Harvard Dataverse).

MUniverse overview

Features

  • ๐Ÿ”ฌ Algorithm Benchmarking: Compare multiple motor unit decomposition algorithms (CBSS, SCD, Upperbound, AE)
  • ๐Ÿ“Š Dataset Generation: Generate simulated EMG datasets using NeuroMotion and experimental datasets
  • ๐Ÿ“ FAIR Data: Access datasets through Harvard Dataverse with BIDS and Croissant format support
  • ๐Ÿ”ง Containerized Workflows: Docker and Singularity support for reproducible algorithm execution
  • ๐Ÿ“ˆ Performance Evaluation: Comprehensive evaluation metrics and report card generation
  • ๐Ÿ““ Tutorial Notebooks: Interactive Jupyter notebooks for dataset loading and algorithm usage

Installation

Requirements

  • Python 3.11 or higher
  • pip

Package Installation

MUniverse is distributed as a Python package. To set up the development environment:

  1. Clone the repository:
git clone https://github.com/dfarinagroup/muniverse.git
cd muniverse
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install the package:
# Install core dependencies
pip install -e .

# Install development dependencies (optional)
pip install -e ".[dev]"

Docker/Singularity Containers

For algorithm execution, Docker or Singularity containers are available. See the docker/ directory for container definitions.

Quick Start

Loading a Dataset

from muniverse.datasets import load_dataset

# Load a dataset from Harvard Dataverse
dataset = load_dataset("neuromotion-test", output_dir="./data")

Running Decomposition

from muniverse.algorithms import decompose_recording

# Run decomposition using CBSS algorithm
results, metadata = decompose_recording(
    data="path/to/emg_data.edf",
    method="cbss"
)

# Or use SCD algorithm (requires container)
results, metadata = decompose_recording(
    data="path/to/emg_data.edf",
    method="scd",
    container="path/to/muniverse_scd.sif",
    engine="singularity"
)

Available Datasets

All datasets are hosted on Harvard Dataverse and follow FAIR principles:

Supported Algorithms

  • CBSS - Convolutional Blind Source Separation
  • SCD - Swarm Contrastive Decomposition (GitHub)
  • Upperbound - Upper bound performance estimation
  • AE - Autoencoder-based decomposition

Documentation (coming soon ๐Ÿšง)

Project Structure

muniverse/
โ”œโ”€โ”€ src/                    # Package source code
โ”‚   โ””โ”€โ”€ muniverse/
โ”‚       โ”œโ”€โ”€ configs/        # Algorithm and dataset configurations
โ”‚       โ”œโ”€โ”€ datasets/       # Dataset loading and simulation utilities
โ”‚       โ”œโ”€โ”€ algorithms/     # Decomposition algorithms
โ”‚       โ”œโ”€โ”€ evaluation/     # Performance evaluation
โ”‚       โ””โ”€โ”€ utils/          # Utility functions
โ”œโ”€โ”€ notebooks/              # Tutorial notebooks
โ”œโ”€โ”€ scripts/                # Utility scripts
โ”œโ”€โ”€ docker/                 # Docker container definitions
โ”œโ”€โ”€ docs/                   # GitHub Pages documentation (Coming soon!)
โ”œโ”€โ”€ tests/                  # Unit tests
โ”œโ”€โ”€ pyproject.toml          # Package configuration
โ””โ”€โ”€ README.md               

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Contributors

Acknowledgments

  • NeuroMotion - Biomechanical simulation framework (GitHub)
  • Swarm-Contrastive-Decomposition - Decomposition algorithm (GitHub)
  • Harvard Dataverse - FAIR data hosting platform
  • BIDS - Brain Imaging Data Structure standard

Citation

If you use MUniverse in your research, please cite:

@inproceedings{NEURIPS2025_dcce2899,
 author = {Mamidanna, Pranav and Klotz, Thomas and Chalatsis, Dimitrios and Grison, Agnese and Mendez Guerra, Irene and Ma, Shihan and Caillet, Arnault and Avrillon, Simon and Rohl\'{e}n, Robin and Farina, Dario},
 booktitle = {Advances in Neural Information Processing Systems},
 editor = {D. Belgrave and C. Zhang and H. Lin and R. Pascanu and P. Koniusz and M. Ghassemi and N. Chen},
 pages = {},
 publisher = {Curran Associates, Inc.},
 title = {MUniverse: A Simulation and Benchmarking Suite for Motor Unit Decomposition},
 url = {https://proceedings.neurips.cc/paper_files/paper/2025/file/dcce28990bf662c6b916c52cd7e975da-Paper-Datasets_and_Benchmarks_Track.pdf},
 volume = {38},
 year = {2025}
}

Contact

For questions, issues, or contributions, please:

  • Open an issue on GitHub
  • Contact the maintainers via email (see the Contributors section for author emails)

License

MUniverse is licensed under the GNU General Public License v3.0 (GPL-3.0).

Important Licensing Notes:

  • This project uses NeuroMotion, which is licensed under GNU GPL v3.0. As a result, MUniverse is also licensed under GNU GPL v3.0 to comply with the copyleft requirements of the GPL license.
  • This project also integrates with Swarm-Contrastive-Decomposition, which is licensed under Creative Commons Attribution-NonCommercial 4.0 International Public License.

See the LICENSE file for full details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muniverse_emg-0.1.3.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muniverse_emg-0.1.3-py3-none-any.whl (106.0 kB view details)

Uploaded Python 3

File details

Details for the file muniverse_emg-0.1.3.tar.gz.

File metadata

  • Download URL: muniverse_emg-0.1.3.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for muniverse_emg-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c496a739a5a5235231e39d0f6fcfcef8f49f37383573b12cda6d3dcb5173c718
MD5 a175e2fd4f2f8b8334298e4203d39278
BLAKE2b-256 85a259c42276c139fb57aa62fb9c2457d993c1d895c8b8bb545cc9260095ad48

See more details on using hashes here.

File details

Details for the file muniverse_emg-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: muniverse_emg-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 106.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for muniverse_emg-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 366c19e72676ceae5b5f19c70d0133c6e07f9d56b64a700c6ee4be11962f223f
MD5 9e96f1ea31769aa9924765d76cd285c5
BLAKE2b-256 632da94c935c9d39a5479d147c0804b1ab478633e2bc8148a59c5ad672afede8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page