CMM requested software infrastructure support from ABCS to develop a run time augmentation system for high resolution FIBSEM imaging. In responding to the CMM request, ABCS proposes a solution as described below:
A docker container has been designed to run imaging algorithms as needed. The container bundles multiple algorithms together with a method to execute the algorithms automatically. Each algorithm is contained in a single python script file in the repo/ directory. The container automatically watches for new images in the input directory. Whenever a new image is added, the selected algorithm (see the taskName below) is run on the image and the output is written to the selected output directory.
git clone https://github.com/abcsFrederick/FIBSEM.git
- Go to 'FIBSEM' directory and export FIBSEM
export FIBSEM=$PWD
- Give an lowercase image name:
export imageName=fibsem
- Build image:
docker build -t $imageName .
- Select a module name that exist under repo directory
export taskName=test
or
export taskName=threshold
or
export taskName=inference
For test purpose the test module will just process an image and output a 128 x 128 thumbnail of it. The threshold algorithm processes single channel SEM images to remove background values (replacing the background with black). The inference tasks performs forward inferencing using a UNET network to perform segmentation used a pre-trained network.
- Run docker image
docker run --gpu all -id -v $FIBSEM/snapshot:/snapshot \
-v $FIBSEM/repo:/repo -v $FIBSEM/dataset/input:/input \
-v $FIBSEM/dataset/output:/output -e module=$taskName \
$imageName
- Whenever put new image to the dataset/input directory, it will automatically generate output image into the dataset/output directory.
Create python module and put it under repo directory, name entry point as a function named run.