Sort:
Issue
Detection Method for Log-Cultivated Shiitake Mushrooms Based on Improved RT-DETR
Smart Agriculture 2025, 7(5): 67-77
Published: 01 September 2025
Abstract PDF (99.1 MB) Collect
Downloads:29
Objective

Shiitake mushroom is one of the most important edible and medicinal fungi in China, and its factory-based cultivation has become a major production model. Although mixing, bagging, sterilization, and inoculation have been largely automated, harvesting and grading still depend heavily on manual labor, which leads to high labor intensity, low efficiency, and inconsistency caused by subjective judgment, thereby restricting large-scale production. Furthermore, the clustered growth pattern of shiitake mushrooms, the high proportion of small targets, severe occlusion, and complex illumination conditions present additional challenges to automated detection. Traditional object detection models often struggle to balance accuracy, robustness, and lightweight efficiency in such environments. Therefore, there is an urgent need for a high-precision and lightweight detection model capable of supporting intelligent evaluation in mushroom harvesting.

Methods

To address these challenges, this study proposed an improved real-time detection model named FSE-DETR, based on the RT-DETR framework. In the backbone, the FasterNet Block was introduced to replace the original HGNetv2 structure. By combining partial convolution (PConv) for efficient channel reduction and pointwise convolution (PWConv) for rapid feature integration, the FasterNet Block reduced redundant computation and parameter size while maintaining effective multi-scale feature extraction, thereby improving both efficiency and deployment feasibility. In the encoder, a small object feature fusion network (SFFN) was designed to enhance the recognition of immature mushrooms and other small targets. This network first applied space-to-depth convolution (SPDConv), which rearranged spatial information into channel dimensions without discarding fine-grained details such as edges and textures. The processed features were then passed through the cross stage partial omni-kernel (CSPOmniKernel) module, which divided feature maps into two parts: one path preserved original information, while the other path underwent multi-scale convolutional operations including 1×1, asymmetric large-kernel, and frequency-domain transformations, before being recombined. This design enabled the model to capture both local structural cues and global semantic context simultaneously, improving its robustness under occlusion and scale variation. For bounding box regression, the Efficient Intersection over Union (EIoU) loss function was adopted to replace generalized IoU (GIoU). Unlike GIoU, EIoU explicitly penalized differences in center distance, aspect ratio, and scale between predicted and ground-truth boxes, resulting in more precise localization and faster convergence during training. The dataset was constructed from images collected in mushroom cultivation facilities using fixed-position RGB cameras under diverse illumination conditions, including direct daylight, low-light, and artificial lighting, to ensure realistic coverage. Four mushroom categories were annotated: immature mushrooms, flower mushrooms, smooth cap mushrooms, and defective mushrooms, following industrial grading standards. To address the limited size of raw data and prevent overfitting, extensive augmentation strategies such as horizontal and vertical flipping, random rotation, Gaussian and salt-and-pepper noise addition, and synthetic occlusion were applied. The augmented dataset consisted of 4000 images, which were randomly divided into training, validation, and test sets at a ratio of 7:2:1, ensuring balanced distribution across all categories.

Results and Discussions

Experimental evaluation was conducted under consistent hardware and hyperparameter settings. The ablation study revealed that FasterNet effectively reduced parameters and computation while slightly improving accuracy, SFFN significantly enhanced the detection of small and occluded mushrooms, and EIoU improved bounding box regression. When integrated, these improvements enabled the final model to achieve an accuracy of 95.8%, a recall of 93.1%, and a mAP50 of 95.3%, with a model size of 19.1 M and a computational cost of 53.6 GFLOPs, thus achieving a favorable balance between precision and efficiency. Compared with mainstream detection models including Faster R-CNN, YOLOv7, YOLOv8m, and YOLOv12m, FSE-DETR consistently outperformed them in terms of accuracy, robustness, and model efficiency. Notably, the mAP for immature and defective mushrooms increased by 2.4 and 2.5 percentage points, respectively, compared with the baseline RT-DETR, demonstrating the effectiveness of the SFFN module for small-object detection. Visualization analysis further confirmed that FSE-DETR maintained stable detection performance under different illumination and occlusion conditions, effectively reducing missed detections, false positives, and repeated recognition, while other models exhibited noticeable deficiencies. These results verified the superior robustness and reliability of the proposed model in practical mushroom factory environments.

Conclusions

The proposed FSE-DETR model integrated the FasterNet Block, Small Object Feature Fusion Network, and EIoU loss into the RT-DETR framework, achieving state-of-the-art accuracy while maintaining lightweight characteristics. The model showed strong adaptability to small targets, occlusion, and complex illumination, making it a reliable solution for intelligent mushroom harvest evaluation. With its balance of precision and efficiency, FSE-DETR demonstrates great potential for deployment in real-world factory production and provides a valuable reference for developing high-performance, lightweight detection models for other agricultural applications.

Open Access Issue
Novel method for selecting the regions of interest in hyperspectral images of apples with random poses on the sorting line
International Journal of Agricultural and Biological Engineering 2025, 18(1): 199-207
Published: 28 February 2025
Abstract PDF (3.3 MB) Collect
Downloads:65

Recent approaches to the internal quality inspection of apples with the application of hyperspectral imaging technology are highly cost-intensive because of labor involvement for the data collection on a fixed posture and manual selection of the region of interest (RoI). In addition, several studies have repeated the data acquisition for the same apple. Current methods cannot meet the automation requirements of the sorting line. Therefore, this study proposed a novel method for automatically selecting RoI in hyperspectral images of apples with random poses. Firstly, the preliminary RoI selection of apple hyperspectral image was carried out, followed by the performance of histogram statistics of each pixel with spectral intensity at 700 nm wavelength. The top 40% area of the spectral intensity was reserved to obtain the magnitude relationship of the spectral intensity of each pixel point and a morphological erosion operation. Original apple RoI was acquired and overexposed pixels were removed with spectral intensity greater than 3900 (maximum 4095) in the reserved area at 700 nm. Secondly, the relationship between apple size and prediction accuracy was measured for the in-depth RoI analysis. A partial least square regression (PLSR) model was established between the average spectrum and apple sugar content of RoI with different sizes. Finally, the established model with the top 70% of the spectral intensity achieved the best prediction accuracy. Non-destructive estimation of apple sugar content was performed through hyperspectral imaging technology with reference to the proposed RoI selection method. A competitive adaptive reweighted sampling algorithm along the PLSR (CARS-PLSR) model was established after black-and-white correction and standard normal transformation (SNV) preprocessing and obtained the highest prediction accuracy. The determination coefficient of cross-validation (Rcv) and root mean square error of cross-validation (RMSECV) were 0.9595 and 0.3203°Brix, respectively. The determination coefficient of prediction (Rp) was 0.9308, and the root mean square error of prediction (RMSEP) was 0.4681°Brix. Results proved that the auto-selection of RoI is an efficient and accurate method, which can provide a foundation in practical application for online apple grading systems with hyperspectral imaging technology.

Total 2