Skip to content

Install ROMI software for plants reconstructionLink

To follows this guide you should have an existing conda or a Python venv, see here.

We prefer to use conda and will use examples command lines with it. Simply replace the conda activate plant_imager commands with source plant_imager/bin/activate.

For the sake of clarity the environment will be called plant_imager.

Requirements:Link

ColmapLink

To save you the hassle of installing Colmap & its dependencies, we wrote a mechanism allowing you to run the Colmap command straight into a docker container where it is already done!

Note

Choose between option A (recommended) OR B!

A - Use of docker imageLink

You can use a pre-built docker image with Colmap & its dependencies installed (named geki/colmap). This requires to install the docker-engine. To do so, follows the official instructions here: https://docs.docker.com/get-docker/

It uses the Python docker SDK docker available on PyPi, to learn more read the official documentation.

If you upgrade from an older install, you may have to install the Python docker SDK:

conda activate plant_imager
python -m pip install docker

Important

Make sure you can access the docker engine as a non-root user! On Linux:

1. Create the docker group: `$ sudo groupadd docker`
2. Add your user to the docker group: `$ sudo usermod -aG docker $USER`
3. Log out and log back in so that your group membership is re-evaluated.

Official instructions [here](https://docs.docker.com/engine/install/linux-postinstall/)

B - System installLink

If you are a warrior or a computer expert, you can follow the procedure from the official documentation here. Make sure to use version 3.6.

Note

If you are using a conda environment, you can install ceres-solver dependency for Colmap from the conda-forge channel:

conda activate plant_imager
conda install ceres-solver -c conda-forge

Important

By default we use the docker mechanism, to enable the system install you need to export the environment variable COLMAP_EXE='colmap'.

Install ROMI packages with pip:Link

Activate your plant_imager environment!

Note

Since this is still under development, the packages are installed in "editable mode" with the -e option.

Important

You need an active ROMI database to import the images fileset to reconstruct. If it's not done yet, follow the installation instructions of a ROMI database (here).

Install plant3dvision sources:Link

To start "reconstruction jobs", you have to install the plant3dvision package.

Here we use the submodules but if you wish to edit other packages than plant3dvision, e.g. plantdb, install them from source!

conda activate plant_imager
git clone --branch dev https://github.com/romi/plant3dvision.git
cd plant3dvision
git submodule init
git submodule update
python3 -m pip install -e ./plantdb/ --no-cache-dir
python3 -m pip install -e ./romitask/ --no-cache-dir
python3 -m pip install -e ./romiseg/ --no-cache-dir
python3 -m pip install -e ./romicgal/ --no-cache-dir
python3 -m pip install -e ./dtw/ --no-cache-dir
python3 -m pip install -r requirements.txt --no-cache-dir
python3 -m pip install -e . --no-cache-dir
You should now be ready to performs "plant reconstructions" following the dedicated user guide.

Install romicgal sourcesLink

We use some algorithms from CGAL and propose a minimal python wrapper called romicgal. To install it:

conda activate plant_imager
python3 -m pip install -e git+https://github.com/romi/romicgal.git@master

Note

This takes some time since it has to download dependencies (CGAL-0.5 & boost-1.72.0) and compile them.

Install romiseg sourcesLink

To install the additional Machine Learning based segmentation module:

conda activate plant_imager
python3 -m pip install -e git+https://github.com/romi/romiseg@dev

Warning

If not using CUDA 10.*, you have to install the matching pytorch distribution. For example, for CUDA 9.2, use:

conda activate plant_imager 
pip install torch==1.4.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html
To upgrade to Cuda 11.1, type
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
See the PyTorch webpage for compatible Torch and Cuda combinations.