Giter Club home page Giter Club logo

emg-gan's Introduction

What is EMG-GAN?

EMG-GAN is a custom implementation of a Deep Convolutional Generative Adversarial Network (DCGAN), focusing on generating synthetic electromyography (EMG) signals.

See also: Keras-GAN

Table of Contents

Installation

We strongly recommend the usage of Anaconda for managing python environments. This set-up was tested under Windows 10, Ubuntu and Raspbian.

  $ conda create --name emg_gan python=3.6
	$ conda activate emg_gan
	$ git clone https://github.com/larocs/EMG-GAN
  $ cd EMG-GAN/
  $ pip install -r requirements.txt
	

Usage

You can simply run the DCGAN pre-trained model already available inside ./saved_models to generate a batch of emg signals or you can train a new model based on your desired EMG signal.

The model is currently configured for receiving as input a 400-point window of floating-point values, and as output an EMG signal with 2,000 values.

You can change the configurations for the Generator and Discriminator on configuration.json file

Use one of the following, depending on your use case

python generate.py
python train.py

Training Results

Some metrics are also available for evaluating the generated signal vs the reference signal. You can check below how the generator evolves over 5,000 epochs, and how is the Generator vs Discriminator losses and metrics.

Results


Datasets

This work uses 2 datasets. One is a private dataset from Parkinson's Disease patients, and the other is NinaPro. NinaPro is an open-source dataset that can be downloaded on: http://ninapro.hevs.ch/ Inside folder "data" you can find an extract from NinaPro DB2 already pre-processed for this work.

NinaPro dataset source (DB2):

@Article{atzori_data,
author={Atzori, Manfredo
and Gijsberts, Arjan
and Castellini, Claudio
and Caputo, Barbara
and Hager, Anne-Gabrielle Mittaz
and Elsig, Simone
and Giatsidis, Giorgio
and Bassetto, Franco
and M{\"u}ller, Henning},
title={Electromyography data for non-invasive naturally-controlled robotic hand prostheses},
journal={Scientific Data},
year={2014},
volume={1},
number={1},
pages={140053},
issn={2052-4463},
doi={10.1038/sdata.2014.53},
url={https://doi.org/10.1038/sdata.2014.53}
}

 

Paper

Paper under review. Will be soon available.

Interested in contributing to EMG-GAN?

Thanks for the interest and please read the Contributing recommendations.

Authors

Esther Luna Colombini & Rafael Anicet Zanini

emg-gan's People

Contributors

rzanini avatar

Stargazers

 avatar 刘俊楠 avatar  avatar Shrihari Magar avatar EhanCheung avatar  avatar Rory (Tianhe) Wu avatar Jean-Christophe Gagnon-Audet avatar  avatar Shihan Ma avatar  avatar  avatar  avatar  avatar Kober Zhang avatar rin avatar Kangvcar avatar  avatar  avatar  avatar  avatar Paulo Cotta avatar  avatar H avatar Louis Chapo-Saunders avatar  avatar  avatar oo7 avatar Nash avatar  avatar  avatar  avatar  avatar  avatar  avatar O_Memis avatar shiweiguo avatar  avatar Zhenyu Lin avatar  avatar Steven Liu avatar  avatar Jing Bai avatar  avatar MIC-Lab avatar  avatar  avatar  avatar Sergio Sevileanu avatar Adriano Leal avatar  avatar Karthik Pandaram avatar  avatar Jia Zeng avatar Chun Yu "Eric" Wu  avatar Lara avatar Swarup Tripathy avatar Ocean shaw avatar retact avatar Jamie Burton avatar cheng zhongkai avatar  avatar carlos avatar Anahita Qashqai avatar Suguru Kanoga avatar Yixiang Gao avatar  avatar Username avatar Mohamed Amin avatar ganzhe123 avatar

Watchers

 avatar James Cloos avatar Gabriel Previato avatar Breno Bernard Nicolau de França avatar Esther Colombini avatar

emg-gan's Issues

AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'

When executing the generate.py file it throws the following error:

Traceback (most recent call last): File "generate.py", line 7, in <module> from models.dcgan import DCGAN File "/Users/carlosoliver/EMG-GAN/models/dcgan.py", line 30, in <module> from keras.optimizers import RMSprop, Adam File "/opt/anaconda3/envs/emg_gan/lib/python3.8/site-packages/keras/__init__.py", line 20, in <module> from . import initializers File "/opt/anaconda3/envs/emg_gan/lib/python3.8/site-packages/keras/initializers/__init__.py", line 124, in <module> populate_deserializable_objects() File "/opt/anaconda3/envs/emg_gan/lib/python3.8/site-packages/keras/initializers/__init__.py", line 82, in populate_deserializable_objects generic_utils.populate_dict_with_module_objects( AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'
Captura de Pantalla 2021-07-13 a la(s) 12 58 01

The Parkinson’s Disease EMG Dataset

Dear author:

Hello, I am reproducing the DCGANs part of this paper(Parkinson’s Disease EMG Data Augmentation and Simulation with DCGANs and Style Transfer) and code(EMG-GAN), using NinaPro DB2 data because I do not have the private dataset used in the paper.

Since my graphics card is RTX 3090 and the system is ubuntu 20.04, I was never able to run the code successfully in your environment, so I ended up having to use TensorFlow-gpu2.5 to train DCGANs and generate my signal. Still, the trained network and generated signals did not work as expected.

After that, I used the network model provided on GitHub and used the DB2 data as the reference signal, and the final generated signal was similar to the sEMG data of the Parkinson's patient used in the paper, so I don't know if the training part of the DCGANs is different from the paper due to environmental issues. Therefore, I hope I can get the data of the Parkinson's patient used in the paper, just the one used in the paper The EMG data of one patient.

Thank you for considering my request. I'm looking forward to your response.

Is the data file required by the "generate.py" available?

Hi,
I am interested in this project and wanted to try it out myself. Although the Ninapro dataset is open to download, they are not in the csv format which the function "load_timeseries" requires.
I wonder if you can provide the following one file so I know what format I need to provide for the script?
"No such file or directory: './data/pd_patient_1_emg.csv'

No data folder

Inside folder "data" you can find an extract from NinaPro DB2 already pre-processed for this work. But in your REPO is not this folder (((

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.