https://github.com/jeffshee/cell-rotation
https://github.com/jeffshee/cell-rotation
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeffshee/cell-rotation
- Owner: jeffshee
- Created: 2021-08-30T04:58:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-02T05:45:28.000Z (over 4 years ago)
- Last Synced: 2025-02-14T03:56:19.797Z (over 1 year ago)
- Language: Python
- Size: 25.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
0. Get your system ready for the mentioned dependencies.
1. Clone this repo.
2. Inside the script directory, create a new directory named `dataset`.
3. Copy the cell videos to analyze into the `dataset` directory.
4. 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)`.