From 060507bc780e809e88334cadfa1afa3520160f35 Mon Sep 17 00:00:00 2001 From: Skudalen Date: Thu, 8 Jul 2021 17:47:41 +0200 Subject: [PATCH] chore: add more info to README --- Handle_emg_data.py | 6 +++--- Present_data.py | 6 +++--- README.md | 39 +++++++++++++++++++++++++++------------ 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/Handle_emg_data.py b/Handle_emg_data.py index 9b361ee..3a29abb 100644 --- a/Handle_emg_data.py +++ b/Handle_emg_data.py @@ -486,8 +486,8 @@ class CSV_handler: samplerate = get_samplerate(data_frame) return data_frame, samplerate - - ''' + # NOT IMPLEMENTED + ''' def get_keyboard_data(self, filename:str, pres_or_release:str='pressed'): filepath = self.working_dir + str(filename) df = pd.read_csv(filepath) @@ -496,7 +496,7 @@ class CSV_handler: else ''' -class DL_data_handler: +class NN_handler: JSON_PATH_REG = "reg_data.json" JSON_PATH_MFCC = "mfcc_data.json" diff --git a/Present_data.py b/Present_data.py index b2b0493..5f0725c 100644 --- a/Present_data.py +++ b/Present_data.py @@ -220,9 +220,9 @@ def main(): csv_handler = CSV_handler() csv_handler.load_data('soft') - dl_data_handler = DL_data_handler(csv_handler) - dl_data_handler.store_mfcc_samples() - dl_data_handler.save_json_mfcc() + nn_handler = NN_handler(csv_handler) + nn_handler.store_mfcc_samples() + nn_handler.save_json_mfcc() ''' dict = dl_data_handler.get_mfcc_samples_dict() diff --git a/README.md b/README.md index 62bffec..7391d0c 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,32 @@ # Analysis of Keystroke EMG data for identification -###### EMG data handling and Neural Network analysis - Scripts to handle CSV files composed by 2 * 8 EMG sensors(left & right) devided into sessions per subject. The raw data is organised in a CSV_handler object with Handle_emg_data.py. Processing of data can take the further form of: - * Preprocessing with Signal_prep.py - FFT, MFCC, Wavelet db4 - * Storage for Neural Network analysis with DL_handler(Handle_emg_data.py) - combined EMG DataFrame, combined MFCCs DataFrame - * Neural Network analysis in Neural_Network_Analysis.py - LSTM NN, etc. +#### EMG data handling and Neural Network analysis +Scripts to handle CSV files composed by 2 * 8 EMG sensors(left & right) devided into sessions per subject. The raw data is organised in a CSV_handler object with Handle_emg_data.py. Processing of data can take the further form of: +* Preprocessing with Signal_prep.py - FFT, MFCC, Wavelet db4 +* Storage for Neural Network analysis with NN_handler(Handle_emg_data.py) - combined EMG DataFrame, combined MFCCs DataFrame +* Neural Network analysis in Neural_Network_Analysis.py - LSTM NN, etc. - ###### Technologies used - * Common libs: Numpy, Pandas, Pathlib, Sklearn, Scipy, Matplotlib, Tensorflow, Keras - * Indi libs: Python_speech_features, Pywt +#### Technologies used +* Common libs: Numpy, Pandas, Pathlib, Sklearn, Scipy, Matplotlib, Tensorflow, Keras +* Community libs: Python_speech_features, Pywt -###### Challanges in the module - * The CSV handlig is for the moment hard-coded to fit the current project due to a very specific file structure and respective naming convention. - * Preprocessing is still limited in Signal_prep.py - * Neural_Network_Analysis.py lacks a more general way to access multiple types of networks +#### Challanges in the module +* The CSV handlig is for the moment hard-coded to fit the current project due to a very specific file structure and respective naming convention. +* Preprocessing is still limited in Signal_prep.py +* Neural_Network_Analysis.py lacks a more general way to access multiple types of networks + +#### Credits for insporational code + +* Kapre - Keunwoochoi +* Audio-Classification: seth814 +* DeepLearningForAudioWithPyhton - musikalkemist + +## Table of Contents + +| File and classes | Description and help functions | +|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Handle_emg_data.py: - Data_container - CSV_handler - NN_handler | Handles, manipulates, and stores data for analysis. - Data_container is a class that describes the data for each subject in the experiment. Use __init__. - CSV_handler takes data from CSV files and places it in Data_container for each subject. Use load_data() to load csv data into data containers and add the containers to the CSV_handler's 'data_container_dict', indexed by subject number. Use get_data() to retrieve specific data. - NN_handler prepares data for further analysis in Neural Networks. This class has storage for this data and/or can save it to a json file. | +| Signal_prep.py | | +| Present_data.py | | +| Neural_Network_Analysis.py | |