U-Net is a plugin for ImageJ. It is a generic deep-learning solution for frequently occurring quantificationtasks like cell detection and shape measurements in biomedical image data. In this case, Unet is a plugin for Fiji, which is a distribution for ImageJ, specifically build to facilitate scientific image analysis.¹
Unet works with and is dependent of a modified version of caffe: caffe_unet.
This version is installed and currently available on environment hpc-uniol-env:
The following module is available on every of our maintained environments:
Fiji/20220414-conda* * does not contain Unet, and is based on ImageJ
To use Fiji, you need to have a bash session enabled which forwards X11, especially if you depend on the programs GUI.
(For more about this you can consult our login manual)
If you just want to work with Fiji without GPU support, you can just load the module and straight ahead start the program:
module load hpc-uniol-env module load fiji fiji-linux64
Should you need to work with GPUs, you will have to do some preparations:
At first, you need to install a modified srun version, like described here.
srun.x11 will be needed to switch to an interactive session on a gpu node. You will need it for the last step shown below, so keep in mind which path you created for the xrun folder.
To work with Unet, you will also need some image files of yours and some base data, which you can get from the project page (section 'Data').
For the sake of simplicity we will save all files and directories in one subfolder:
mkdir ~/unet_data cd ~/unet_data
Now, we will download a pre-trained 2D model for cell segmentation for caffe_unet:
mkdir caffe_h5 && cd caffe_h5 wget https://lmb.informatik.uni-freiburg.de/resources/opensource/unet/2d_cell_net_v0_model.zip unzip 2d_cell_net_v0_model.zip cd ..
At last, we need the image files. Tecnically, they can be stored anywhere at the home directory, but it can be helfpful to have everything at one place.
mkdir image_files cp ~/path/to/image_files/* ./image_files
When everything is prepared, it is time to switch to a gpu node:
path/to/srun.x11 -p mpcg.p -N 1 --tasks-per-node 5 --gres=gpu:1
This command sends an interactive bash session as a job into the queue. For this session there are five cores (--tasks-per-node 5) on one single node (-N 1) requestet, including one GPU (--gres=gpu:1) in the GPU partition (-p mpcg.p)
Now you can proceed as shown on the developers video tutorials.