Method of Peanut Pod Quality Detection Based on Improved ResNet
Peanuts are prone to insect damage, breakage, germination, mildew, and other defects, which makes the quality of peanuts uneven. The difference in peanut pod quality makes the price and economic benefit also have a big difference. The classification of peanut pods according to quality is an importan...
Main Authors: | , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2023-07-01
|
Series: | Agriculture |
Subjects: | |
Online Access: | https://www.mdpi.com/2077-0472/13/7/1352 |
_version_ | 1827734422029336576 |
---|---|
author | Lili Yang Changlong Wang Jianfeng Yu Nan Xu Dongwei Wang |
author_facet | Lili Yang Changlong Wang Jianfeng Yu Nan Xu Dongwei Wang |
author_sort | Lili Yang |
collection | DOAJ |
description | Peanuts are prone to insect damage, breakage, germination, mildew, and other defects, which makes the quality of peanuts uneven. The difference in peanut pod quality makes the price and economic benefit also have a big difference. The classification of peanut pods according to quality is an important part of improving the product grade and market competitiveness. Real-time, accurate, and non-destructive quality detection of peanut pods can effectively improve the utilization and commercial value of peanuts. The strong subjectivity of manual detection and the low efficiency and low accuracy of mechanical detection have caused considerable wastage. Therefore, the present study proposed a new convolutional neural network for the peanut pod quality detection algorithm (PQDA) based on an improved ResNet. Compared to previous models, this model is more practical with high accuracy, lightweight, and easy nesting. Firstly, the detection and classification effects of ResNet18, AlexNet, and VGG16 are compared, and ResNet18 was determined to be the best backbone feature extraction network for model training. Secondly, three models were designed to optimize and improve the algorithm. The KRSNet module was added to the algorithm to make the model lightweight. The CSPNet module was added to the algorithm to improve the learning efficiency of each feature layer. The Convolutional Block Attention Module (CBAM) was added to the algorithm to improve its ability to capture more feature information about peanut pods. The experimental ablation results show that the precision of the improved model PQDA reaches 98.1%, and the size of parameters is only 32.63 M. Finally, the optimized model was applied to other peanut pod varieties for generalization experiments, and the accuracy reached 89.6% and 90.0%, indicating the effectiveness of the proposed peanut pod quality detection model. Furthermore, the model is suitable for deployment on embedded resource-limited devices, such as mobile terminals, to achieve the real-time and accurate detection of peanut pod quality. |
first_indexed | 2024-03-11T01:25:00Z |
format | Article |
id | doaj.art-ef5743adb47041229d2dd05edc24ae18 |
institution | Directory Open Access Journal |
issn | 2077-0472 |
language | English |
last_indexed | 2024-03-11T01:25:00Z |
publishDate | 2023-07-01 |
publisher | MDPI AG |
record_format | Article |
series | Agriculture |
spelling | doaj.art-ef5743adb47041229d2dd05edc24ae182023-11-18T17:52:36ZengMDPI AGAgriculture2077-04722023-07-01137135210.3390/agriculture13071352Method of Peanut Pod Quality Detection Based on Improved ResNetLili Yang0Changlong Wang1Jianfeng Yu2Nan Xu3Dongwei Wang4College of Mechanical and Electrical Engineering, Qingdao Agricultural University, Qingdao 266109, ChinaCollege of Mechanical and Electrical Engineering, Qingdao Agricultural University, Qingdao 266109, ChinaShanghai Advanced Research Institute, Chinese Academy of Sciences, Shanghai 201204, ChinaCollege of Mechanical and Electronic Engineering, Shandong Agricultural University, Taian 271000, ChinaCollege of Mechanical and Electrical Engineering, Qingdao Agricultural University, Qingdao 266109, ChinaPeanuts are prone to insect damage, breakage, germination, mildew, and other defects, which makes the quality of peanuts uneven. The difference in peanut pod quality makes the price and economic benefit also have a big difference. The classification of peanut pods according to quality is an important part of improving the product grade and market competitiveness. Real-time, accurate, and non-destructive quality detection of peanut pods can effectively improve the utilization and commercial value of peanuts. The strong subjectivity of manual detection and the low efficiency and low accuracy of mechanical detection have caused considerable wastage. Therefore, the present study proposed a new convolutional neural network for the peanut pod quality detection algorithm (PQDA) based on an improved ResNet. Compared to previous models, this model is more practical with high accuracy, lightweight, and easy nesting. Firstly, the detection and classification effects of ResNet18, AlexNet, and VGG16 are compared, and ResNet18 was determined to be the best backbone feature extraction network for model training. Secondly, three models were designed to optimize and improve the algorithm. The KRSNet module was added to the algorithm to make the model lightweight. The CSPNet module was added to the algorithm to improve the learning efficiency of each feature layer. The Convolutional Block Attention Module (CBAM) was added to the algorithm to improve its ability to capture more feature information about peanut pods. The experimental ablation results show that the precision of the improved model PQDA reaches 98.1%, and the size of parameters is only 32.63 M. Finally, the optimized model was applied to other peanut pod varieties for generalization experiments, and the accuracy reached 89.6% and 90.0%, indicating the effectiveness of the proposed peanut pod quality detection model. Furthermore, the model is suitable for deployment on embedded resource-limited devices, such as mobile terminals, to achieve the real-time and accurate detection of peanut pod quality.https://www.mdpi.com/2077-0472/13/7/1352quality detectionKRSNet moduleCSPNet moduleCBAM attention module |
spellingShingle | Lili Yang Changlong Wang Jianfeng Yu Nan Xu Dongwei Wang Method of Peanut Pod Quality Detection Based on Improved ResNet Agriculture quality detection KRSNet module CSPNet module CBAM attention module |
title | Method of Peanut Pod Quality Detection Based on Improved ResNet |
title_full | Method of Peanut Pod Quality Detection Based on Improved ResNet |
title_fullStr | Method of Peanut Pod Quality Detection Based on Improved ResNet |
title_full_unstemmed | Method of Peanut Pod Quality Detection Based on Improved ResNet |
title_short | Method of Peanut Pod Quality Detection Based on Improved ResNet |
title_sort | method of peanut pod quality detection based on improved resnet |
topic | quality detection KRSNet module CSPNet module CBAM attention module |
url | https://www.mdpi.com/2077-0472/13/7/1352 |
work_keys_str_mv | AT liliyang methodofpeanutpodqualitydetectionbasedonimprovedresnet AT changlongwang methodofpeanutpodqualitydetectionbasedonimprovedresnet AT jianfengyu methodofpeanutpodqualitydetectionbasedonimprovedresnet AT nanxu methodofpeanutpodqualitydetectionbasedonimprovedresnet AT dongweiwang methodofpeanutpodqualitydetectionbasedonimprovedresnet |