Giter VIP home page Giter VIP logo

comp-imaging-sci / mvg-cnn Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 19.88 MB

Codes related to paper "Automated sleep stage classification of wide-field calcium imaging data via multiplex visibility graphs and deep learning"

License: MIT License

MATLAB 11.71% Python 84.79% Shell 3.51%
wide-field-optical-imaging sleep-scoring deep-learning neuroimaging calcium-imaging cnn-classification mouse-brain sleep-stage-classification spatialtemporal video-classification

mvg-cnn's Introduction

Automated sleep stage classification of wide-field calcium imaging data via multiplex visibility graphs and deep learning

Authors: Zhang X, Landsness EC, Chen W, Miao H, Tang M, Brier LM, Culver JC, Lee JM, Anastasio MA
University of Illinois at Urbana-Champaign, Urbana, IL - 61801, USA
Washington University School of Medicine
Washington University School of Engineering

Contact: [email protected], [email protected], [email protected]

Abstract: Wide-field calcium imaging (WFCI) allows for monitoring of cortex-wide neural dynamics in mice. When applied to the study of sleep, WFCI data are manually scored into the sleep states of wake, non-REM (NREM) and REM by use of adjunct EEG and EMG recordings. However, this process is time consuming and often suffers from low inter- and intra-rater reliability and invasiveness. Therefore, an automated sleep state classification method that operates on WFCI data alone is needed. A hybrid, two-step method is proposed. In the first step, spatial-temporal WFCI data is mapped to a multiplex visibility graph (MVG). Subsequently, a two-dimensional convolutional neural network (2D CNN) is employed on the MVGs to be classified as wake, NREM and REM.

Schematic

System Requirements

The conda environment including all necessaray packages can be created using file environment.yml:

conda env create --file environment.yml

Dataset

The WFCI data in this paper is available on PhysioNet:

Construction of multiplex visibility graph

The directory MVG contains the following sub-directories:

  • atlas.mat: variables for defining Paxinos atlas
  • define_rois.m: function used for defining which parcels will be used to construct MVG
  • parcel2trace.m: function to compute the avarage time series for each parcel
  • extrac_MVG.m: the main script to construct MVG

The construction of MVG is based on MATLAB, simply modify the data path highlighted in comment and run extract_MVG.m.

Classifying sleep on MVG with deep learning

The directory network training contains the top level scripts:

  • dataloader_MVG.py: Script for loading the MVG representations from WFCI data epochs
  • model_cnn2d.py: Script for the compact 2D CNN to classify sleep
  • utils.py: script to compute evaluation metrics
  • config.txt: example txt. file for defining list of subjects used in training and validation
  • train.sh: Scripts for running the network training.
  • checkpoints: a pretrained model in our paper is included.

To train the network, make sure to

  • Modify the data path highlighted in comment in dataloader_MVG.py.
  • Make you own config.txt listing the training/validation mouse name.
  • Define parameters in bash script train.sh and run chmod u+x train.sh to make the script executable.
  • Simply run ./train.sh to start your training

Citations

1. Landsness, E., & Zhang, X. (2021). Wide-field calcium imaging sleep state database (version 1.0.0). PhysioNet. https://doi.org/10.13026/jzqa-j937.
2. Zhang, X., Landsness, E. C., Chen, W., Miao, H., Tang, M., Brier, L. M., ... & Anastasio, M. A. (2021). Automated sleep state classification of wide-field calcium imaging data via multiplex visibility graphs and deep learning. Journal of Neuroscience Methods, 109421.

References

1. Iacobello, G., Ridolfi, L., & Scarsoglio, S. (2021). Large-to-small scale frequency modulation analysis in wall-bounded turbulence via visibility networks. Journal of Fluid Mechanics, 918.
Chicago	
2. Iacobello, G., Marro, M., Ridolfi, L., Salizzoni, P., & Scarsoglio, S. (2019). Experimental investigation of vertical turbulent transport of a passive scalar in a boundary layer: Statistics and visibility graph analysis. Physical Review Fluids, 4(10), 104501.
3. Paxinos, G., & Franklin, K. B. (2019). Paxinos and Franklin's the mouse brain in stereotaxic coordinates. Academic press.
Chicago	

mvg-cnn's People

Contributors

caelyncheung1996 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hieutv85

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.