Skip to content
Deep learning for plant phenotyping.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs updated docs with patching and upsampling May 29, 2018
examples Revert "Network compression" Jun 5, 2018
models changes to the rosette leaf counter Mar 13, 2017
.gitattributes added GitHub bfs support Apr 18, 2017
.gitignore included network states in package Feb 3, 2017
LICENCE.txt Create LICENCE.txt Jun 22, 2017
Makefile added install to makefile Apr 3, 2017 documentation changes and additions for new features Feb 20, 2018
mkdocs.yml Revert "Network compression" Jun 5, 2018 added Mar 16, 2017

The DPP paper is now available online!

Deep Plant Phenomics

Deep Plant Phenomics (DPP) is a platform for plant phenotyping using deep learning. Think of it as Keras for plant scientists.

DPP integrates Tensorflow for learning and PlantCV for image processing. This means that it is able to run on both CPUs and GPUs, and scale easily across devices.

Read the doumentation for tutorials, or see the included examples.

DPP is maintained at the Plant Phenotyping and Imaging Research Center (P2IRC) at the University of Saskatchewan. 🌾🇨🇦

What's Deep Learning?

Principally, DPP provides deep learning functionality for plant phenotyping and related applications. Deep learning is a category of techniques which encompasses many different types of neural networks. Deep learning techniques lead the state of the art in many image-based tasks, including image classification, object detection and localization, image segmentation, and others.

What Can I Do With This?

This package provides two things:

1. Useful tools made possible using pre-trained neural networks

For example, calling tools.predict_rosette_leaf_count(my_files) will use a pre-trained convolutional neural network to estimate the number of leaves on each rosette plant.

2. An easy way to train your own models

For example, using a few lines of code you can easily use your data to train a convolutional neural network to rate plants for biotic stress. See the tutorial for how the leaf counting model was built.


  • Several pre-made networks for common plant phenotyping tasks.
  • Automatic batching and input pipeline.
    • Loaders for some popular plant phenotyping datasets.
    • Plenty of different loaders for your own data, however it exists.
    • Predict classes, values, bounding boxes, or segmentations.
  • Support for semantic segmentation with fully convolutional networks.
  • Tensorboard integration.
  • Easy-to-use API for building new models.
  • Easy to deploy your own models as a Python function!

Example Usage

Train a simple regression model to rate plants for abiotic stress:

import deepplantphenomics as dpp

model = dpp.DPPModel(debug=True)

# 3 channels for colour, 1 channel for greyscale
channels = 3

# Setup and hyperparameters
model.set_image_dimensions(256, 256, channels)

# Load dataset of images and ground-truth labels

# Simple convolutional neural network model

model.add_convolutional_layer(filter_dimension=[5, 5, channels, 32], stride_length=1, activation_function='relu')
model.add_pooling_layer(kernel_size=3, stride_length=2)

model.add_convolutional_layer(filter_dimension=[5, 5, 32, 32], stride_length=1, activation_function='relu')
model.add_pooling_layer(kernel_size=3, stride_length=2)

model.add_fully_connected_layer(output_size=256, activation_function='relu')


# Train!


  1. The package should work on Python 2.7 or 3.x, but if using 2.7 you need the enum34 package installed.
  2. Install the following dependencies, following the directions provided according to your platform and requirements:
    • Tensorflow (1.0 or later)
    • PlantCV (Only required for the auto-segmentation preprocessor)
  3. git clone
  4. python install

Downloading Pre-trained Networks

The package uses Git Large File Storage (git-lfs) to handle the saved network states included in this repository, as they can sometimes be very large.

If you had git-lfs installed when you installed the packages, then you automatically downloaded the saved networks. If you want to download the states after installing the package, then install git-lfs and run git lfs fetch and then git lfs pull.


Contributions are always welcome. If you would like to make a contribution, please fork from the develop branch.


If you are interested in research collaborations or want more information regarding this package, please email

If you have a feature request or bug report, please open a new issue.

You can’t perform that action at this time.