Multiple Instance Learning for Visual Grain Quality Analysis Without Instance-level Annotation

Bradley Ezard, Ling Li, Senjian AnWorkshops @ CVPR 2025

Abstract

Automated grain quality inspection typically requires extensive manual labeling of individual kernels, creating a significant barrier to deployment in the agricultural supply chain. This paper proposes a Multiple Instance Learning (MIL) framework that leverages existing industrial sample-level data as "weak" labels. By integrating a dual-softmax architecture and a label propagation mechanism, the system can train high-performing classifiers without grain-by-grain annotation. Experiments on the GrainSet-Bags benchmark demonstrate that this approach achieves near-perfect bag-level accuracy and high instance-level precision, significantly reducing the human effort required for agricultural AI.

Introduction

Visual grain quality analysis is a critical but labor-intensive part of the agricultural supply chain. Currently, inspectors manually identify defects like broken, sprouted, or moldy kernels. Automating this with deep learning usually requires thousands of hours of manual annotation to create instance-level ground truth. This paper addresses this bottleneck by using MIL to learn from weak labels—the overall quality grade of a sample—rather than individual kernel labels, effectively utilizing data already produced during standard industrial processes.

Methodology

The proposed method integrates directly into existing business workflows to bypass the need for human annotators.

The proposed MIL pipeline replaces manual human annotation by leveraging existing defect reporting data.

Pipeline Overview

  1. Data Acquisition: Instead of manual annotation, the system captures images of whole grain samples (bags) that have already been graded by inspectors using standard counting practices.
  2. MIL Architecture: A ResNet-18 backbone extracts features from individual grain instances. The model employs a dual-head softmax approach: one head estimates the likelihood of a specific defect class, while the other estimates the probability that a grain is defective at all.
  3. Label Propagation: Once the MIL model is trained, it identifies high-confidence defective grains in the training set and assigns them pseudo-labels. A final supervised classifier is then trained on these images, which often outperforms the original MIL "teacher" model.
The dual-softmax MIL architecture processes grain instances to produce bag-level scores supervised by existing labels.

Experimental Results

The researchers evaluated their approach using GrainSet-Bags, a synthetic benchmark created from over 350,000 images of individual kernels across four commodities: wheat, maize, rice, and sorghum.

  • Bag-Level Performance: The model achieved near-perfect Average Precision (AP) at the bag level for Rice and Maize (99-100%) when bag sizes were relatively small (300 grains).
  • Instance-Level Performance: While the initial MIL model reached ~75-77% AP for individual grain classification, the label propagation step significantly boosted performance. For Rice, the final classifier reached 94.4% AP.
  • Scaling Challenges: Performance was found to decline as the number of grains per sample (bag size) increased. Identifying a single defective grain among 1,500 kernels presents a significant "needle in a haystack" challenge and increases computational overhead.

Conclusion

This MIL-based approach demonstrates that high-quality grain classifiers can be built using "free" data from existing industrial processes. By eliminating the need for instance-level manual labeling, this method facilitates the rapid deployment of automated inspection systems. Future work will focus on handling larger, more complex samples and expanding the system to a wider variety of commodities and real-world lighting conditions.

Summary updated

BibTeX
@inproceedings{ezard2025multiple,
  author = {Bradley Ezard and Ling Li and Senjian An},
  title = {{Multiple Instance Learning for Visual Grain Quality Analysis Without Instance-level Annotation}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
}
Figure