Automated Discrimination of Appearance Quality Grade of Mushroom (Stropharia rugoso-annulata) Using Computer Vision-Based Air-Blown System
Abstract
1. Introduction
2. Materials and Methods
2.1. System Structure and Principle
2.2. Image Acquisition and Pre-Processing
2.3. Development of Grading Criteria
2.4. The Proposed SegGrade Algorithm for Morphological Grading of Mushrooms
2.4.1. The YOLOv8-seg Architecture
2.4.2. Post-Processing Based on OpenCV
2.5. Evaluation Criteria
2.6. Experimental Configuration and Model Parameters
3. Results
3.1. Validation of the Segmentation Algorithm
3.1.1. Segmentation Performance Analysis of Different Segmentation Algorithms
3.1.2. Validation of the Mushroom Segmentation Algorithm
3.2. Validation of the Proposed SegGrade Algorithm for Mushrooms
3.3. Motion Trajectory Analysis of the Mushrooms
3.4. Validation of the Proposed Grading System for Mushrooms
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
YOLOv5 | You Only Look Once Version 5 |
FPS | Frames Per Second |
mAP | Mean Average Precision |
MS | Millisecond |
ASA-FPN | Shuffled Adaptive Spatial Feature Pyramid Network |
MYOLO | Mushroom You Only Look Once |
KG | Kilogram |
PC | Personal Computer |
USB | Universal Serial Bus |
CM | Centimeter |
RDHP | Ratio of Diameter to Height of the Cap |
RLDS | Ratio of Length to Diameter of the Stalk |
PANet | Path Aggregation Network |
FPN | Feature Pyramid Network |
FLOPs | Floating-Point Operations |
MioU | Mean Intersection Over Union |
MPA | Mean Pixel Accuracy |
TP | True Positive |
FP | False Positive |
FN | False Negative |
CPU | Central Processing Unit |
GPU | Graphics Processing Unit |
IDE | Integrated Development Environment |
VS Code | Visual Studio Code |
SORT | State-Of-The-Art |
MM | Millimeter |
References
- Huang, L.; He, C.; Si, C.; Shi, H.; Duan, J. Nutritional, Bioactive, and Flavor Components of Giant Stropharia (Stropharia rugoso-annulata): A Review. J. Fungi 2023, 9, 792. [Google Scholar] [CrossRef] [PubMed]
- Xue, S.; Lu, Q.; Yang, D.; Guo, P.; Wang, Y.; Wang, Q.; Pan, S. Adaptation to appropriate sub-freezing temperatures through reduction of mycelial porosity and alteration of cell wall composition in Stropharia rugosoannulata. Postharvest Biol. Technol. 2024, 216, 113064. [Google Scholar] [CrossRef]
- Zuo, Y.; Zhao, M. SA-EfficientNet: Quality grading model of Stropharia rugoso-annulate. In Proceedings of the 2022 International Conference on Computer Engineering and Artificial Intelligence (ICCEAI), Shijiazhuang, China, 22–24 July 2022; pp. 358–362. [Google Scholar]
- Koirala, B.; Zakeri, A.; Kang, J.; Kafle, A.; Balan, V.; Merchant, F.A.; Benhaddou, D.; Zhu, W. Robotic Button Mushroom Harvesting Systems: A Review of Design, Mechanism, and Future Directions. Appl. Sci. 2024, 14, 9229. [Google Scholar] [CrossRef]
- Ahad, M.T.; Li, Y.; Song, B.; Bhuiyan, T. Comparison of CNN-based deep learning architectures for rice diseases classification. Artif. Intell. Agric. 2023, 9, 22–35. [Google Scholar] [CrossRef]
- Geetha, A.V.; Mala, T.; Priyanka, D.; Uma, E. Multimodal Emotion Recognition with Deep Learning: Advancements, challenges, and future directions. Inf. Fusion 2024, 105, 102218. [Google Scholar]
- Mo, Y.; Wu, Y.; Yang, X.; Liu, F.; Liao, Y. Review the state-of-the-art technologies of semantic segmentation based on deep learning. Neurocomputing 2022, 493, 626–646. [Google Scholar] [CrossRef]
- Hu, R.; Su, W.-H.; Li, J.-L.; Peng, Y. Real-time lettuce-weed localization and weed severity classification based on lightweight YOLO convolutional neural networks for intelligent intra-row weed control. Comput. Electron. Agric. 2024, 226, 109404. [Google Scholar] [CrossRef]
- Lv, M.; Su, W.H. YOLOV5-CBAM-C3TR: An optimized model based on transformer module and attention mechanism for apple leaf disease detection. Front. Plant Sci. 2023, 14, 1323301. [Google Scholar] [CrossRef] [PubMed]
- Wang, R.-F.; Su, W.-H. The Application of Deep Learning in the Whole Potato Production Chain: A Comprehensive Review. Agriculture 2024, 14, 1225. [Google Scholar] [CrossRef]
- Farshbaf Aghajani, P.; Soltani Firouz, M.; Bohlol, P. Revolutionizing Mushroom Identification: Improving efficiency with ultrasound-assisted frozen sample analysis and deep learning techniques. J. Agric. Food Res. 2024, 15, 100946. [Google Scholar] [CrossRef]
- Liu, R.M.; Su, W.H. APHS-YOLO: A Lightweight Model for Real-Time Detection and Classification of Stropharia rugoso-annulata. Foods 2024, 13, 1710. [Google Scholar] [CrossRef] [PubMed]
- Liu, Q.; Fang, M.; Li, Y.; Gao, M. Deep learning based research on quality classification of shiitake mushrooms. LWT 2022, 168, 113902. [Google Scholar] [CrossRef]
- Cong, P.; Feng, H.; Lv, K.; Zhou, J.; Li, S. MYOLO: A Lightweight Fresh Shiitake Mushroom Detection Model Based on YOLOv3. Agriculture 2023, 13, 392. [Google Scholar] [CrossRef]
- Wu, Y.; Sun, Y.; Zhang, S.; Liu, X.; Zhou, K.; Hou, J. A Size-Grading Method of Antler Mushrooms Using YOLOv5 and PSPNet. Agronomy 2022, 12, 2601. [Google Scholar] [CrossRef]
- Lammers, K.; Zhang, K.; Zhu, K.; Chu, P.; Li, Z.; Lu, R. Development and evaluation of a dual-arm robotic apple harvesting system. Comput. Electron. Agric. 2024, 227, 109586. [Google Scholar] [CrossRef]
- Xu, J.; Lu, Y. Prototyping and evaluation of a novel machine vision system for real-time, automated quality grading of sweetpotatoes. Comput. Electron. Agric. 2024, 219, 108826. [Google Scholar] [CrossRef]
- Gan, N.; Wang, Y.; Ren, G.; Li, M.; Ning, J.; Zhang, Z.; Quan, L. Design and testing of a machine-vision-based air-blow sorting platform for famous tea fresh leaves production. Comput. Electron. Agric. 2023, 214, 108334. [Google Scholar] [CrossRef]
- Zhang, Y.; Chuah, J.H. An intelligent grading system for mangosteen based on improved convolutional neural network. Knowl.-Based Syst. 2025, 309, 112904. [Google Scholar] [CrossRef]
- Mohi-Alden, K.; Omid, M.; Soltani Firouz, M.; Nasiri, A. A machine vision-intelligent modelling based technique for in-line bell pepper sorting. Inf. Process. Agric. 2023, 10, 491–503. [Google Scholar] [CrossRef]
- Nakaguchi, V.M.; Abeyrathna, R.M.R.D.; Ahamed, T. Development of a new grading system for quail eggs using a deep learning-based machine vision system. Comput. Electron. Agric. 2024, 226, 109433. [Google Scholar] [CrossRef]
- Wang, F.; Zheng, J.; Tian, X.; Wang, J.; Niu, L.; Feng, W. An automatic sorting system for fresh white button mushrooms based on image processing. Comput. Electron. Agric. 2018, 151, 416–425. [Google Scholar] [CrossRef]
- Karadağ, A.E.; Kılıç, A. Non-destructive robotic sorting of cracked pistachio using deep learning. Postharvest Biol. Technol. 2023, 198, 112229. [Google Scholar] [CrossRef]
- Dairath, M.H.; Akram, M.W.; Mehmood, M.A.; Sarwar, H.U.; Akram, M.Z.; Omar, M.M.; Faheem, M. Computer vision-based prototype robotic picking cum grading system for fruits. Smart Agric. Technol. 2023, 4, 100210. [Google Scholar] [CrossRef]
- Guo, Y.; Yu, Z.; Yu, X.; Wang, X.; Cai, Y.; Hong, W.; Cui, W. Identification and sorting of impurities in tea using spectral vision. LWT 2024, 205, 116519. [Google Scholar] [CrossRef]
- Minaee, S.; Boykov, Y.; Porikli, F.; Plaza, A.; Kehtarnavaz, N.; Terzopoulos, D. Image segmentation using deep learning: A survey. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 44, 3523–3542. [Google Scholar] [CrossRef]
- Li, H.; Rajbahadur, G.K.; Lin, D.; Bezemer, C.-P.; Jiang, Z.M. Keeping Deep Learning Models in Check: A History-Based Approach to Mitigate Overfitting. IEEE Access 2024, 12, 70676–70689. [Google Scholar] [CrossRef]
- Jiang, L.; Chen, W.; Shi, H.; Zhang, H.; Wang, L. Cotton-YOLO-Seg: An Enhanced YOLOV8 Model for Impurity Rate Detection in Machine-Picked Seed Cotton. Agriculture 2024, 14, 1499. [Google Scholar] [CrossRef]
- Nie, H.; Pang, H.; Ma, M.; Zheng, R. A Lightweight Remote Sensing Small Target Image Detection Algorithm Based on Improved YOLOv8. Sensors 2024, 24, 2952. [Google Scholar] [CrossRef] [PubMed]
- Akdoğan, C.; Özer, T.; Oğuz, Y. PP-YOLO: Deep learning based detection model to detect apple and cherry trees in orchard based on Histogram and Wavelet preprocessing techniques. Comput. Electron. Agric. 2025, 232, 110052. [Google Scholar] [CrossRef]
- Li, Z.; Deng, X.; Lan, Y.; Liu, C.; Qing, J. Fruit tree canopy segmentation from UAV orthophoto maps based on a lightweight improved U-Net. Comput. Electron. Agric. 2024, 217, 108538. [Google Scholar] [CrossRef]
- Ding, Y.; Yang, W.; Zhang, J. An improved DeepLabV3+ based approach for disease spot segmentation on apple leaves. Comput. Electron. Agric. 2025, 231, 110041. [Google Scholar] [CrossRef]
- Wang, X.; Guo, Y.; Wang, S.; Cheng, G.; Wang, X.; He, L. Rapid detection of incomplete coal and gangue based on improved PSPNet. Measurement 2022, 201, 111646. [Google Scholar] [CrossRef]
- Liu, M.; Chen, W.; Cheng, J.; Wang, Y.; Zhao, C. Y-HRNet: Research on multi-category cherry tomato instance segmentation model based on improved YOLOv7 and HRNet fusion. Comput. Electron. Agric. 2024, 227, 109531. [Google Scholar] [CrossRef]
- Barranco-Chamorro, I.; Carrillo-García, R.M. Techniques to Deal with Off-Diagonal Elements in Confusion Matrices. Mathematics 2021, 9, 3233. [Google Scholar] [CrossRef]
- Sarkar, T.; Mukherjee, A.; Chatterjee, K.; Shariati, M.A.; Rebezov, M.; Rodionova, S.; Smirnov, D.; Dominguez, R.; Lorenzo, J.M. Comparative analysis of statistical and supervised learning models for freshness assessment of oyster mushrooms. Food Anal. Methods 2022, 15, 917–939. [Google Scholar] [CrossRef]
- Tongcham, P.; Supa, P.; Pornwongthong, P.; Prasitmeeboon, P. Mushroom spawn quality classification with machine learning. Comput. Electron. Agric. 2020, 179, 105865. [Google Scholar] [CrossRef]
- Zheng, H.; Lu, H.; Zheng, Y.; Lou, H.; Chen, C. Automatic sorting of Chinese jujube (Zizyphus jujuba Mill. cv. ‘hongxing’) using chlorophyll fluorescence and support vector machine. J. Food Eng. 2010, 101, 402–408. [Google Scholar] [CrossRef]
- Fan, S.; Li, J.; Zhang, Y.; Tian, X.; Wang, Q.; He, X.; Zhang, C.; Huang, W. On line detection of defective apples using computer vision system combined with deep learning methods. J. Food Eng. 2020, 286. [Google Scholar] [CrossRef]
- Hu, D.; Qiu, D.; Yu, S.; Jia, T.; Zhou, T.; Yan, X. Integration of Optical Property Mapping and Machine Learning for Real-Time Classification of Early Bruises of Apples. Food Bioprocess Technol. 2023, 17, 2745–2756. [Google Scholar] [CrossRef]
- Mukasa, P.; Semyalo, D.; Faqeerzada, M.A.; Kim, H.; Min, H.J.; Kim, M.S.; Baek, I.; Kabenge, I.; Cho, B.-K. Deep learning application for real-time gravity-assisted seed conveying system for watermelon seeds purity sorting. Comput. Electron. Agric. 2024, 221, 108974. [Google Scholar] [CrossRef]
- Wang, J.; Bai, X.; Xu, D.; Li, W.; Tong, S.; Zhang, J. Online sorting of surface defective walnuts based on deep learning. J. Food Eng. 2024, 379, 112133. [Google Scholar] [CrossRef]
- Zhang, Z.; Lu, Y.; Lu, R. Development and evaluation of an apple infield grading and sorting system. Postharvest Biol. Technol. 2021, 180, 111588. [Google Scholar] [CrossRef]
Dataset | First Grade | Second Grade | Third Grade | Total |
---|---|---|---|---|
Training Set | 336 | 336 | 336 | 1008 |
Validation Set | 112 | 112 | 112 | 336 |
Test Set | 112 | 112 | 112 | 336 |
Total | 560 | 560 | 560 | 1680 |
Grade | RDHP | RLDS | Grading Rule |
---|---|---|---|
First Grade | 1.5 ~ 2.5 | 0 ~ 1.5 | Grading is based on RDHP and RLDS ranges; RLDS prevails in conflicts. |
Second Grade | 1.0 ~ 1.5 | 1.5 ~ 2.5 | |
Third Grade | 0 ~ 1.0 | >2.5 |
Model | Image Size | Batch Size | Learning Rate |
---|---|---|---|
U-net | 512 × 512 × 3 | 8 | 1 × 10−4 |
DeeplabV3+ | 512 × 512 × 3 | 8 | 1 × 10−4 |
PSPnet | 512 × 512 × 3 | 8 | 1 × 10−4 |
HRNet | 512 × 512 × 3 | 8 | 1 × 10−4 |
YOLOv5-seg | 512 × 512 × 3 | 16 | 4 × 10−4 |
YOLOv8-seg | 512 × 512 × 3 | 16 | 4 × 10−4 |
YOLOv10-seg | 512 × 512 × 3 | 16 | 4 × 10−4 |
YOLO11-seg | 512 × 512 × 3 | 16 | 4 × 10−4 |
Model | F1-Score (%) | MPA (%) | MIoU (%) | Precision (%) | Recall (%) |
---|---|---|---|---|---|
U-net | 99.33 | 99.46 | 98.67 | 99.20 | 99.46 |
DeeplabV3+ | 99.00 | 99.22 | 98.04 | 98.79 | 99.22 |
PSPnet | 95.22 | 94.43 | 90.97 | 96.03 | 94.43 |
HRNet | 99.25 | 99.45 | 98.50 | 99.05 | 99.45 |
YOLOv5-seg | 99.69 | 99.39 | 99.40 | 99.71 | 99.68 |
YOLOv8-seg | 99.85 | 99.50 | 99.70 | 99.85 | 99.85 |
YOLOv10-seg | 99.70 | 99.40 | 99.60 | 99.66 | 99.75 |
YOLO11-seg | 99.70 | 99.38 | 99.41 | 99.70 | 99.70 |
Model | Params | Inference Time (MS) | FLOPs (G) |
---|---|---|---|
U-net | 2.49 × 107 | 92.68 | 226.15 |
DeeplabV3+ | 5.81 × 107 | 15.79 | 26.44 |
PSPnet | 4.91 × 107 | 103.13 | 36.02 |
HRNet | 9.64 × 107 | 50.22 | 18.74 |
YOLOv5-seg | 2.76 × 106 | 15.10 | 11.00 |
YOLOv8-seg | 3.26 × 106 | 13.23 | 12.00 |
YOLOv10-seg | 2.84 × 106 | 14.26 | 11.70 |
YOLO11-seg | 2.83 × 106 | 14.32 | 10.20 |
Grade | Total Number | Correct Number | Correct Rate (%) | Accuracy (%) |
---|---|---|---|---|
First grade | 50 | 49 | 98.00 | |
Second grade | 50 | 47 | 94.00 | 94.67 |
Third grade | 50 | 46 | 92.00 |
Group | Grade | Total Number | Correct Number | Correct Rate (%) | Accuracy (%) ± Error |
---|---|---|---|---|---|
Group 1 | First | 50 | 45 | 90.00 | 83.33 ± 2.5 |
Second | 50 | 42 | 84.00 | 83.33 ± 3.0 | |
Third | 50 | 38 | 76.00 | 83.33 ± 4.0 | |
Group 2 | First | 50 | 48 | 96.00 | 83.33±1.5 |
Second | 50 | 42 | 84.00 | 83.33 ± 2.0 | |
Third | 50 | 35 | 70.00 | 83.33 ± 3.5 | |
Group 3 | First | 50 | 43 | 86.00 | 75.33 ± 2.0 |
Second | 50 | 40 | 80.00 | 75.33 ± 2.5 | |
Third | 50 | 30 | 60.00 | 75.33 ± 3.0 |
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. |
© 2025 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
Lv, M.; Kong, L.; Zhang, Q.-Y.; Su, W.-H. Automated Discrimination of Appearance Quality Grade of Mushroom (Stropharia rugoso-annulata) Using Computer Vision-Based Air-Blown System. Sensors 2025, 25, 4482. https://doi.org/10.3390/s25144482
Lv M, Kong L, Zhang Q-Y, Su W-H. Automated Discrimination of Appearance Quality Grade of Mushroom (Stropharia rugoso-annulata) Using Computer Vision-Based Air-Blown System. Sensors. 2025; 25(14):4482. https://doi.org/10.3390/s25144482
Chicago/Turabian StyleLv, Meng, Lei Kong, Qi-Yuan Zhang, and Wen-Hao Su. 2025. "Automated Discrimination of Appearance Quality Grade of Mushroom (Stropharia rugoso-annulata) Using Computer Vision-Based Air-Blown System" Sensors 25, no. 14: 4482. https://doi.org/10.3390/s25144482
APA StyleLv, M., Kong, L., Zhang, Q.-Y., & Su, W.-H. (2025). Automated Discrimination of Appearance Quality Grade of Mushroom (Stropharia rugoso-annulata) Using Computer Vision-Based Air-Blown System. Sensors, 25(14), 4482. https://doi.org/10.3390/s25144482