skjerns / AutoSleepScorer

An open-source sleep stage classification Python package
GNU Affero General Public License v3.0
104 stars 22 forks source link

About Hypnograms #15

Open JimHe1993 opened 5 years ago

JimHe1993 commented 5 years ago

Hi Simon I'm Jim, a student of China. I'm learning your code. Can you share the hypnograms files of your thesis because of edfx database has been updated, so I can't run the edfx_database.py correctly. My e-mail address is jimhe1993@163.com. Thanks a lot!

skjerns commented 5 years ago

I think you just need to replace the URL in the code with the new URL: https://physionet.org/physiobank/database/sleep-edfx/sleep-cassette/

Unfortunately I currently don't have the time to update anything related to the project, but feel free to implement the changes and create a PullRequest

JimHe1993 commented 5 years ago

I used the newest URL address, but convert_hypnograms method doesn't work, I got null hypnogram.csv. I started to learn sleep stage classification recently, so don't understood the EDF format file well. I want to run your example model firstly, then learn everything deepy, so I bug the hypnogram files. If I disturbed you, my apologize.

JimHe1993 commented 5 years ago

If it's ok, please pack the hypnogram files and send to my e-mail address. Thanks!

lhaippp commented 5 years ago

Thanks for your job, it's really excellent! I created a PullRequest to update the database, and hope it helps ;)

JimHe1993 commented 5 years ago

Thanks! I knew the datasets and I already downloaded the raw file. My problem is I can't covert the raw hypnogram.edf files to hypnogram.csv as target/labels which can train a model. So I really wanted those hynograms.groundtruth,csv files. If you have, could you please share with me.

发自网易邮箱大师 On 2/21/2019 22:22,Li Haipengnotifications@github.com wrote:

Thanks for your job, it's really excellent! I created a PullRequest to update the database, and hope it helps ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

skjerns commented 5 years ago

Ah! Now I understand, you need the ground truth converted to csv.

try this script:

https://github.com/skjerns/AutoSleepScorerDev/blob/master/edfx_database.py

the convert_hypnograms should do the trick

skjerns commented 5 years ago

Have a look at https://github.com/skjerns/AutoSleepScorerDev/tree/master/edfx

There's all the hypnograms and an updated version of the conversion script: https://github.com/skjerns/AutoSleepScorerDev/blob/master/edfx/README.MD