AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
PDF (5.6 MB)
Collect
Submit Manuscript AI Chat Paper
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Publishing Language: Chinese

Lightweight walnut external defect detection model based on improved YOLO11n

Xinyi Ma1,2,3, Jinhao Hu1,2,3, Zhongjia Hao1,2,3( ), Jingbin Li1,2,3, Shuangyin Liu4
College of Mechanical and Electrical Engineering, Shihezi University, Shihezi 832000, China
Xinjiang Production and Construction Corps Key Laboratory of Modern Agricultural Machinery, Shihezi 832003, China
Engineering Research Center of Ministry of Education For Mechanization of Oasis Characteristic Cash Crop Production , Shihezi 832003, China
College of Artificial Intelligence, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China
Show Author Information

Abstract

Walnut is one of the most favorite nuts worldwide. However, existing production lines cannot capture the tiny defects and narrow cracks from the natural growth textures of walnuts at the high rolling speed. It is often required for high-precision detection and real-time operation in industrial scenarios. In this study, a lightweight YOLO11n model, named YOLO-EBM, was proposed to detect the external defects of walnuts. Three optimization strategies were designed to balance between detection accuracy and a lightweight model in the actual application needs of walnut production lines. 1) The original backbone network of the baseline YOLO11n model was replaced by the lightweight EfficientNetV2 network. Feature structure was used to efficiently extract the key features of walnut defects. Thereby, the overall accuracy of detection was also improved to effectively reduce the redundant parameters for the lightweight model. 2) Bidirectional Feature Pyramid Network (BiFPN) was introduced into the feature fusion module for the high efficiency of multi-scale feature fusion. The parameters were substantially reduced to further promote the lightweight level of the model. While the performance of detection fully met the actual production requirements. 3) A Multi-Scale Dilated Attention (MSDA) mechanism was added to the small-object detection layer. Fine-grained features of tiny defects and narrow cracks were effectively captured to identify the real defects and walnut natural growth textures. Thus, there was an ideal balance between precision and model size. Experimental tests were carried out to verify the performance of the YOLO-EBM model. The results show that the improved model achieved a mean average precision (mAP) of 93.3%, the number of parameters was reduced to 0.77 M, and the size of the model weight file was compressed to 2.18 MB. Compared with the baseline YOLO11n model before improvement, the mean average precision of the YOLO-EBM model increased by 2.1 percentage points, whereas the number of parameters and the size of the weight file were reduced by 70.2% and 65.4%, respectively. Additionally, compared with YOLOv5n, YOLOv8n, and YOLOv10n, the mAP was improved by 5.2, 4.3, and 2.5 percentage points, respectively. Although the precision of RT-DETR is slightly higher than that of the proposed model, its mAP is only 78.2% and its parameter count reaches 31.99 M, making it unsuitable for mobile deployment. Both high accuracy and lightweight contributed to the deployment and transplantation of the model on resource-constrained industrial production equipment, fully meeting the real-time detection requirements of actual walnut production lines. In summary, this finding can provide a reliable technical reference and practical solution for the intelligent detection of walnut external defects in large-scale production. Theoretical and technical bases for lightweight models can also be obtained to detect the defects of food products.

CLC number: S24 Document code: A Article ID: 1002-6819(2026)-13-0317-10

References

【1】
【1】
 
 
Transactions of the Chinese Society of Agricultural Engineering
Pages 317-326

{{item.num}}

Comments on this article

Go to comment

< Back to all reports

Review Status: {{reviewData.commendedNum}} Commended , {{reviewData.revisionRequiredNum}} Revision Required , {{reviewData.notCommendedNum}} Not Commended Under Peer Review

Review Comment

Close
Close
Cite this article:
Ma X, Hu J, Hao Z, et al. Lightweight walnut external defect detection model based on improved YOLO11n. Transactions of the Chinese Society of Agricultural Engineering, 2026, 42(13): 317-326. https://doi.org/10.11975/j.issn.1002-6819.202601015

1

Views

0

Downloads

0

Crossref

0

Web of Science

0

Scopus

Received: 04 January 2026
Revised: 07 March 2026
Published: 15 July 2026
© Chinese Society of Agricultural Engineering 2026