Potato Malformation Identification and Classification Based on Improved YOLOv3 Algorithm
Abstract
:1. Introduction
- (1)
- In order to obtain a higher-performance potato malformed object detection algorithm, the results of different modules before and after the improvement were compared.
- (2)
- To test the effectiveness of the improved algorithm, a horizontal comparative analysis was conducted between this algorithm and other object detection algorithms.
- (3)
- In order to check whether the improved algorithm had missed or mistakenly detected potatoes with different potato shapes under various states, the visual results were compared and analyzed.
2. Materials and Methods
2.1. Potato Malformation Detection Algorithm
2.2. Improvement on YOLOv3 Algorithm
2.2.1. Improvement in Loss Function
2.2.2. Improvement in Convolution
2.3. Test Environment and Evaluation Indicators
3. Data and Analysis
3.1. Overview of Test Design
3.2. Dataset Preparation
3.3. Network Training
3.4. Test Data and Analysis
3.4.1. Ablation Test
3.4.2. Horizontal Comparison Test
3.4.3. Comparison of AP and mAP
3.4.4. Comparison of Visualization Results
- (1)
- Single malformed potato
- (2)
- Single malformed potato and a normal potato
- (3)
- Two different types of malformed potatoes
- (4)
- Different kinds of malformed potatoes and a normal potato
4. Conclusions
- (1)
- In terms of feature extraction backbone networks, deep separable convolution was adopted to fuse features at various scales, which not only greatly reduced the storage space requirements of the model but also helped to improve detection accuracy.
- (2)
- In terms of target box regression, CIOU loss was adopted, and the problem of unstable and inequivalent target box regression caused by MSE loss was solved. This not only ensures the diversity of extractable features but also significantly improves the detection accuracy without increasing the model storage capacity.
- (3)
- Compared with the original algorithm, the improved YOLOv3 made mAP increase by 4.68%, 6.1 h training time was saved, and the storage capacity of the model reduced by approximately 66%. Specifically, the AP values of local protrusion, local depression, proportion imbalance, and mechanical injury of the improved algorithm were 94.13%, 91.00%, 95.52%, and 91.79%, respectively. Those had all progressed significantly compared to before the improvement, and the comparison of visualization results also confirmed the effectiveness of the improved algorithm in this paper.
5. Discussion
- (1)
- The definition of a malformed potato in this study was not sufficiently standardized, making it difficult to distinguish some malformed potatoes that were not particularly obvious during training of this system. Therefore, it is necessary to provide a clearer definition of the concept of potato appearance malformations, and if necessary, these should be treated differently according to the variety.
- (2)
- In the feature-fusion output-channel-improved YOLOv3 algorithm, the improved the output channel was still quite traditional; other methods can be adopted to make more effective improvements in the future.
- (3)
- This study had limited classification of malformations; for example, these can also include malformations caused by surface diseases or local or large-scale epidermal attachments. Therefore, the recognition and classification of malformations in this system is not sufficient. In future research, higher-level networks and more systematic partitioning can be used to achieve more effective classification.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhang, H.; Xu, F.; Wu, Y.; Hu, H.H.; Dai, X.F. Progress of potato staple food research and industry development in China. J. Integr. Agric. 2017, 16, 2924–2932. [Google Scholar] [CrossRef]
- Scarpa, F.; Colonna, A.; Ruggeri, A. Multiple-image deep learning analysis for neuropathy detection in corneal nerve images. Cornea 2020, 39, 342–347. [Google Scholar] [CrossRef] [PubMed]
- Muhammad, U. Research on the Method of Judging Litchi Maturity and Size Based on Image Deep Learning. Master’s Thesis, South China University of Technology, Guangzhou, China, 8 June 2020. [Google Scholar]
- Shahbaz, K.; Muhammad, T.; Muhammad, T.K.; Zubair, A.K.; Shahzad, A. Deep learning-based identification system of weeds and crops in strawberry and pea fields for a precision agriculture sprayer. Precis. Agric. 2021, 22, 1711–1727. [Google Scholar]
- Kermany, D.S.; Goldbaum, M.; Cai, W.; Valentim, C.C.S.; Liang, H.; Baxter, S.L.; Mckeown, A.; Ge, Y.; Wu, X.; Yan, F. Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell 2018, 172, 1122–1131. [Google Scholar] [CrossRef] [PubMed]
- Casado-García, A.; Heras, J.; Milella, A.; Marani, R. Semi-supervised deep learning and low-cost cameras for the semantic segmentation of natural images in viticulture. Precis. Agric. 2022, 23, 2001–2026. [Google Scholar] [CrossRef]
- Harmandeep, S.G.; Osamah, I.K.; Youseef, A.; Saleh, A.; Fawaz, A. Fruit image classification using deep learning. Comput. Mater. Contin. 2022, 71, 5135–5150. [Google Scholar]
- Erwin, A.D.; Suprihatin, B.; Agustina, S.B. A robust techniques of enhancement and segmentation blood vessels in retinal image using deep learning. Biomed. Eng. Appl. Basis Commun. 2022, 34, 2250019. [Google Scholar]
- Bian, B.C.; Chen, T.; Wu, R.J.; Liu, J. Improved YOLOv3-based defect detection algorithm for printed circuit board. J. Zhejiang Univ. (Eng. Sci.) 2023, 57, 735–743. (In Chinese) [Google Scholar]
- Li, Z.H.; Zhang, L. Safety helmet wearing detection method of improved YOLOv3. Foreign Electron. Meas. Technol. 2022, 41, 148–155. (In Chinese) [Google Scholar]
- Qin, W.W.; Song, T.N.; Liu, J.Y.; Wang, H.W.; Liang, Z. Remote sensing military target detection algorithm based on lightweight YOLOv3. Comput. Eng. Appl. 2021, 57, 263–269. (In Chinese) [Google Scholar]
- Zhang, B.; Xu, F.; Li, X.T.; Zhao, Y.D. Research on the improved YOLOv3 algorithm for military cluster targets. Fire Control Command Control 2021, 46, 81–85. (In Chinese) [Google Scholar]
- Chen, N.; Feng, Z.; Li, F.; Wang, H.; Yu, R.; Jiang, J.; Tang, L.; Rong, P.; Wang, W. A fully automatic target detection and quantification strategy based on object detection convolutional neural network YOLOv3 for one-step X-ray image grading. Anal. Methods 2023, 15, 164–170. [Google Scholar] [CrossRef] [PubMed]
- Zhang, Z.; Zhang, Y.; Wen, Y.; Fu, K.; Luo, X.Y. Intelligent defect detection method for additive manufactured lattice structures based on a modified YOLOv3 model. J. Nondestruct. Eval. 2022, 41, 3. [Google Scholar] [CrossRef]
- Temniranrat, P.; Kiratiratanapruk, K.; Kitvimonrat, A.; Sinthupinyo, W.; Patarapuwadol, S. A system for automatic rice disease detection from rice paddy images serviced via a Chatbot. Comput. Electron. Agric. 2021, 185, 106156. [Google Scholar] [CrossRef]
- Tassis, L.M.; de Souza, J.E.T.; Krohling, R.A. A deep learning approach combining instance and semantic segmentation to identify diseases and pests of coffee leaves from in-field images. Comput. Electron. Agric. 2021, 186, 106191. [Google Scholar] [CrossRef]
- Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Gong, C.; Li, A.; Song, Y.; Xu, N.; He, W. Traffic sign recognition based on the YOLOv3 algorithm. Sensors 2022, 22, 9345. [Google Scholar] [CrossRef] [PubMed]
- Zheng, Z.; Wang, P.; Liu, W.; Li, J.; Ye, R.; Ren, D. Distance-IoU loss: Faster and better learning for bounding box regression. In Proceedings of the Thirty-Fourth AAAI Conference on Artifieial Inelligence, New York, NY, USA, 7–12 February 2020. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018. [Google Scholar]
- Howard, A.; Sandler, M.; Chu, G.; Chen, L.C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for mobilenetv3. In Proceedings of the International Conference on Computer Vision 2019, Seoul, Republic of Korea, 27 October–2 November 2019. [Google Scholar]
Convolutional Type | Convolutional Step Size | Number of Channels | Size of Feature Map | Backbone Output |
---|---|---|---|---|
Conv2d, | 2 | 16 | 208 × 208 | |
bneck, 3 × 3 | 1 | 16 | 208 × 208 | |
bneck, 3 × 3 | 2 | 24 | 104 × 104 | |
bneck, 3 × 3 | 1 | 24 | 104 × 104 | |
bneck, 5 × 5 | 2 | 40 | 52 × 52 | |
bneck, 5 × 5 | 1 | 40 | 52 × 52 | |
bneck, 5 × 5 | 1 | 40 | 52 × 52 | X3 |
bneck, 3 × 3 | 2 | 80 | 26 × 26 | |
bneck, 3 × 3 | 1 | 80 | 26 × 26 | |
bneck, 3 × 3 | 1 | 80 | 26 × 26 | |
bneck, 3 × 3 | 1 | 80 | 26 × 26 | X2 |
bneck, 3 × 3 | 1 | 112 | 26 × 26 | |
bneck, 3 × 3 | 1 | 112 | 26 × 26 | |
bneck, 5 × 5 | 2 | 160 | 13 × 13 | |
bneck, 5 × 5 | 1 | 160 | 13 × 13 | |
bneck, 5 × 5 | 1 | 160 | 13 × 13 | |
Conv2d, 1 × 1 | 1 | 960 | 13 × 13 | X1 |
Potato Shapes | Training Set/Sheet | Verification Set/Sheet | Test Set/Sheet | Total/Sheet |
---|---|---|---|---|
Normal potato | 1850 | 50 | 50 | 1950 |
Local protrusion | 380 | 55 | 55 | 490 |
Local depression | 370 | 55 | 55 | 480 |
Proportional imbalance | 368 | 55 | 55 | 478 |
Mechanical injury | 335 | 52 | 52 | 439 |
Algorithm | Improvement of Backbone Feature Extraction Network | Improvement of Loss Function | Memory Capacity /M | mAP /% |
---|---|---|---|---|
YOLOv3 | — | — | 59.85 | 88.43 |
Algorithm Improvement 1 | √ | — | 19.55 | 89.31 |
Algorithm Improvement 2 | — | √ | 59.52 | 92.87 |
Improved YOLOv3 | √ | √ | 20.43 | 93.11 |
Algorithm | Training Time /h | Memory Capacity /M | Detection Time /ms |
---|---|---|---|
SSD | 19.4 | 62.88 | 96 |
YOLOv3 | 22.9 | 59.55 | 56 |
YOLOv3-Tiny | 17.1 | 38.76 | 35 |
Faster R-CNN | 24.51 | 75.93 | 47 |
Improved YOLOv3 | 16.8 | 20.43 | 53 |
Algorithm | AP/% | mAP /% | |||
---|---|---|---|---|---|
Local Protrusion | Local Depression | Proportional Imbalance | Mechanical Damage | ||
SSD | 85.48 | 84.73 | 86.36 | 88.71 | 86.32 |
YOLOv3 | 88.74 | 86.80 | 90.18 | 87.98 | 88.43 |
YOLOv3-Tiny | 87.06 | 83.50 | 86.06 | 86.73 | 85.84 |
Faster R-CNN | 85.21 | 82.46 | 85.02 | 83.11 | 83.95 |
Improved YOLOv3 | 94.13 | 91.00 | 95.52 | 91.79 | 93.11 |
Algorithm | Total Number of Detections | Number of Detections | Number of False Detections | Number of Missed Detections |
---|---|---|---|---|
YOLOv3 | 180 | 160 | 18 | 2 |
Improved YOLOv3 | 180 | 167 | 12 | 1 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, G.; Yang, W.; Liu, Y.; Yang, X.; Wang, Q.; Yang, S.; Feng, B.; Sun, W.; Li, H. Potato Malformation Identification and Classification Based on Improved YOLOv3 Algorithm. Electronics 2023, 12, 4461. https://doi.org/10.3390/electronics12214461
Wang G, Yang W, Liu Y, Yang X, Wang Q, Yang S, Feng B, Sun W, Li H. Potato Malformation Identification and Classification Based on Improved YOLOv3 Algorithm. Electronics. 2023; 12(21):4461. https://doi.org/10.3390/electronics12214461
Chicago/Turabian StyleWang, Guanping, Wanxia Yang, Yan Liu, Xiaoping Yang, Qi Wang, Sen Yang, Bin Feng, Wei Sun, and Hongling Li. 2023. "Potato Malformation Identification and Classification Based on Improved YOLOv3 Algorithm" Electronics 12, no. 21: 4461. https://doi.org/10.3390/electronics12214461
APA StyleWang, G., Yang, W., Liu, Y., Yang, X., Wang, Q., Yang, S., Feng, B., Sun, W., & Li, H. (2023). Potato Malformation Identification and Classification Based on Improved YOLOv3 Algorithm. Electronics, 12(21), 4461. https://doi.org/10.3390/electronics12214461