# Improved Real-Time Detection Transformer with Low-Frequency Feature Integrator and Token Statistics Self-Attention for Automated Grading of Stropharia rugoso-annulata Mushroom

**Authors:** Yu-Hang He, Shi-Yun Duan, Wen-Hao Su

PMC · DOI: 10.3390/foods14203581 · 2025-10-21

## TL;DR

This paper introduces an improved detection model for grading Stropharia rugoso-annulata mushrooms with high accuracy and speed, suitable for use on edge devices.

## Contribution

The novel LFFI and TSSA modules enhance accuracy and efficiency for real-time mushroom grading.

## Key findings

- The model achieves 95.2% mAP@0.5:0.95 at 262 FPS with reduced computational overhead.
- It outperforms APHS-YOLO in accuracy and efficiency while eliminating NMS post-processing.
- The model balances global and local feature sensitivity for improved detection.

## Abstract

Manual grading of Stropharia rugoso-annulata mushroom is plagued by inefficiency and subjectivity, while existing detection models face inherent trade-offs between accuracy, real-time performance, and deployability on resource-constrained edge devices. To address these challenges, this study presents an Improved Real-Time Detection Transformer (RT-DETR) tailored for automated grading of Stropharia rugoso-annulata. Two innovative modules underpin the model: (1) the low-frequency feature integrator (LFFI), which leverages wavelet decomposition to preserve critical low-frequency global structural information, thereby enhancing the capture of large mushroom morphology; (2) the Token Statistics Self-Attention (TSSA) mechanism, which replaces traditional self-attention with second-moment statistical computations. This reduces complexity from O(n2) to O(n) and inherently generates interpretable attention patterns, augmenting model explainability. Experimental results demonstrate that the improved model achieves 95.2% mAP@0.5:0.95 at 262 FPS, with a substantial reduction in computational overhead compared to the original RT-DETR. It outperforms APHS-YOLO in both accuracy and efficiency, eliminates the need for non-maximum suppression (NMS) post-processing, and balances global structural awareness with local detail sensitivity. These attributes render it highly suitable for industrial edge deployment. This work offers an efficient framework for the automated grading of large-target crop detection.

## Linked entities

- **Species:** Stropharia rugosoannulata (taxon 68746)

## Full-text entities

- **Species:** Stropharia rugosoannulata (wine cap, species) [taxon 68746]

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12562556/full.md

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