https://www.kaggle.com/c/sartorius-cell-instance-segmentation
- Semantic segmentation by Unet.
- Instance segmentation by further processing of semantic segmentation with Deep Watershed Transform.
Deep Watershed Transform Network:
- To generate training target:
python seggit/data/scripts/make_semseg_target.py
- To make a training run:
python seggit/training/run_segmentation.py
- To make inference:
from seggit.cell_semantic_segmentation import SemanticSegmenter
segmenter = SemanticSegmenter(checkpoint_path='best.pth')
img, semseg = segmenter.predict('sample.png')
- To generate training target:
python seggit/data/scripts/make_uvec.py
- To make a training run:
python training/run_direction.py
- To generate training target:
python seggit/data/scripts/make_wngy.py
- To make a training run:
python training/run_energy.py
- To make a training run:
python training/run_watershed.py
- To make an inference:
from seggit.deep_watershed_transform import DeepWatershedTransform
dwt = DeepWatershedTransform(checkpoint_path='best.pth')
wngy = dwt.predict(img, semg)
To make an inference :
from seggit.cell_instance_segmentation import CellSegmenter
parser = argparse.ArgumentParser()
CellSegmenter.add_argparse_args(parser)
args = parser.parse_args()
args.pth_unet = 'best_unet.pth'
args.pth_wn = 'best_wn.pth'
segmenter = CellSegmenter(args)
img, instg = segmenter.predict('sample.png')