Run requirements.txt script to install all the dependencies.
# install openslide
sudo apt-get install openslide-tools
sudo apt-get install python-openslide
# git clone software to ${SRC} and then run:
pip3 install -r ${SRC}/requirements.txt
# annotated slide home
${DATASET}/lung/images
# class label home i.e., reg_tmb.csv
${DATASET}/lung/labels
# template image home i.e., template.png
${DATASET}/template
# get tile image home from raw slides
mkdir -p ${HOME}/tiles
mkdir -p ${HOME}/tiles_color_normalized
mkdir -p ${HOME}/model
A snapshot view of the directory structure is as follows (${DATASET}/lung/images):
Compute tile images, more details can be found in config/config.py
you should specify ratio_train and ratio_test in your experiments.
# dataset prepared
cd ${SRC}
# transmit parameter
sh ./HE_Auto.sh /tmp/data/lung/images /tmp/data/tiles /tmp/data/tiles_color_normalized /tmp/data/lung/labels/reg_tmb.csv ../asset/Template.png
Run the following command to start training more details can be found in config/config.py
as well as you should customize those parameters by yourself.
First of all, start a new tensorboard session for training investigation:
tensorboard --logdir=runs --bind_all
After then, run train.py script and you can start training if everything is okay.
python ${SRC}/train.py
Finally, model can be learned in ${DATASET}/model folder.
Run test.py script for inference:
python ${SRC}/test.py