GithubHelp home page GithubHelp logo

anant1203 / cilia-segmentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dsp-uga/taylor-p2

1.0 2.0 0.0 46.75 MB

Cilia are micro-scopic hairlike structures that protrude from literally every cell in your body. They beat in regular, rhythmic patterns to perform myriad tasks, from moving nutrients in to moving irritants out to amplifying cell-cell signaling pathways to generating calcium fluid flow in early cell differentiation. Cilia, and their beating patterns, are increasingly being implicated in a wide variety of syndromes that affected multiple organs.

License: MIT License

Jupyter Notebook 94.41% Python 5.59%
deep-learning deep-convolutional-neural-networks unet-image-segmentation keras-tensorflow tensorflow pandas python-3 opencv numpy

cilia-segmentation's Introduction

Cilia Segmentation

Cilia are micro-scopic hairlike structures that protrude from literally every cell in your body. They beat in regular, rhythmic patterns to perform myriad tasks, from moving nutrients in to moving irritants out to amplifying cell-cell signaling pathways to generating calcium fluid flow in early cell differentiation. Cilia, and their beating patterns, are increasingly being implicated in a wide variety of syndromes that affected multiple organs.

Approach

The first step would be to extract features from data.

The data consists of videos (in the form of 100 consecutive frames). As each sample is a video, we can make use of spatial as well as temporal features.

The features we used are:

  1. Variance fluctuations
  2. Optical Flow
  3. Beat Frequency

We pass the extracted features through a U-NET.

Data

The data are all available on GCP: gs://uga-dsp/project2

  • Data: Contains a bunch of folders (325 of them), named as hashes, each of which contains 100 consecutive frames of a gray scale video of cilia.

  • Mask: Masks contains a number of PNG images (211 of them), named as hashes (cor-responding to the sub folders of data), that identify regions of the corresponding videos where cilia is.

Prerequisites

  • Python-3.6
  • keras
  • open-cv

Scripts

feature_engineering.py

  • runs a folder of cilia videos in parallel extracting each feature as directed

To run

python feature_engineering.py -i \<input directory\> -o \<output directory\> -f \<feature name\> [-g | if you want greyscale frame added]

python feature_engineering.py -h for help

png_to_npy.py

  • runs a folder of cilia video pngs converting them to npy files

To run

python png_to_npy.py -i \<input directory\> -o \<output directory\> [-s | to save while processing to conserve ram]

python png_to_npy.py -h for help

model.py

  • Unet based model to get predictions using the extracted features.
  • Create a data folder containing the features, masks, training hash list and testing hash list.
  • Follow the given structure:

data
--features
--|--<hash_1>.npy
--|--<hash_2>.npy
--|--.....
--|--<hash_n>.npy
--masks
--|--<mask_1>.png
--|--<mask_2>.png
--|--.....
--|--<mask_n>.png
--train.txt
--test.txt

To run

model.py -d \<data directory>\ -e \<number of epochs>\ -v \<train-validation split>\

Required parameters:

<data directory> Path to the data folder created as per the specifictions.

Optional parameters:

<number of epochs> Number of epochs to train for. Defaults to 100.

<train-validation split> Ratio to split data. Enter 1 to use all data for training. Defaults to 0.7

Predictions will be stored in data/predictions

Results

Features Used IOU
Beat Frequency + 1 frame 15%
Optical flow 24.5%
Variance Fluctuations, Beat Frequency, Optical Flow + 1 frame 34.4%

Authors

  • Sumer Singh
  • Andrew Durden
  • Anant Tripathi

Contribution

There are no specific guidlines for contibuting. If you see something that could be improved, send a pull request! If you think something should be done differently (or is just-plain-broken), please create an issue.

Reference

[1] https://docs.opencv.org/3.4/d7/d8b/tutorial_py_lucas_kanade.html

[2] https://towardsdatascience.com/image-pre-processing-c1aec0be3edf

[3] https://arxiv.org/abs/1505.04597

[4] https://github.com/quinngroup/cilia-cbf

License

This Project is under the MIT License. For more details visit License file here: https://github.com/dsp-uga/Taylor-P2/blob/master/LICENSE

cilia-segmentation's People

Contributors

adurden avatar anant1203 avatar srs96 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.