New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducing paper results #50
Comments
Hi adnanhd Just to be sure, are these the instructions that you followed? Would you mind sending or pasting your hyperparameter file(s) and log files? Then I will have a look. Also if you could let me know what version of Cheers |
Hi Mathias, # clone the repo and create an environment
git clone https://github.com/perslev/U-Time
python3 -m venv utime
source utime/bin/activate
pip install mpunet==0.2.12
# installing mpunet requirements -- This part is to suppress warnings from mpunet
# I put them in a file and used -r option to install them with pip actually
pip install h5py>=2.10.0 matplotlib>=3.3.0 nibabel>=3.1.0 pandas>=1.0.0 \
psutil>=5.7.0 ruamel.yaml>=0.16.0 scikit-learn>=0.23.0 scipy>=1.4.0 \
tensorflow==2.3.2 tensorflow-addons==0.12.0
pip install U-Time/
# Preparing a project directory
ut init --name demo --model usleep_demo
cd demo
# fetching datasets
ut fetch --dataset sedf_sc --out_dir data/sedf_sc --N_first 39
# I did ain't skip this part. But I am not focusing
# on the model's scores on this dataset.
ut fetch --dataset dcsm --out_dir data/dcsm --N_first 6
# Split dataset SEDF-SC
ut cv_split --data_dir data/sedf_sc/ \
--subject_dir_pattern 'SC*' \
--CV 20 \
--validation_fraction 0.10 \
--subject_matching_regex 'SC4(\d{2}).*' \
--seed 123
# Split dataset DCSM
ut cv_split --data_dir data/dcsm/ \
--subject_dir_pattern 'tp*' \
--CV 20 \
--validation_fraction 0.10 \
--seed 123
# core of the pipeline -- prepare, train, predict and eventually evaluate
ut preprocess --out_path data/processed_data.h5 --dataset_splits train_data val_data
ut train --num_GPUs=1 --preprocessed --seed 123
ut predict --num_GPUs=1 \
--data_split test_data \
--strip_func strip_to_match \
--one_shot \
--save_true \
--majority \
--out_dir predictions
ut cm --true 'predictions/test_data/sedf_sc/*TRUE.npy' \
--pred 'predictions/test_data/sedf_sc/majority/*PRED.npy' \
--ignore 5 \
--round 2 \
--wake_trim_min 30 Here are the files for which you asked me in the previous comment,
Lastly, the version of TensorFlow I have installed and used is 2.3.2. Best |
Thanks for sharing this. So there are two important differences in what you are doing in the above, and what you should do to recreate Table two in the U-Time paper:
After following the U-Time guide please let me know if you are still experiencing any issues. Cheers |
Hi Mathias, Sorry for my late response. I have spent the last three days replicating U-Time network results as in your paper. Since I got some errors in the pipeline above, I decided to work on a closer version of the code to the paper than the latest version, which is under the tag utime-paper-version. However, I have got some errors in the following step ut train --num_GPUs=1 --channels 'EEG Fpz-Cz' The error in short is like the following Traceback (most recent call last):
File "/usr/local/bin/ut", line 11, in <module>
load_entry_point('utime', 'console_scripts', 'ut')()
File "/utime/utime/bin/ut.py", line 55, in entry_func
mod.entry_func(parsed.args)
File "/utime/utime/bin/train.py", line 209, in entry_func
raise e
File "/utime/utime/bin/train.py", line 206, in entry_func
run(args=args, gpu_mon=gpu_mon)
File "/utime/utime/bin/train.py", line 142, in run
d.load(1 if args.just_one else None)
File "/utime/utime/dataset/sleep_study_dataset.py", line 163, in load
"traceback.".format(e.study_id)) from e
utime.errors.CouldNotLoadError: Could not load sleep study SC4411E0. Please refer to the above traceback. I am also sending the log files generated by the execution of the code snippet above. Could you help me fix the error above? |
If you like I can also share the error I got in the first version? But if the latter is quicker, let us go through the paper version. |
Hi adnanhd Sorry for my late reply, I am on vacation these days. The above error occurs when a file is not able to be loaded from disk. I will need to see the full traceback to know more about why the loading failed. If you don't mind, please also send me the errors you experienced on the latest version. |
Hi everybody!
We are trying to reproduce S-EDF-39/U-Time results in table 2 in your paper.
We followed the exact instructions as ones on the repository's readme page for that purpose. (except --N_first 39 argument instead of 6, stated on the page)
However, we are very far from your results. The tables below are what we get after evaluating the predictions.
Raw Metrics:
Do you have any opinion on why we couldn't replicate the results above?
Thx
The text was updated successfully, but these errors were encountered: