Described in the paper "RootPainter: Deep Learning Segmentation of Biological Images with Corrective Annotation"
Published peer-reviewed paper available in the New Phytologist at: https://doi.org/10.1111/nph.18387
BioRxiv Pre-print available at: https://www.biorxiv.org/content/10.1101/2020.04.16.044461v2
RootPainter is a GUI-based software tool for the rapid training of deep neural networks for use in biological image analysis. RootPainter uses a client-server architecture, allowing users with a typical laptop to utilise a GPU on a more computationally powerful server.
I suggest the colab tutorial.
A video demonstrating how to train and use a model is also available to download
See releases
If you are not confident with the linux administration then to get started quickly I suggest the colab tutorial.
The following instructions are for a local server. If you do not have linux running a suitable NVIDIA GPU with at least 8GB of GPU memory then my current recommendation is to run via Google colab. A publicly available notebook is available at Google Drive with Google Colab.
Other options to run the server component of RootPainter on a remote machine include the the sshfs server setup tutorial. You can also use Dropbox instead of sshfs.
For the next steps I assume you have a suitable GPU and CUDA installed.
- Clone the RootPainter code from the repository and then cd into the trainer directory (the server component).
git clone https://github.com/Abe404/root_painter.git
cd root_painter/trainer
- To avoid alterating global packages. I suggest using a virtual environment. Create a virtual environment
python -m venv env
And then activate it.
On linux:
source ./env/bin/activate
On windows:
env\Scripts\activate.bat
-
Install PyTorch using pip by following the instructions at the pytorch website
-
Install the other dependencies in the virtual environment
pip install -r requirements.txt
- Run root painter. This will first create the sync directory.
python main.py
You will be prompted to input a location for the sync directory. This is the folder where files are shared between the client and server. I will use ~/root_painter_sync. RootPainter will then create some folders inside ~/root_painter_sync. The server should print the automatically selected batch size, which should be greater than 0. It will then start watching for instructions from the client.
You should now be able to see the folders created by RootPainter (datasets, instructions and projects) inside ~/Desktop/root_painter_sync on your local machine See lung tutorial for an example of how to use RootPainter to train a model.