-
Notifications
You must be signed in to change notification settings - Fork 25
Installation
Please visit https://lmb.informatik.uni-freiburg.de/resources/opensource/unet for more details.
You need a computer for running the U-Net server (caffe_unet backend) and a computer running the frontend (ImageJ with our U-Net Segmentation plugin). You can run frontend and backend on the same computer if desired.
- Linux OS (Ubuntu 16.04 recommended to use binary distribution from the U-Net project page)
- (recommended) NVIDIA GPU (minimum CC 3.0, i.e. MAXWELL architecture) (e.g. TitanX, GTX1080, GTX980 or similar) for faster runtimes; Requires CUDA >=8.0 (Additionally cuDNN is highly recommended especially for 3D applications)
- (optional) Mathworks MATLAB (TM) R2015a or newer for generating memory usage tables
- Linux, Windows or MacOS (requires Java 8) running Fiji
We provide binary versions of caffe_unet for Ubuntu 16.04 with CUDA 8.0.61 (and cuDNN 7) support. At time of writing, installation of cuDNN requires free-of-charge registration as nVidia developer to download the corresponding deb package or tarball.
Install CUDA Toolkit 8.0.61
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb sudo apt-get update sudo apt-get install -y cuda unzip sudo apt-get clean
If you want to use a different OS or CUDA version please refer to the nVidia Download site for download and installation instructions.
Download and install U-Net (assumed destination directory ~/caffe_unet_package_16.04_gpu_no_cuDNN)
cd ~ wget https://lmb.informatik.uni-freiburg.de/resources/opensource/unet/caffe_unet_package_16.04_gpu_no_cuDNN.zip unzip caffe_unet_package_16.04_gpu_no_cuDNN.zip
Update your environment variables to include path and library path to your U-Net installation by inserting the following lines into your .bashrc (assuming your shell is bash). Place them in a section that is executed in non-interactive mode, i.e. before any checks whether a pseudo terminal is available.
export UNET_PATH="${HOME}/caffe_unet_package_16.04_gpu_no_cuDNN" export PATH="$PATH:${UNET_PATH}/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${UNET_PATH}/lib:{UNET_PATH}/extlib"
If you want to install the CPU-only version or the version with cuDNN enabled change the download links and paths accordingly.
Checkout revision 99bd99795d of the caffe BVLC master branch
export unet_base="/home/ubuntu" git clone https://github.com/BVLC/caffe.git cd caffe git checkout 99bd99795dcdf0b1d3086a8d67ab1782a8a08383
Download and apply our caffe_unet patch
wget https://lmb.informatik.uni-freiburg.de/lmbsoft/unet/caffe_unet_99bd99_20190109.patch git apply caffe_unet_99bd99_20190109.patch
Configure and build caffe_unet
mkdir x86_64 cd x86_64 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${unet_base}/.local -DUSE_OPENCV=OFF -DUSE_LEVELDB=OFF -DUSE_LMDB=OFF -DBUILD_python=OFF -DBUILD_python_layer=OFF -DCUDA_ARCH_NAME=Manual -DCUDA_ARCH_BIN="30 35 50 60 61" -DCUDA_ARCH_PTX="30" .. make -j install
Update your environment variables to include path and library path to your U-Net installation by inserting the following lines into your .bashrc (assuming your shell is bash). Place them in a section that is executed in non-interactive mode, i.e. before any checks whether a pseudo terminal is available.
export UNET_PATH="${HOME}/.local" export PATH="$PATH:${UNET_PATH}/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${UNET_PATH}/lib"
Also ensure that your .bashrc is loaded for login shells, i.e. one of ~/.bash_profile, ~/.bash_login or ~/.profile exists and contains a line sourcing your .bashrc. If no such file exists, you can easily create it using
echo ". ~/.bashrc" > ~/.bash_profile
Consult the bash manual pages for more information.
- Download and install Fiji according to http://www.fiji.sc.
- Start FiJi and go to Help->Update...->Manage update sites
- Select "U-Net Segmentation" update site
- Add update site->Close->Apply Changes (then restart FiJi)