GithubHelp home page GithubHelp logo

funalab / cond Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 24 KB

CoND: Classification of Neuronal Differentiation

License: MIT License

Python 100.00%
cnn convolutional-neural-network cnn-classification machine-learning microscopic-images

cond's Introduction

CoND: Classification of Neuronal Differentiation

This is the code for Classification of Neuronal Differentiation using Convolutional Neural Network and Feature Analysis. This project is carried out in cooperation with Funahashi lab at Keio University.

Overview

Our Convolutional Neural Network (CNN)-based model distinguishes the neuronal differentiation and undifferentiation from the phase contrast microscopic images.

Installation

% git clone https://github.com/funalab/CoND.git

The code requires Python3 and the packages listed in requirements.txt. The operating environment can be constructed using virtualenv as follows.

% pyenv virtualenv 3.6.3 <my/virtualenv>
% pyenv shell <my/virtualenv>
% cd <path/to/CoND>
% pyenv exec pip install -r requirements.txt

QuickStart

  1. Download learned model and dataset.

    • On Linux:

      % cd <path/to/CoND>
      % wget -P https://fun.bio.keio.ac.jp/software/CoND/best_model.npz
      % wget -P https://fun.bio.keio.ac.jp/software/CoND/dataset.zip
      % unzip dataset.zip
    • On macOS:

      % cd <path/to/CoND>
      % curl -O https://fun.bio.keio.ac.jp/software/CoND/best_model.npz
      % curl -O https://fun.bio.keio.ac.jp/software/CoND/dataset.zip
      % unzip dataset.zip
  2. Inference on test dataset.

    The learned model using the dataset (dataset/cross_validation/fold2) is best_model.npz. To verify the accuracy of the learned model using test data in dataset/cross_validation/fold2, run the following:

    % python run.py --input dataset/cross_validation/fold2 --model best_model.npz [--gpu gpu]
  3. Visualization of feature map by tSNE.

    Run a code which visualizes the output in the input layer, third convolution layer, third pooling layer, first fully-connected layer with tSNE when all test data are propagated forward.

    % python tSNE.py --input dataset/cross_validation/fold2 --model best_model.npz [--gpu gpu]

    We used codes from our PredictMovingDirection repository for GBP and DTD feature analysis.

How to train

Train a model with performing cross validation using dataset dataset/cross_validation/fold0.

% python train.py --input dataset/cross_validation/fold0 --crop_size 200 --preprocess 1 --batchsize 2 --epoch 100 [--gpu gpu]

The list of options will be displayed by adding -h option to the script.

    --indir [INDIR], -i [INDIR]                  : Specify input files directory for learning data.
    --gpu GPU, -g GPU                            : Specify GPU ID (negative value indicates CPU).
    --crop_size CROP_SIZE, -c CROP_SIZE          : Specify one side voxel size of ROI.
    --preprocess PREPROCESS, -p PREPROCESS       : Specify pre-process mode; 1. median, 2. normalization
    --batchsize BATCHSIZE, -b BATCHSIZE          : Specify minibatch size.
    --epoch EPOCH, -e EPOCH                      : Specify the number of sweeps over the dataset to train.

Acknowledgement

The development of this algorithm was funded by a JSPS KAKENHI Grants (Number 16H04731 and 19K22625).

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.