Open O-Memis opened 1 year ago
Hi, I have uploaded all the signals from the VM muscle to my kaggle account (can be found here: https://www.kaggle.com/datasets/mariatoubal/emglab-vm) My partner has uploaded the signals from the BB muscle (can be found here: https://www.kaggle.com/datasets/lydialoubar/emglab) I still have the full dataset It contains some signals with nan values but I can provide a code to remove them. plz suggest a way of sharing if you need the whole dataset (couldn't upload on github, kaggle and drive)
Hi , thank you very much for your share. When I tried to explore the data, I saw that the signal values are extremely small and shows nothing like EMG, its kind a weird. Infinitesimally small positive values, relatively much bigger negative values, nans. Non-nan values are weird. It is a possibility that I have made a serious mistake, here below I wanted to show my code:
import matplotlib.pyplot as plt import numpy as np import os
folder_path = 'C:/Users/CASPER/Desktop/VM'
data_list = []
for filename in os.listdir(folder_path): if filename.endswith('.bin'):
file_path = os.path.join(folder_path, filename)
# Load the binary data from the file, reshape it to a 1D array and append it to the list
data_list.append(np.fromfile(file_path, dtype=np.float64).reshape(-1, 1))
VMdataset1 = np.hstack(data_list).T
print(VMdataset1.shape)
for i in range(VMdataset1.shape[0]): VMdataset1[i]= np.nan_to_num(VMdataset1[i],nan=0)
aaaa= VMdataset1[2,:]
plt.plot(aaaa)
This is the code I used to read the dataset, you can also try to look for the physionet dataset I left the link below
from IPython.display import display import matplotlib.pyplot as plt %matplotlib inline import numpy as np import os import shutil import posixpath import wfdb
record = wfdb.rdrecord('C:/Users/lenovo/OneDrive/Documents/working-on-N2001-EMG-labdataset/dataset/N2001A03BB/N2001A03BB51/N2001A03BB51') #here change the path to the one of the dataset on your pc wfdb.plot_wfdb(record=record, title='N2001M01TF52') display(record.dict)
record2 = wfdb.rdrecord('a103l', pn_dir='challenge-2015/training/')
Thank you for your return " ModuleNotFoundError: No module named 'wfdb' " Actually I downloaded it from pip but it gives error in both Spyder and Jupyter notebook. Also I need only EMG dataset, the ECG in physionet is not useful for me.
Additionally, this is an example of signals in the BB and VM datasets :
Are BIN files not compatible with numpy and only works with wfdb ? Can you share another version?
Okay I solved the WFDB issue. I imported, than used related part of your Kaggle code. Downloading the library and the user guide can be reached by here: https://wfdb.readthedocs.io/en/latest/ And related articles & documents.
However, the acquisition of some of the EMG signals done by the authors are inaccurate and has high variance, in the dataset. This reduces the metric scores of my model. Paying attention to re-selection of data is important I guess. I will be appreciating your suggestions, thanks.
How we can get the dataset, the EMGLab website is not available now, it's not working. Can you share the dataset also?