physhik / ecg-mit-bih

ECG classification using MIT-BIH data, a deep CNN learning implementation of Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network, https://www.nature.com/articles/s41591-018-0268-3 and also deploy the trained model to a web app using Flask, introduced at
https://physhik.github.io/2019/03/machine-learns-from-cardiologist-3/
GNU General Public License v3.0
183 stars 60 forks source link

OSError: ``/content/gdrive/MyDrive/ecg-mit-bih/src/dataset/train.hdf5`` does not exist #18

Closed sg4395 closed 1 year ago

sg4395 commented 1 year ago

Hi this is the error, are you able to help me work through this? Please let me know thank you!

feature: MLII Traceback (most recent call last): File "train.py", line 59, in main(config) File "train.py", line 54, in main (X,y, Xval, yval) = loaddata(config.input_size, config.feature) File "/content/gdrive/MyDrive/ecg-mit-bih/src/utils.py", line 21, in loaddata trainData = ddio.load('dataset/train.hdf5') File "/usr/local/lib/python3.8/dist-packages/deepdish/io/hdf5io.py", line 636, in load with tables.open_file(path, mode='r') as h5file: File "/usr/local/lib/python3.8/dist-packages/tables/file.py", line 300, in open_file return File(filename, mode, title, root_uep, filters, kwargs) File "/usr/local/lib/python3.8/dist-packages/tables/file.py", line 750, in init self._g_new(filename, mode, params) File "tables/hdf5extension.pyx", line 368, in tables.hdf5extension.File._g_new File "/usr/local/lib/python3.8/dist-packages/tables/utils.py", line 143, in check_file_access raise OSError(f"{path} does not exist") OSError: /content/gdrive/MyDrive/ecg-mit-bih/src/dataset/train.hdf5 does not exist

wkzqn commented 1 year ago

谢谢。您的邮件已收到,我会尽快处理。

sg4395 commented 1 year ago

FileNotFoundError: [Errno 2] No such file or directory: 'training2017/REFERENCE.csv'

physhik commented 1 year ago

Hi this is the error, are you able to help me work through this? Please let me know thank you!

feature: MLII Traceback (most recent call last): File "train.py", line 59, in main(config) File "train.py", line 54, in main (X,y, Xval, yval) = loaddata(config.input_size, config.feature) File "/content/gdrive/MyDrive/ecg-mit-bih/src/utils.py", line 21, in loaddata trainData = ddio.load('dataset/train.hdf5') File "/usr/local/lib/python3.8/dist-packages/deepdish/io/hdf5io.py", line 636, in load with tables.open_file(path, mode='r') as h5file: File "/usr/local/lib/python3.8/dist-packages/tables/file.py", line 300, in open_file return File(filename, mode, title, root_uep, filters, kwargs) File "/usr/local/lib/python3.8/dist-packages/tables/file.py", line 750, in init self._g_new(filename, mode, params) File "tables/hdf5extension.pyx", line 368, in tables.hdf5extension.File._g_new File "/usr/local/lib/python3.8/dist-packages/tables/utils.py", line 143, in check_file_access raise OSError(f"{path} does not exist") OSError: /content/gdrive/MyDrive/ecg-mit-bih/src/dataset/train.hdf5 does not exist

Did you try the following steps? This project use old python libraries so you should install from the requirements.txt in your virtual environment And download the data using the data.py

$ git clone https://github.com/physhik/ecg-mit-bih.git $ cd ecg-mit-bih $ pip install virtualenv $ virtualenv -p python ecg-env $ source ./ecg-env/bin/activate (ecg-env) $ pip install -r requrirements.txt (ecg-env) $ python src/data.py --downloading True (eng-env) $ python src/train.py

physhik commented 1 year ago

FileNotFoundError: [Errno 2] No such file or directory: 'training2017/REFERENCE.csv'

curl -O https://archive.physionet.org/challenge/2017/training2017.zip

this is explained in the predict.py file