Strawberry Maturity Recognition Algorithm Combining Dark Channel Enhancement and YOLOv5
Abstract
:1. Introduction
2. Materials and Methods
2.1. Image Acquisition
2.2. YOLOv5 Model
3. Image Preprocessing
3.1. Original Dataset
3.2. Image Data Amplification
3.3. Image Marking
4. Image Training
4.1. Training Environment
4.2. Training Results
5. Comparison of Low-Illumination Enhancement Algorithms
5.1. Image Demonstration
5.2. Indicator Analysis
5.3. Comparison of Enhancement Algorithms Conclusion
6. Experiment Results and Analysis
6.1. Evaluation of Experimental Results of Four Network Structures
6.2. Performance Evaluation of Several Single-Stage Detection Methods
6.3. Evaluation of the Effect of Dark Channel Enhancement Processing
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Conflicts of Interest
References
- Zheng, Q. Effect of continuous PPA treatment on storage of strawberries after harvesting. China Fruit Ind. Inf. 2021, 38, 52. [Google Scholar]
- Jiang, H.; Zhang, C.; Liu, F.; Zhu, H.; He, Y. Strawberry maturity recognition based on multispectral parameters of hyperspectral images. Spectrosc. Spectr. Anal. 2016, 36, 1423–1427. [Google Scholar] [CrossRef]
- Zhao, L.; Zhou, G. Study on Strawberry Maturation Identification Technology Based on Color Characteristics. J. Hebei Agric. Univ. 2017, 40, 97–101. [Google Scholar]
- Liu, J.; Meng, W. A Review of Single-Stage Target Detection Algorithms Based on Deep Learning. Aviat. Weapons 2020, 27, 44–53. [Google Scholar]
- Tan, S.; Bie, X.; Lu, G. Real-time detection of human mask wearing based on the YOLOv5 network model. Laser Mag. 2021, 42, 147–150. [Google Scholar]
- Wang, F. Improved yolov5 mask and helmet wearing AI detection and identification algorithm. Archit. Budg. 2020, 11, 67–69. [Google Scholar]
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.Y.M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- Wu, D.; Lv, S.; Jiang, M.; Song, H. Using channel pruning-based YOLO v4 deep learning algorithm for the real-time and accurate detection of apple flowers in natural environments. Comput. Electron. Agric. 2020, 178, 105742. [Google Scholar] [CrossRef]
- Hu, W. Low-illumination image enhancement algorithm based on an improved histogram. Comput. Sci. 2015, 42, 241–242. [Google Scholar]
- Wu, C. Mathematical model study of histogram equalization. Electron. J. 2013, 41, 598–602. [Google Scholar]
- Jiang, B.; Zhong, M. Application of an improved histogram equalization algorithm to image enhancement. Laser Infrared 2014, 44, 702–706. [Google Scholar]
- Yao, R.; Huang, J.; Wu, X. Improved histogram equalization image enhancement algorithm. J. Railw. 1997, 19, 79–82. [Google Scholar]
- Zhang, J. IR image destudy based on improved dark channel algorithm. Laser Infrared 2021, 51, 1081–1087. [Google Scholar]
- Hu, W.; Yuan, G.; Dong, C.; Shu, X. New method for single image defogging based on dark channel priority. Comput. Res. Dev. 2010, 47, 2132–2140. [Google Scholar]
- Tian, W.; Sun, Y.Y.; Wei, H.T. Traffic sign detection algorithm based on SSD model. Comput. Appl. Softw. 2021, 38, 201–206. [Google Scholar]
- Zhou, W.J.; Zhang, Y.; Wang, Y.J. Real-time recognition method of static gestures based on DSSD. Comput. Eng. 2020, 46, 255–261. [Google Scholar] [CrossRef]
- Chen, C.; Yin, K.; Zhang, Y.; Jin, R.; Zhi, W.; Shen, C. Research on helmet wearing detection based on EfficientDet. Inf. Technol. Stand. 2021, 1, 19–23. [Google Scholar]
Network Structure | Number of Residual Components (pcs) | Number of Convolution Kernels (pcs) |
---|---|---|
YOLOv5s | 12 | 1001 |
YOLOv5m | 24 | 1488 |
YOLOv5l | 36 | 1984 |
YOLOv5x | 48 | 2180 |
Hardware or Software | Technical Parameter |
---|---|
operating system | Window 10 × 64 Home |
GPU | NVIDIAGeForceRTX-3090 |
CPU | Intel(R)Xeon(R)Silver4116 |
memory | 32 GB |
deep learning library | TensorFlow |
marking software | Labelimg |
programming language | Python |
Adaptive Histograms | Laplace Transform | Gamma Transform | Log Transform | Dark Channel Enhancement | |
---|---|---|---|---|---|
SSIM | 0.65 | 0.63 | 0.28 | 0.23 | 0.85 |
PSNR | 16 | 29 | 21 | 7 | 26 |
UCIQE | 0.07 | 0.003 | 0.04 | 0.007 | 0.06 |
MSE | 3960 | 82 | 1408 | 34,109 | 425 |
Network Structure | YOLOv5s | YOLOv5m | YOLOv5l | YOLOv5x |
---|---|---|---|---|
Time/s | 0.1423 | 0.1439 | 0.1472 | 0.1527 |
Recognition accuracy | 0.81 | 0.91 | 0.83 | 0.85 |
Classification of Strawberry Maturity | 1 (Unripe) | 2 (Almost Ripe) | 3 (Ripe) | 4 (Bad Fruit) |
---|---|---|---|---|
Recognition Accuracy | 0.92 | 0.90 | 0.90 | 0.91 |
Classification of Strawberry Maturity | 1 (Unripe) | 2 (Almost Ripe) | 3 (Ripe) | 4 (Bad Fruit) |
---|---|---|---|---|
SSD | 0.62 | 0.66 | 0.80 | 0.71 |
DSSD | 0.72 | 0.73 | 0.83 | 0.76 |
EfficientDet | 0.70 | 0.78 | 0.81 | 0.75 |
Classification of Strawberry Maturity | 1 (Unripe) | 2 (Almost Ripe) | 3 (Ripe) | 4 (Bad Fruit) |
---|---|---|---|---|
Accuracy before Enhancement | 0.81 | 0.68 | 0.68 | 0.70 |
Accuracy after Enhancement | 0.88 | 0.82 | 0.84 | 0.80 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Fan, Y.; Zhang, S.; Feng, K.; Qian, K.; Wang, Y.; Qin, S. Strawberry Maturity Recognition Algorithm Combining Dark Channel Enhancement and YOLOv5. Sensors 2022, 22, 419. https://doi.org/10.3390/s22020419
Fan Y, Zhang S, Feng K, Qian K, Wang Y, Qin S. Strawberry Maturity Recognition Algorithm Combining Dark Channel Enhancement and YOLOv5. Sensors. 2022; 22(2):419. https://doi.org/10.3390/s22020419
Chicago/Turabian StyleFan, Youchen, Shuya Zhang, Kai Feng, Kechang Qian, Yitong Wang, and Shangzhi Qin. 2022. "Strawberry Maturity Recognition Algorithm Combining Dark Channel Enhancement and YOLOv5" Sensors 22, no. 2: 419. https://doi.org/10.3390/s22020419
APA StyleFan, Y., Zhang, S., Feng, K., Qian, K., Wang, Y., & Qin, S. (2022). Strawberry Maturity Recognition Algorithm Combining Dark Channel Enhancement and YOLOv5. Sensors, 22(2), 419. https://doi.org/10.3390/s22020419