GrainBrain: Multi-View Identification and Stratification of Defective Grain Kernels

Lei Fan1,2*, Dongdong Fan2, Yiwen Ding2+, Yong Wu2, Donglin Di3, Maurice Pagnucco1, Yang Song1
IEEE TII
1CSE, UNSW Sydney,
2Gaozhe Technology, 3LiAuto

*Corresponding Author
Code arXiv

Abstract

Grain Appearance Inspection (GAI) is crucial for evaluating grain quality and determining seed stratification. Typically, trained inspectors manually examine each grain kernel to identify and remove defective ones, which is time-consuming and error-prone. In this paper, we present GrainBrain, a robotic vision-based system comprising a hardware prototype (A100) and a deep learning model (GrainAD). A100 is equipped with five cameras to capture high-quality, multi-view images of each kernel. The identification of defective kernels is treated as an unsupervised anomaly detection task. GrainAD trains a classifier to distinguish between healthy and pseudo-anomaly samples generated at both image and feature levels, and a supervised contrastive learning loss is employed to obtain compact feature representations of healthy kernels. Additionally, we release a large-scale dataset containing over 100K annotated images of four types of cereal grains. Extensive experiments were conducted to verify the superiority of our system, achieving an average AUROC of 94.4/90.4% at the image/pixel level. Our system excelled in both efficiency and consistency, as demonstrated by experiments comparing human experts to the system.

Dataset Information

The GrainBrain dataset provides a comprehensive collection of high-quality images for cereal grain inspection. It includes over 100K images captured from four types of grains: wheat, maize, soybean, and paddy. The dataset supports tasks such as anomaly detection.

For each type of cereal grains, we provide:

  • Train
    • Good
  • Test-image
    • Good
    • Bad
  • Test-pixel
    • Good
    • Bad
    • Mask

We report the statistical information about only train and test-image folders in the paper. When conducting the experiments, the image-level AUROC and pixel-level AUROC are reported using the test-pixel folder:

Type Train Test-image-good Test-image-bad Test-pixel-good Test-pixel-bad Total Good Total Bad Total
Wheat 30,000 10,000 10,000 1,800 1,800 41,800 11,800 53,600
Maize 18,000 6,000 6,000 1,500 1,500 25,500 7,500 33,000
Soybean 10,500 3,500 3,500 1,100 1,100 15,100 4,600 19,700
Paddy 6,000 2,000 2,000 1,000 1,000 9,000 3,000 12,000

The GrainBrain dataset is licensed under the Creative Commons BY-NC-SA 4.0 license. Note that All data must not be used for commercial purposes.

Data download

You can access the dataset using the figshare links below:

  • Wheat: [Figshare] (16G)
  • Maize: [Figshare] (12.4G)
  • Soybean [Figshare] (12G)
  • Paddy [Figshare] (4.5G)
  • BibTeX