This is short description with instruction notes how to create image to be upload to grand-challenge.org.
For newbies, please see Get started with Docker.
First you need to install Docker.io and run everything as super user sudo -i
.
For all operation with docker images you need to be the right user, or simply run sudo -i
and continue with following commands.
Before you start, you need to adjust the ration of provided landmarks in Dockerfile
using --min_landmarks
parameter in Entry point.
Copy the required data to the local directory and execute from actual location inside bm_ANHIR folder
docker build -t anhir -f Dockerfile .
Run one of following sample registration experiments:
bash
python benchmark/bm_template.py \
-t ~/Medical-data/dataset_ANHIR/images/dataset_medium.csv \
-d ~/Medical-temp/dataset_ANHIR/images \
-o ~/Medical-temp/experiments_anhir/ \
-cfg sample_config.yaml
python bm_experiments/bm_comp_perform.py -o ~/Medical-temp/experiments_anhir/BmTemplate
# remove all registered images
rm ~/Medical-temp/experiments_anhir/BmTemplate/*/*.jpg \
~/Medical-temp/experiments_anhir/BmTemplate/*/*.png
bash
python bm_experiments/bm_bUnwarpJ.py \
-t ~/Medical-data/dataset_ANHIR/images/dataset_medium.csv \
-d ~/Medical-temp/dataset_ANHIR/images \
-o ~/Medical-temp/experiments_anhir/ \
--run_comp_benchmark \
-Fiji ~/Applications/Fiji.app/ImageJ-linux64 \
-cfg ./configs/ImageJ_bUnwarpJ_histol-1k.txt
# remove all registered images
rm ~/Medical-temp/experiments_anhir/BmUnwarpJ/*/*.jpg \
~/Medical-temp/experiments_anhir/BmUnwarpJ/*/*.png
Running the docker image with mapped folders
mkdir submission output
and upload the sample submission to submission
and run the image
docker run --rm -it \
--memory=4g \
-v $(pwd)/submission/:/input/ \
-v $(pwd)/output/:/output/ \
anhir
Export the created image to be uploaded to the evaluation system.
# full size image
docker save anhir > anhir.tar
# compressed image
docker save anhir | gzip -c > anhir.tar.gz
Browsing
To see your locally build images use:
docker image ls
Cleaning
In case you fail with some builds, you may need to clean your local storage.
docker system prune
or Docker - How to cleanup (unused) resources
docker images | grep "none"
docker rmi $(docker images | grep "none" | awk '/ / { print $3 }')