Wiki

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.

Requirements:

  • MATLAB, OpenCV (required by Caffe)
  • RGR: to clone already with this submodule, please use the following command
git clone --recurse-submodules https://bitbucket.org/phil_dias/flowernet_iros18.git

"caffeflower-docker" will be the container name, used in docker_getFeats.sh . 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: https://caffe.berkeleyvision.org/installation.html
  • 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 https://bitbucket.org/phil_dias/caffe_flowerdeeplab2.git

  • 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 getFeats.sh accordingly with the paths where Caffe was installed

We adapted it from: https://github.com/xmyqsh/deeplab-v2.git, which on its turn adapted from https://bitbucket.org/aquariusjay/deeplab-public-ver2

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:

exSmall.png

Installing Docker

Updated