Detecting stored-grain pests on the surface of the grain pile plays an important role in integrated pest management (IPM), which is crucial for grain security. Recently, numerous deep learning-based pest detection methods have been proposed. However, a critical limitation of existing methods is their inability to detect out-of-distribution (OOD) categories that are unseen during training. When encountering such objects, these methods often misclassify them as in-distribution (ID) categories. To address this challenge, we propose a one-stage framework named PestOOD for out-of-distribution stored-grain pest detection via flow-based feature reconstruction. Specifically, we propose a novel Flow-Based OOD Feature Generation (FOFG) module that generates OOD features for detector training via feature reconstruction. This helps the detector learn to recognize OOD objects more effectively. Additionally, to prevent network overfitting that may lead to an excessive focus on ID feature extraction, we propose a Noisy DropBlock (NDB) module and integrate it into the backbone network. Finally, to ensure effective network convergence, a Stage-Wise Training Strategy (STS) is proposed. We conducted extensive experiments on our previously established multi-class stored-grain pest dataset. The results show that our proposed PestOOD demonstrates superior performance over state-of-the-art methods, providing an effective AI-enabled solution to ensure grain security.
We studied the characteristics of adult flat grain beetles Cryptolestes pusillus Schönherr in trap counts and their relationship with insect densities using electronic probe traps in experimental bins, which contained approximately 1.1 tons of paddy (Changlixiang) with moisture contents of 10.7% and 14.0% and insect densities of 0.1, 1.0, and 5.0 adults/kg. Inside each bin, we vertically installed three layers of electronic probe traps. We installed five traps at the center and half-radius of each layer of the bin. We undertook measurements of daily trap counts, grain temperature, and intergranular relative humidity at each trap location for up to 10 days, and 1.0 kg of paddy was collected from each trap location. At each of the introduced insect densities, we detected beetles using electronic probe traps. When insect density was 0.1 adults/kg, we could not detect the existence of insects in 1.0 kg samples. It was found that the trap counts were spatially nonuniformly distributed, and there was a weak correlation between different locations. There was a regularity in the temporal distribution of trap counts, which was significantly influenced by the paddy moisture content. Except for the insect density, the moisture content, grain temperature, and intergranular relative humidity at the trap location significantly affected trap counts. The distribution pattern of beetles in paddy bulks was found and aggregated by analyzing trap counts. There was a correlation between trap counts and insect densities in grain bulks, but this correlation varied significantly across different locations.