Code for:
The CNSeg Dataset is made publicly available on Kaggle.
pip install requisites.txt
- StarDist: modify the requested paths to data and labels. Then run:
python stardist_test.py
- Cellpose: modify the requested paths to data and labels. Then run:
python cellpose_test.py
- SAM2: pre-trained SAM2 models can be found here. Modify the requested paths to data and labels. Then run:
python SAM2_test.py
- FCRN - IFCRN
In the respective folders, you can find the code to:
- Build each model architecture,
- Train-from-scratch
FRCN: modify the requested paths and then runand IFCRN: run the followingpython fcrn_train.py
python train_cnseg.py --train-img-dir --train-mask-dir --val-img-dir --val-mask-dir -e -b
- Evalaute the models
FRCN: modify the requested paths and then runand IFCRN: run the followingpython fcrn_test.py
python predict.py -i -o -m -t --labels-dir
Note that path to data, labels, and binary masks (for training) have to be passed to the parser.