https://github.com/nelson-gon/cellseg
cellseg: Multiclass Cell Segmentation
https://github.com/nelson-gon/cellseg
biology deep-learning image-classification image-processing image-segmentation multiclass-classification neural-networks torch
Last synced: 9 months ago
JSON representation
cellseg: Multiclass Cell Segmentation
- Host: GitHub
- URL: https://github.com/nelson-gon/cellseg
- Owner: Nelson-Gon
- License: mit
- Created: 2021-02-04T12:33:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-23T09:38:36.000Z (over 4 years ago)
- Last Synced: 2025-02-09T08:28:59.778Z (over 1 year ago)
- Topics: biology, deep-learning, image-classification, image-processing, image-segmentation, multiclass-classification, neural-networks, torch
- Language: Python
- Homepage: https://cellseg.readthedocs.io/en/latest/
- Size: 42.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# cellseg: Multiclass Cell Segmentation
[](https://badge.fury.io/py/cellseg)

[](https://codecov.io/gh/Nelson-Gon/cellseg?branch=main)
[](https://github.com/Nelson-Gon/cellseg/actions/workflows/build-package.yaml)
[](https://pypi.python.org/pypi/cellseg/)
[](https://cellseg.readthedocs.io/en/latest/?badge=latest)
[](https://pepy.tech/project/cellseg)
[](https://pepy.tech/project/cellseg)
[](https://pepy.tech/project/cellseg)
[](https://GitHub.com/Nelson-Gon/cellseg/graphs/commit-activity)
[](https://github.com/Nelson-Gon/cellseg/commits/main)
[](https://GitHub.com/Nelson-Gon/cellseg/issues/)
[](https://GitHub.com/Nelson-Gon/cellseg/issues?q=is%3Aissue+is%3Aclosed)
# Development stage
- [x] Read Tiff Images
- [x] Read Non Tiff Images
- [x] Write Data Transformers and Loaders
- [ ] Write functional model plus scripts
- [ ] Modify model weights/layers
- [ ] Read stacked tiff images/videos
# Introduction
`cellseg` is a PyTorch (`torch`) based deep learning package aimed at multiclass cell segmentation.
# Installation
```shell
pip install cellseg
```
Or if you want to build from source
```shell
git clone git@github.com:Nelson-Gon/cellseg.git
cd cellseg
python setup.py install
```
# Usage
## Script mode
**View images**
```shell
python -m cellseg -d data/train -t "image" -n 4 -s 512
```
To get help
```shell
python -m cellseg --help
#usage: __main__.py [-h] -d IMAGE_DIRECTORY -s IMAGE_SIZE -t TARGET -n NUMBER
#
#optional arguments:
# -h, --help show this help message and exit
# -d IMAGE_DIRECTORY, --image-directory IMAGE_DIRECTORY
# Path to image directory containing images and
# masks/labels
# -s IMAGE_SIZE, --image-size IMAGE_SIZE
# Size of images
# -t TARGET, --target TARGET
# Target images to show
# -n NUMBER, --number NUMBER
# Number of images to show
```
## Programming mode
**Importing relevant modules**
```shell
from cellseg.data import DataProcessor
from cellseg.model import CellNet
from cellseg.utils import DataProcessor, show_images
```
**Creating a a model object**
```shell
my_model = CellNet()
```
**Load training data**
```shell
train_data = DataProcessor(image_dir="data/train/images", label_dir="data/train/images", image_suffix="tif")
```
**View loaded images or masks**
```shell
show_images(train_data, number = 8, target="image")
```
**Training**