Sorghum Yield Estimation With Smartphone

How can we estimate sorghum yield easily? By using a smartphone to count sorghum seeds in the field, we tackle the challenge of simplifying the difficult and time-consuming process of manually counting thousands of tiny seeds, making it quicker and more accurate.
Maryna Kuzmenko, Co-Founder at Petiole
by Maryna Kuzmenko | 29th August 2024 | 4 min read
cover photo

Why Sorghum?

Sorghum is an important crop because it is highly adaptable to harsh environments, particularly in arid and semi-arid regions where other crops struggle to grow. It serves as a vital source of food, fodder, and fuel for millions of people worldwide, particularly in Africa and Asia.

Sorghum is rich in nutrients, making it a crucial staple in many developing countries, and it also plays a significant role in food security.

Sorghum distribution. Total world production of Sorghum biomass by 20 top countries is 42,765,025 metric tonnes. Source: Reddy Shetty et al., 2014Sorghum distribution. Total world production of Sorghum biomass by 20 top countries is 42,765,025 metric tonnes. Source: Reddy Shetty et al., 2014

Beyond its use as food, sorghum is increasingly important in bioenergy production and as a raw material in various industrial processes, contributing to its global economic significance.

Global sorghum output under rain-fed conditions for the year 2010. Source: Mundia et al., 2019Global sorghum output under rain-fed conditions for the year 2010. Source: Mundia et al., 2019


What’s the Problem with Sorghum Grain Counting?

The main problem with sorghum grain counting is that it’s difficult and takes a lot of time, especially if done by hand. Sorghum panicles have thousands of tiny grains, making it hard to count them accurately without mistakes. Algorithm for sorghum yield estimates manually Detailed step-by-step guideline is developed in 2022 by the Department of Agronomy at Kansas State University.

Count of sorghum heads per acre. Source: Ciampitti & Carcedo, 2022Count of sorghum heads per acre. Source: Ciampitti & Carcedo, 2022

Relationship between grain yield and yield components, seeds per head (left panel) and seed weight (right panel). The number of seeds per head has the most direct relationship with yield. Source: Ciampitti & Carcedo, 2022Relationship between grain yield and yield components, seeds per head (left panel) and seed weight (right panel). The number of seeds per head has the most direct relationship with yield. Source: Ciampitti & Carcedo, 2022

Final calculation using “On-Farm” Yield Estimation Approach. Source: Ciampitti & Carcedo, 2022Final calculation using “On-Farm” Yield Estimation Approach. Source: Ciampitti & Carcedo, 2022


Can I Count Grains in Sorghum Plants with Drone Imagery?

Yes, sorghum grain counting can be conducted by drones, but typically for tasks like counting panicles (the grain clusters) rather than individual grains. However, counting individual grains with drones is challenging due to the resolution limits and the complexity of accurately detecting small objects from a height. Therefore, while drones are highly effective for broader phenotyping tasks like panicle counting, more detailed grain counting is usually done with ground-based methods, such as using smartphones or manual counting.

Detection results for sorghum heads with different densities by different algorithms using drone imagery. Source: Li et al., 2022Detection results for sorghum heads with different densities by different algorithms using drone imagery. Source: Li et al., 2022


Deep Learning Methods for Sorghum Grain Counting Using Smartphone Imagery

Country: United States 🇺🇸

Published: 28 August 2024

This study focuses on enhancing sorghum yield estimation by using deep learning algorithms on images captured with a smartphone to detect panicles and count grains at the plant level under field conditions. The research employed convolutional neural networks (CNNs), particularly using the Detectron2 and Yolov8 frameworks for detecting and segmenting sorghum panicles.

Additionally, three models (MCNN, TCNN-Seed, and Sorghum-Net) were developed to estimate the grain count. The images were preprocessed using manual labeling and augmentation techniques to create a robust dataset.

Key findings

  • The Yolov8 model outperformed Detectron2 in segmenting and detecting panicles, achieving an average precision (AP50) of 89% versus 75%.
  • The Sorghum-Net model exhibited the best performance for grain counting, with a mean absolute percentage error (MAPE) of 17%, significantly surpassing other models.
  • A polynomial linear model based on Sorghum-Net’s output provided accurate predictions, with an R² of 0.48, making it a valuable tool for yield estimation.

These results can be practically applied by agronomists and crop breeders for rapid and cost-effective sorghum yield estimation, especially in field conditions.

Reference: Santiago et al., 2024


