Socket
Book a DemoInstallSign in
Socket

accusleepy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accusleepy

Python implementation of AccuSleep

0.7.1
pipPyPI
Maintainers
1

AccuSleePy

Description

AccuSleePy is set of graphical user interfaces for scoring rodent sleep using EEG and EMG recordings. It offers the following improvements over the MATLAB version (AccuSleep):

  • Up to 10 brain states can be configured through the user interface
  • Classification models can be trained through the user interface
    • Model files contain useful metadata (brain state configuration, epoch length, number of epochs)
    • Models optimized for real-time scoring can be trained
  • Confidence scores can be saved and visualized
  • Lists of recordings can be imported and exported for repeatable batch processing
  • Undo/redo functionality in the manual scoring interface

If you use AccuSleep in your research, please cite our publication:

Barger, Z., Frye, C. G., Liu, D., Dan, Y., & Bouchard, K. E. (2019). Robust, automated sleep scoring by a compact neural network with distributional shift correction. PLOS ONE, 14(12), 1–18.

The data and models associated with AccuSleep are available at https://osf.io/py5eb/

Please contact zekebarger (at) gmail (dot) com with any questions or comments about the software.

Installation

  • (recommended) create a new virtual environment (using venv, conda, etc.) with python >=3.11,<3.14
  • (optional) if you have a CUDA device and want to speed up model training, install PyTorch
  • pip install accusleepy
  • (optional) download a classification model from https://osf.io/py5eb/ under /python_format/models/

Note that upgrading or reinstalling the package will overwrite any changes to the config file.

Usage

python -m accusleepy will open the primary interface.

Guide to the primary interface

Guide to the manual scoring interface

Changelog

  • 0.7.1: Bugfixes, code cleanup
  • 0.7.0: More settings can be configured in the UI
  • 0.6.0: Confidence scores can now be displayed and saved. Retraining your models is recommended since the new calibration feature will make the confidence scores more accurate.
  • 0.5.0: Performance improvements
  • 0.4.5: Added support for python 3.13, removed support for python 3.10.
  • 0.4.4: Performance improvements
  • 0.4.3: Improved unit tests and user manuals
  • 0.4.0: Improved visuals and user manuals
  • 0.1.0-0.3.1: Early development versions

Screenshots

Primary interface AccuSleePy primary interface

Manual scoring interface AccuSleePy manual scoring interface

Acknowledgements

We would like to thank Franz Weber for creating an early version of the manual labeling interface. The code that creates spectrograms comes from the Prerau lab with only minor modifications. Jim Bohnslav's deepethogram served as an incredibly useful reference when reimplementing this project in python. The model calibration code added in version 0.6.0 comes from Geoff Pleiss' temperature scaling repo.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.