Skip to content

Latest commit

 

History

47 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 Seed Germination Detection & Prediction

Python 3.7+ TensorFlow 1.15 Docker Support Paper DOI License: MIT

Accurate Machine Learning-Based Seed Germination Detection, Prediction, and Quality Assessment of Grain Crops

High-throughput computer vision pipeline using Deep Learning & Region Proposal Object Detection Networks for automated seed germination scoring.


📌 Overview

Assessment of seed germination is a fundamental task for plant researchers, agronomists, and seed producers to quantify seed vigor and quality. Manual seed assessment is labor-intensive, time-consuming, and subject to human error.

This repository provides a complete, end-to-end deep learning framework built on the TensorFlow Object Detection API to automate seed germination detection and tracking across time-series experiments.

Supported Crop Species:

  • 🌽 Zea mays (Maize / Corn)
  • 🌾 Secale cereale (Rye)
  • 🌾 Pennisetum glaucum (Pearl Millet)

✨ Features

  • 🎯 Automated Object Detection: Detects individual seeds and sprout germination events with high mAP accuracy.
  • Time-Series Germination Tracking: Evaluates petri dish record captures (.record) over time to construct germination progression curves.
  • 🐳 Dockerized Workflow: Fully reproducible environment pre-configured with TensorFlow, CUDA, and dependencies.
  • 📊 Pre-trained Checkpoints & Models: Ready-to-use inference graphs and checkpoints for high-throughput prediction without re-training.
  • 🚀 Multi-Architecture Support: Includes Faster R-CNN with Inception-v2, ResNet-50, ResNet-101, and Inception-ResNet-v2 backbones.

📁 Repository Structure

GerminationPrediction/
├── data/
│   ├── PennisetumGlaucum/    # Dataset records & TFRecord splits
│   ├── SecaleCereale/        # Dataset records & TFRecord splits
│   └── ZeaMays/              # Dataset records & TFRecord splits
│       ├── configs/          # Detection pipeline configuration files
│       ├── records/          # Petri dish time-series captures (.record)
│       └── test_images/      # Sample evaluation test images
├── scripts/
│   ├── gp_utils/             # Core helper utilities & data loaders
│   ├── train_model.py        # Model training script
│   ├── predict_testset.py    # Hold-out test set accuracy evaluation
│   ├── predict_image.py      # Single image inference script
│   ├── predict_record.py     # Petri dish record inference script
│   └── export_inference_graph.py # Export TF checkpoint to frozen graph (.pb)
├── workspace/
│   ├── PennisetumGlaucum/    # Trained checkpoints & exported graphs
│   ├── SecaleCereale/        # Trained checkpoints & exported graphs
│   └── ZeaMays/              # Trained checkpoints & exported graphs
├── germination_data_flow.svg # Pipeline architectural data flow diagram
└── README.md

🚀 Quick Start Guide

1. Prerequisites & Environment Setup

Option A: Docker (Recommended)

Build the pre-configured object detection docker container:

# Build the Docker image
docker build -f research/object_detection/dockerfiles/tf1/Dockerfile -t od .

# Run container with GPU support
docker run -it --gpus all -p 0.0.0.0:6006:6006 -v /PATH/TO/GerminationPrediction:/home/GerminationPrediction od

2. Download Dataset & Models

Download Version 3 of the dataset from Mendeley Data: DOI: 10.17632/4wkt6thgp6.3

Extract downloaded archives into the project hierarchy:

  • GermPredRecords ➡️ Move into data/
  • GermPredModels ➡️ Move into workspace/

🏋️ Training & Evaluation Workflow

Train a New Model

Inside the Docker environment:

cd /home/GerminationPrediction
python scripts/train_model.py -m ZeaMays -c ./data/ZeaMays/configs/INCRES_ZM_5.config

Evaluate Model Accuracy on Test Set

python scripts/predict_testset.py -m ZeaMays -c ./data/ZeaMays/configs/INCRES_ZM_5_test.config

Export Inference Graph

python scripts/export_inference_graph.py -m ZeaMays -c ./data/ZeaMays/configs/INCRES_ZM_5.config -p 9000

Run Inference on a Petri Dish Experiment

python scripts/predict_record.py -m ZeaMays -i ./data/ZeaMays/records/petridishes/PD_zm1_11.record

🧠 Supported Architectures & Pre-trained Models

Backbone Architecture Feature Extractor Pre-trained Base
Faster R-CNN Inception v2 COCO
Faster R-CNN ResNet-50 COCO
Faster R-CNN ResNet-101 COCO
Faster R-CNN Inception ResNet v2 Atrous COCO

❓ Troubleshooting & FAQ

1. Permission Denied Errors inside Docker

The container user tensorflow has UID/GID 1000. Grant read/write permissions to the repository directory:

chmod -R 777 ./
2. GPU Resource Exhausted (OOM)

If your GPU has less than 12 GB VRAM, reduce the batch_size parameter in the corresponding .config file inside data/<CropName>/configs/.


👥 Contributors & Maintenance

Maintained by members of the Bioinformatics Lab led by Prof. Dr. Dominik Grimm:

  • Nikita Genze, M.Sc.
  • Sthitaprajna Baral

📖 Citation

If you find this repository or dataset useful in your research, please cite our published paper:

@article{genze_accurate_2020,
  title     = {Accurate machine learning-based germination detection, prediction and quality assessment of three grain crops},
  author    = {Genze, Nikita and Bharti, Richa and Grieb, Michael and Schultheiss, Sebastian J. and Grimm, Dominik G.},
  journal   = {Plant Methods},
  volume    = {16},
  number    = {1},
  pages     = {157},
  year      = {2020},
  publisher = {BMC},
  doi       = {10.1186/s13007-020-00699-x},
  url       = {https://doi.org/10.1186/s13007-020-00699-x}
}

Built with ❤️ for High-Throughput Plant Phenotyping & Computer Vision

About

Accurate machine learning-based seed germination detection, prediction, and quality assessment using TensorFlow Object Detection API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages