All code is provided as is and without any warranty of functionality or fitness for a given task.
The framework is based on caffe (http://bvlc.eecs.berkeley.edu). The caffe framework can run entirely on the CPU or use GPU acceleration. If available, it is highly recommended to use GPU acceleration. By using GPU acceleration the computation times are drastically reduced by a factor of 20-100 (i.e. computations take minutes instead of hours).
Please file bug reports to maid@informatik.uni-freiburg.de including information about your system and hardware.
You need a computer for runnning the backend (Cell Net) and a computer for running the frontend (ImageJ with our U-Net plugin). You can run the frontend on the same computer as the backend if desired.
Backend (Server) requirements:
Frontend (Client) requirements:
We recommend that you use Ubuntu 16.04 on a computer with a GPU with at least 6GB (e.g. Titan). If you have to use the old Ubuntu 14.04, replace the string "16.04" everywhere with "14.04". If you don't have a gpu replace "gpu" with "cpu" and skip the installation of CUDA and cuDNN.
We describe the setup process for the fictional user "maid" who wants to install the caffe U-Net backend in the directory "/home/maid/cellnet" on the host with IP "192.168.0.10" and hostname "backendserver". He runs both backend and frontend on the same machine with ubuntu 16.04 and a GTX 980M GPU with 8GB. You can watch a video tutorial describing every step of the installation at https://www.youtube.com/watch?v=HJAUooQZ3V8.
Download the CUDA 8.0 binary installer from https://developer.nvidia.com/cuda-downloads to /home/maid/Downloads.
Run the installer:
cd /home/maid/Downloads
sudo sh cuda_8.0.44_linux.run
Follow the instructions; It is sufficient to only install the CUDA 8.0 Toolkit.
Download the cuDNN v5.0 for CUDA 8.0 library for Linux from https://developer.nvidia.com/cudnn to /home/maid/Downloads.
cd /home/maid/Downloads
tar -xf cudnn-8.0-linux-x64-v5.0-ga.tgz
Set the environment by adding the following line to your .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64:/home/maid/Downloads/cuda/lib64
Download caffe_unet_package_16.04.zip and caffe_models_2d.zip to /home/maid/cellnet.
cd /home/maid/cellnet
unzip caffe_unet_package_16.04_gpu.zip
unzip caffe_models_2d.zip
Edit your .bashrc file to set up the environment for the caffe U-Net software (You can combine the LD_LIBRARY_PATH statement below with the one above):
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/maid/cellnet/unet_package_16.04_gpu/libs
export PATH=$PATH:/home/maid/cellnet/unet_package_16.04_gpu/bin
Test, if it works: start a new shell and execute
caffe
A usage message should appear on the screen.
Test whether execution over ssh works:
ssh localhost caffe
A usage message should appear on the screen.
The plugin needs to be installed on the client computers only. It has no included segmentation capabilities, instead it interfaces existing caffe installations on the local machine or a backend server that is accessible via secure shell (ssh) and secure file transfer (sftp).
| Unit: | micrometer |
|---|---|
| Pixel width: | 0.45 |
| Pixel height: | 0.45 |
| Voxel depth: | 1 |
(For different images exchange width and height values by the actual pixel-size of your image)
| Model: | 2D Cell Net v0* |
|---|---|
| Weight file: | /home/maid/cellnet/caffe_models_2d/2d_cell_net_v0_snapshot_iter_150000.caffemodel.h5 |
| Process Folder: | /home/maid/cellnet |
| Use GPU: | GPU0 |
| Memory (MB): | 8000 |
| Host: | 192.168.0.10 |
| Port: | 22 |
| Username: | maid |
| Password: | ******** |
*see below how to select the Folder to chose Model from
Segmentation progress will be shown in a new row of the job table. After the caffe_unet binary on the backend server has finished the "Cancel" button on the right will change to "Show". Click it to show the segmentation result.
If using GPU acceleration, make sure the graphics card is being recognized. Execution of
nvidia-smi
should show a table indicating the NVIDIA GPUs installed on the system.
When logging in to the server, the command
caffe_unet
should display a usage message by caffe. If not, make sure the $PATH and $LD_LIBRARY_PATH environment variables are set correctly. The same usage message must also appear when you run the command with a non interactive shell from a remote server:
ssh user@backendserver caffe_unet
If .bashrc contains an expression such as
case $- in
*i*);;
*) return;;
esac
or
[ -z "$PS1" ] && return
all instructions after that line will be ignored, thus the specification of the environment variables must be placed before this expression. Ensure that no outputs to standard output are generated in your .bashrc in non-interactive mode, otherwise file upload/download via sftp fails!
The selected model file is uploaded to the backend server when starting the segmentation. The weights must already reside on the backend server at the given location. The process folder is created on the backend server on demand given sufficient user rights.