Clone wiki

FlowerNet_IROS18 / Home

Source code for DIAS, P. A.; TABB, A.; MEDEIROS, H. “Multispecies Fruit Flower Detection Using a Refined Semantic Segmentation Network” IEEE Robotics and Automation Letters, vol. 3, no. 4, 2018.


  • MATLAB, OpenCV (required by Caffe)
  • RGR: to clone already with this submodule, please use the following command
git clone --recurse-submodules

"caffeflower-docker" will be the container name, used in . It can be replaced by any desired name, as long as the .sh is also updated accordingly.

Option 2: Compile Caffe from source:

  • Below is a summary of instructions need for installation. Please refer to official Caffe documentation for more details:
  • Requires cuda-8.0 and the following packages
    build-essential cmake git libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libboost-all-dev libgflags-dev libgoogle-glog-dev liblmdb-dev python-setuptools python-dev python-pip libopencv-dev
  • git clone

  • Configure matio: cd matio && ./configure && make && make install
  • Compile Caffe using cmake:
    cd .. && mkdir build && cd build
    cmake -DBUILD_python=OFF -DBUILD_python_layer=OFF ..
    make -j`nproc`
  • Set accordingly with the paths where Caffe was installed

We adapted it from:, which on its turn adapted from

Deploy example

  • Run pred_example.m in MATLAB. Code will ask for "sudo" password to deploy Caffe model
  • Calls to Docker container take about 30-40sec for initialization, plus ~60sec for processing all portraits generate for example images of 2704x1520 pixels (286 portraits)
  • outputs are saved in "output" folder. Subfolders contain
    • "./Blend": heatmap of flower likelihood estimated by the model
    • "./Binary": segmentation mask with flowers boundaries highlighted in blue

Example of expected outputs:


Installing Docker