Code Monkey home page Code Monkey logo

cell-rotation's Introduction

Cell Rotation

Python script to calculate the rotation speed of the cell from cell videos.

Dependency

python3
pip install tqdm seaborn scikit-learn scipy Pillow pandas opencv-python opencv-contrib-python numpy matplotlib

Usage

  1. Get your system ready for the mentioned dependencies.
  2. Clone this repo.
  3. Inside the script directory, create a new directory named dataset.
  4. Copy the cell videos to analyze into the dataset directory.
  5. Execute the main script, python main.py.

Start analyzing

  1. Select ROI for analyzing
    The selection will be cached into python pickle file named roi.pkl, so that you wouldn't need to select the ROI again next time for the same video. Press ENTER to proceed.
  2. Adjust the threshold for the binarization
    The optimal threshold gives the most accurate cell area. Press ENTER to proceed.
  3. The processing will be started. The results will be outputted into the directory named output.

Output

The output result is a heatmap of pairwise similarity of frame t1 and frame t2. For example,

From this figure, we can observe some peaks in pairwise similarity at delta=30 and delta=60. These peaks indicate the rotation cycles. Given that the rotation cycle is 30 (frames), fps is 30.0, we can calculate that the rotation speed is 360 (deg/s).

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.