Cyto R-CNN and CytoNuke Dataset: Towards reliable whole-cell segmentation in bright-field histological images
Work in progress. This repository will soon contain the Python implementation of Cyto R-CNN.
First, you will need to install CUDA on your machine. This code has been developed with Python 3.9 and CUDA 11.8.
conda create -n cytorcnn python=3.9
conda activate cytorcnn
- Install an appropriate version of torch, torchvision and CUDA.
pip install -r requirements.txt
pip install 'git+https://github.com/facebookresearch/detectron2.git'
pip install -e .
## Prediction
weights_path = "/.../model.pth"
image_path = "/.../image.png"
cytorcnn = CytoRCNN(weights_path)
cytorcnn.predict(image_path)
## Training
train_images = "/.../train/images"
train_coco = "/.../train/coco.json"
train_dataset = Dataset(train_images, train_coco)
val_images = "/.../val/images"
val_coco = "/.../val/coco.json"
val_dataset = Dataset(val_images, val_coco)
# Optional: Register run in WeightsAndBiases
wandb.init(
project="CytoRCNN"
)
cytorcnn = CytoRCNN()
cytorcnn.train(train_dataset, val_dataset)
@article{cytorcnn2024,
title={Cyto R-CNN and CytoNuke Dataset: Towards reliable whole-cell segmentation in bright-field histological images},
author={Johannes Raufeisen and Kunpeng Xie and Fabian Hörst and Till Braunschweig and Jianning Li and Jens Kleesiek and Rainer Röhrig and Jan Egger and Bastian Leibe and Frank Hölzle and Alexander Hermans and Behrus Puladi},
year={2024},
doi = {arXiv:2401.15638},
}