# Enhanced Real-Time Detector for Industrial Vision-Based Corn Impurity Detection

**Authors:** Xiao Zhang, Yuhang Bian, Xiangdong Li, Haoze Yu, Dong Li, Min Wu

PMC · DOI: 10.3390/foods15061065 · 2026-03-18

## TL;DR

This paper introduces a new real-time corn impurity detection system using an improved transformer model for better accuracy and speed in industrial settings.

## Contribution

The novel RT-DETR-CD model integrates RFAConv, DySample, and Inner-Shape-IoU loss for enhanced corn impurity detection.

## Key findings

- The model achieves a 4.7% improvement in mean average precision (mAP) over existing methods.
- It operates at 68 frames per second, making it suitable for real-time industrial applications.
- The model outperforms the original RT-DETR in both accuracy and speed on a self-built dataset.

## Abstract

The effective cleaning of corn prior to storage is crucial for ensuring grain quality and safety. Traditional Convolutional Neural Network (CNN)-based detection methods often struggle to maintain accuracy in scenarios with dense occlusions. Furthermore, limitations in image quality and feature representation hinder their generalization to diverse impurity types. To address these challenges, this paper proposes an enhanced real-time detector transformer model named RT-DETR-CD (Real-Time Detector Transformer with Convolution and Dynamic Upsampling) for corn impurity detection based on industrial vision. This approach integrates Receptive Field Attention Convolutions (RFAConv) to enhance sensitivity to local texture details and employs the dynamic upsampling operator DySample to restore high-frequency edge information. Additionally, a novel Inner-Shape-IoU loss function is introduced to accelerate bounding box regression for objects with varying aspect ratios. Images were captured using FLIR industrial cameras under controllable annular LED illumination. Experiments on a self-built dataset demonstrate that the proposed model achieves a 4.7% improvement in mean average precision (mAP) and operates at 68 frames per second (FPS), outperforming the original RT-DETR model in both accuracy and speed. This work provides a practical solution for real-time, high-precision impurity detection on grain processing lines.

## Figures

8 figures with captions in the complete paper: https://tomesphere.com/paper/PMC13025326/full.md

---
Source: https://tomesphere.com/paper/PMC13025326