GiaKhangLuu / Sartorius-Cell-Instance-Segmentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sartorius-Cell-Instance-Segmentation

Use Deep Learning models to segment cells in microscopy image.

The dataset is downloaded from: https://www.kaggle.com/competitions/sartorius-cell-instance-segmentation/data

Sample image in this dataset:

Microscopy image sample in dataset

Methods

Models:

  1. Mask RCNN
  2. Cellpose
  3. Training Size Model (Cellpose's assistant model)

Data:

  1. Mosaic
  2. Add extra data for the SH-SY5Y cell line from LIVECell dataset which is the predecessor of this dataset
  3. Data Augmentation (Flip left/right, Flip up/down, Crop, Add noise, Rotation

Loss:

  1. L2 Regularization

Installation

Installing all packages in this repository.

pip install -r requirement.txt

Repository structure

πŸ“‚ Browser folder

./browser/ folder stores all demo files which use Mask RCNN or/and Cellpose to detect cells in microscopy image on web.

Using command streamlit run main.py to start server.

.
β”œβ”€β”€ browser
β”‚   β”œβ”€β”€ cellpose_utils.py
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ mrcnn_utils.py
β”‚   └── utils.py

πŸ“‚ Models folder

Mask RCNN and Cellpose packages are stored in ./models/ folder.

.
β”œβ”€β”€ models
β”‚   β”œβ”€β”€ Mask_RCNN
β”‚   β”œβ”€β”€ cellpose

πŸ“‚ Technique folder

./technique/ folder stores all files demo of those techniques used in this project

.
β”œβ”€β”€ technique
β”‚   β”œβ”€β”€ augmentation
β”‚   β”œβ”€β”€ helper_package
β”‚   β”œβ”€β”€ livecell prepare.ipynb
β”‚   β”œβ”€β”€ mini mask.ipynb
β”‚   └── mosaic

πŸ“‚ Train-infer-model folder

All .ipynb files which used to train and test model are stored in ./train-infer-model/ folder.

.
β”œβ”€β”€ train-infer-model
β”‚   β”œβ”€β”€ cellpose
β”‚   β”œβ”€β”€ data
β”‚   β”œβ”€β”€ mask_rcnn
β”‚   └── performance

Demo

Using streamlit framework to demo on website

Detecting by Mask RCNN Detecting by Mask RCNN

Mask RCNN also detects the class label for each instance

Detecting by Cellpose Detecting by Cellpose

Cellpose does not detect label for instance

Comparing Mask RCNN and Cellpose Comparing Mask RCNN and Cellpose

Reference

Mask RCNN: https://github.com/leekunhee/Mask_RCNN

Cellpose: https://github.com/MouseLand/cellpose

Streamlit: https://streamlit.io/

About


Languages

Language:Jupyter Notebook 95.4%Language:Python 4.6%