Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.18 KB

README.md

File metadata and controls

59 lines (39 loc) · 3.18 KB

UNet for Rumex Obtusifolius segmentation and root-detection in 2D field-images

Created as part of a project work in my master studies.

Image segmentation of specific plants is an important task in precision farming. Several influences such as changing light, varying arrangement of leaves and similarly looking plants are challenging. We present a solution for segmenting individual Rumex obtusifolius plants out of complicated natural scenes in grassland from 2D images. We are making use of a fully convolutional deep neural network (FCN) trained with hand labeled images. The proposed segmentation scheme is validated with images taken under outdoor conditions. The overall masks segmentation rate is 84.8% measured by the dice coefficient. Approximately half of the experiments show segmentation rates of individual plants higher than 88%. The developed solution is therefore a robust method to segment Rumex obtusifolius plants under real-world conditions in short time.

alt text

Leaf Prediction: Yellow Mask, Ground Truth: Cyan Border

alt text

Root Prediction: Black Point, Ground Truth: Yellow Point

Required Packages:

See Requirements

Documentation:

  • 10_inspect_data Resizies the images from "LabelingTool" in in same sizes including the labels (mask, root-centers, leaf-splines)
  • 20_training Training Process of the Unet
  • 30_results Visualize the optical Results and Evaluate both Segmentation and Root-Detection
  • 40_layer_visualization Visualize the intermediate Layers of the trained Network
  • 50_weights_visualization Visualize the weights of the Convolution-Kernels of both trained and untrained model
  • unet Unet Class for creating both untrained and pretrained Unet with VGG19 Encoder
  • data_generator Keras Sequence Data Generator to feed the data batchwise to the network and applying prepropressing and data augmentation in parallel on cpu while training
  • losses Loss Functions for training

Class to simply get the leaf segmentation or root coordinates for an image. Example for usage:

# Note: 
# - Model0 must be taken as the Model
# - Input image must be a 3Channel RGB image with Ratio ~3:2

rd = Rumex_Detection(model_path="Path to Model0")

# To get the leaf segmentation (as binary image) of an image:

binary_mask = rd.get_leaf_mask(image)

# To get the root coordinates (as list of tuples (X,Y)) of an image:

root_coordinates = rd.get_root_coords(image)