-d
or--data
to create a new data folder or define an existing one--scale
to scale the images by a defined factor-m
or--mask
to create a mask for the images- add option
input
if you only want to create mask input images - add option
mask
if you only want to create masks from existing input images
- add option
-n
or--normalize
to normalize the images-t
or--tiles
to create tiles from the images, this takes two int values- the first is the
<tile size>
- the second is the
<overlap size>
- the first is the
-c
or--classifier
to train a classifier. This requires two images in the data/training folder. One must be RGB and one a mask.-s
or--segmentation
to segment all created tiles. This requires a trained classifier.-o
or--output
to stitch the segmented tiles back together.-v
or--visualize
to visualize the segmentation process, this takes two int values- the first is the
<tile size>
- the second is the
<overlap size>
- the first is the
- Create a new data folder with the
-d
or--data
command. - Copy your images into the data/input folder.
- Scale the images with the
--scale
command if necessary. - Create a mask for the images with the
-m
or--mask
command. - Normalize the images with the
-n
or--normalize
command. - Create training data out of the normalized images. It consists of two images, one RGB and one binary mask.
- Copy the training data into the data/training folder. There should be two images, one RGB and one binary mask.
- Train a classifier with the
-c
or--classifier
command. - Segment the images with the
-s
or--segmentation
command. - Stitch the segmented tiles back together with the
-o
or--output
command. - Optionally visualize the segmentation process with the
-v
or--visualize
command. - See the results in the data/output folder.
You can combin multiple commands in one call, e.g.:
python histoflow.py -d -m -n -t 512 64 -c -s -o -v 512 64
@software{JakobVoerkelius.2023,
author = {Jakob Voerkelius},
title = {Histoflow},
titleaddon = {Segmentation of histological images through machine learning},
version = {1.0.0},
year = {2023},
url = {https://github.com/Asklios/histoflow},
orcid = {0009-0003-1630-2265},
license = {MIT}
}