{"id":28389857,"url":"https://github.com/nabilalibou/sleepchecker","last_synced_at":"2025-10-08T17:19:18.495Z","repository":{"id":218802192,"uuid":"739721226","full_name":"nabilalibou/SleepChecker","owner":"nabilalibou","description":"Class wrapper of the yasa package to detect drowsiness/sleep phase using EEG data","archived":false,"fork":false,"pushed_at":"2024-04-06T10:51:04.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T16:46:59.111Z","etag":null,"topics":["drowsiness-detection","eeg","eeg-analysis","eeg-signals-processing","sleep","sleep-analysis","sleep-scoring","sleep-staging"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nabilalibou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-06T10:44:35.000Z","updated_at":"2025-05-04T11:50:01.000Z","dependencies_parsed_at":"2024-02-05T12:25:30.880Z","dependency_job_id":null,"html_url":"https://github.com/nabilalibou/SleepChecker","commit_stats":null,"previous_names":["nabilalibou/sleepchecker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nabilalibou/SleepChecker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabilalibou%2FSleepChecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabilalibou%2FSleepChecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabilalibou%2FSleepChecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabilalibou%2FSleepChecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nabilalibou","download_url":"https://codeload.github.com/nabilalibou/SleepChecker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabilalibou%2FSleepChecker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278981544,"owners_count":26079646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drowsiness-detection","eeg","eeg-analysis","eeg-signals-processing","sleep","sleep-analysis","sleep-scoring","sleep-staging"],"created_at":"2025-05-31T02:37:20.693Z","updated_at":"2025-10-08T17:19:18.490Z","avatar_url":"https://github.com/nabilalibou.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SleepChecker: A Simplified Wrapper for Robust Sleep Stage Detection in EEG\n\nSleepChecker simplifies the process of detecting sleep stages in EEG recordings. It wraps the powerful \n[yasa](https://raphaelvallat.com/yasa/build/html/index.html) [[1]](#1) SleepStaging module, providing a \nuser-friendly interface for robust sleep detection.\n\nKey Features:\n\n- Automated Sleep Stage Classification: Combines predictions from the underlying algorithm for a single, reliable sleep stage label.\n- Total Sleep Time: Calculates the total percentage of time spent asleep during the recording.\n- Sleep Annotation: Annotates sleep segments directly onto your [MNE](https://mne.tools/stable/index.html) raw EEG data for easy visualization and analysis.\n\n# Installation\n\n```\ngit clone https://github.com/nabilalibou/SleepChecker.git\npip install -r requirements.txt\n```\n\n# Example\n\n```python\nimport mne\nfrom SleepChecker import SleepChecker\n\n# Load an EDF file using MNE\nraw_eeg = mne.io.read_raw_edf(\"myfile.edf\", preload=True)  \nsc = SleepChecker(raw_eeg, eeg_name=['C4', 'C3'], eog_name=\"HEOGR-HEOGL\", ref_channel=[\"M1\", \"M2\"])\n# Return an array containing the predicted sleep phases among ['W', 'N1', 'N2', 'N3', 'R']\nsleep_stages = sc.predict()  \n# get the overall % of time asleep\nsleep_percent = sc.get_tot_sleep_percentage(sleep_stages)  \n# annotate the sleeping time spans directly on the raw data\nraw_eeg = sc.annotate_data()  \n```\n\n# References\n\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e\nVallat, Raphael, and Matthew P. Walker. \"An open-source, high-performance tool for automated sleep staging.\" Elife 10 \n(2021). doi: https://doi.org/10.7554/eLife.70092\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabilalibou%2Fsleepchecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnabilalibou%2Fsleepchecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabilalibou%2Fsleepchecker/lists"}