Main Tools/Technologies Used

  • Lenovo Legion desktop
  • NVIDIA GeForce RTX 2070 GPU
  • Detectron2 and Yolov8 frameworks for panicle detection and segmentation.
  • MCNN, TCNN-Seed, and Sorghum-Net models for grain counting.
  • Python 3.9, CUDA 11.8, TensorFlow for data processing and model training.

Figures for article “Deep Learning Methods Using Imagery from a Smartphone for Recognizing Sorghum Panicles and Counting Grains at a Plant Level”

Research diagram of the proposed framework. Source: Santiago et al., 2024Research diagram of the proposed framework. Source: Santiago et al., 2024

In the diagram below: The white boxes denote the manual component under field conditions, the blue boxes represent the processes executed via the computer, and the yellow boxes refer to the processes linked to machine learning models.

Photograph showing how the pictures were collected under field conditions. Source: Santiago et al., 2024Photograph showing how the pictures were collected under field conditions. Source: Santiago et al., 2024

Examples of the dataset used in this study: sorghum panicles with different architecture, color, maturity, and panicle density. Source: Santiago et al., 2024Examples of the dataset used in this study: sorghum panicles with different architecture, color, maturity, and panicle density. Source: Santiago et al., 2024

Description: From top to bottom are images with crescent brightness. In the first column, there are white panicles; in the second one, there are red panicles; and in the third one, there are panicles with different densities. All the images show a different panicle architecture.

Overview of the Sorghum-Net architecture. Source: Santiago et al., 2024Overview of the Sorghum-Net architecture. Source: Santiago et al., 2024

Description: The diagram represents the process from the segmented panicle to the density map as the final output, red boxes represent Conv2d, and yellow boxes represent MaxPooling. The TensorFlow framework was used to create and train the models. The parameters to train the models were set to a maximum epoch number of 200 with a patience of 20 epochs, batch size of 8, a learning rate of 0.001, the optimizer employed was ‘Adam’, and a loss function of MSE.

Sorghum panicle segmentation. Predictions were performed by the models trained using the frameworks Detectron2 and Yolov8 over sorghum images. Source: Santiago et al., 2024Sorghum panicle segmentation. Predictions were performed by the models trained using the frameworks Detectron2 and Yolov8 over sorghum images. Source: Santiago et al., 2024

Original image, ground truth, and density map predictions. Source: Santiago et al., 2024Original image, ground truth, and density map predictions. Source: Santiago et al., 2024

Description: Original image and density map predictions from the MCNN, TCNN-Seed, and Sorghum-Net models. The number between the parentheses indicates the number of grains present (for the ground truth) and predicted (for the models) in the image.

Sorghum grain number estimation via a density map and predicted with independent field data. Source: Santiago et al., 2024Sorghum grain number estimation via a density map and predicted with independent field data. Source: Santiago et al., 2024

Description: (A) Proposed polynomial model (fitted model, red line) for predicting total grain number from the output obtained from the density map generated using the Sorghum-Net model (considering only one side of the panicle) and benchmarked against the dataset of the number of grains manually counted of the entire panicle. (B) Observed versus predicted total number of grains of a sorghum panicle.


Key Takeaways for Designing Experiments

Thee distinctive aspects of the methodology used in this research on sorghum grain counting with smartphone that other researchers could borrow when designing experiments:

  1. Comprehensive Dataset Preparation. Ensure your dataset is diverse and well-labeled, capturing various conditions like different lighting and plant stages. Data augmentation is essential to expand and improve the dataset’s robustness.
  2. Model Comparison and Selection. Compare multiple models to identify the most effective one for your task. Testing different architectures, as done with CNN models in this experiment, helps find the best approach for accuracy and performance.
  3. Field Conditions and Practicality. Design experiments with real-world conditions in mind, considering environmental factors like lighting and background complexity.

Mobile app Petiole Pro can help with leaf area measurement, greenness assessment, leaf length measurement, germination count and calculating other parameters for sorghum farming and sorghum researchMobile app Petiole Pro can help with leaf area measurement, greenness assessment, leaf length measurement, germination count and calculating other parameters for sorghum farming and sorghum research

How to measure the Leaf area, leaf greenness and leaf size with the mobile app Petiole Pro - Tutorial

Popular Articles in #AI IN AGRICULTURE

Webinar on Smart Leaf Area Measurement & Nitrogen Assessment - Unlock Plant Insights with Petiole Pro