https://github.com/bowang-lab/unicell
Universal cellular segmentation models
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
Universal cellular segmentation models
Basic Info
- Host: GitHub
- Owner: bowang-lab
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 53 MB
Statistics
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
UniCell
UniCell is a universal cellular segmentation tool for multi-modality microscopy images. It has three main features
- It works for various microscopy images, especially for RGB images, e.g., bone marrow slides. We also provide a new annotated RGB cell image dataset (download), which is complementary to existing cell segmentation datasets.
- It works for various image formats (e.g., png, bmp, jpg, tif, tiff) without format converting and does not require users to manually select segmentation models and image channels.
- The inference speed is fast (~0.07s for 256x256 image and ~0.33s for 512x512 image on NVIDAI 2080Ti).
Installation
bash
conda create -n unicell python=3.9 -y
git clone https://github.com/bowang-lab/unicell.git
cd unicell
pip install -e .
Train UniCell
bash
unicell_train -dir <path to training set> --model_folder <unicell> --batch_size 32
Training set folder structure
bash
training_set/
|----images
|--------img1.png
|--------img2.jpg
|--------img3.bmp
|--------img4.tif
|--------img5.tiff
|----labels
|--------img1_label.tiff
|--------img2_label.tiff
|--------img3_label.tiff
|--------img4_label.tiff
|--------img5_label.tiff
UniCell does not have limitation on the image format. The corresponding labels should have a suffix _label.tiff.
Inference
bash
unicell_predict -i <input path> -o <output path> --pretrain_model unicell --contour_overlay
Compute metrics
We provide a interface to compute various metrics for cell segmentation results, including F1 score, precision, recall, the number of missing cells, the number of false-positive cells, and dice
bash
com_metric -g <path to ground truth folder> -s <path to segmentation folder> -thre 0.5 0.7 0.9 -o <path to save folder> -n <csv name>
Graphical User Interface (GUI)
We develop a GUI plugin based on napari, which enables users who may not have coding experience to analyze their microscopy images visually in real time.
Install GUI: pip install napari-unicell

Online demo
We deploy an online demo on huggingface, which enables users to directly upload the cell images to get the segmentation results.
Remark: huggingface provides 2 free CPU for the deployment. So the inference can only use CPU, which is a little bit slow for large images (e.g., 1000x1000). We recommend using the command line interface or GUI to analyze large images if GPU is available on your local desktop.

Owner
- Name: WangLab @ U of T
- Login: bowang-lab
- Kind: organization
- Location: 190 Elizabeth St, Toronto, ON M5G 2C4 Canada
- Website: https://wanglab.ml
- Repositories: 11
- Profile: https://github.com/bowang-lab
BoWang's Lab at University of Toronto
GitHub Events
Total
Last Year
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jun | 1****4@q****m | 14 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 11 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: unicell
Universal cell segmentation
- Documentation: https://unicell.readthedocs.io/
- License: MIT
-
Latest release: 0.0.1
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- einops *
- gdown *
- imagecodecs *
- matplotlib *
- monai *
- numba *
- numpy *
- pandas *
- pillow *
- psutil *
- scikit-image *
- scipy *
- tensorboard *
- torchvision *
- tqdm *