Identifying edible and poisonous mushrooms is challenging due to their close visual similarity and variations in natural environments. Misclassification can lead to severe health risks, especially in communities that rely on visual inspection without expert support. This work presents an automated mushroom edibility classification system built using deep learning. Two backbone architectures—EfficientNet-B3 and ResNet-50—are evaluated to determine their effectiveness in learning fine-grained mushroom features. The dataset includes images collected under diverse environmental conditions and is enhanced through preprocessing and augmentation to improve generalization. Experimental analysis shows that EfficientNet-B3 provides superior accuracy compared to ResNet-50. To improve transparency, Grad-CAM is integrated to highlight image regions influencing the model’s decision, and temperature scaling is applied to calibrate confidence scores. The system provides reliable classification along with explainable outputs, making it suitable as a safety-oriented decision-support tool for mushroom identification.
Introduction
It explains that many mushroom species look very similar, and traditional identification methods based on human observation or local knowledge are unreliable, especially in rural and forest-dependent regions. This often leads to accidental poisoning due to environmental variation, subtle morphological differences, and lack of expert availability.
To solve this problem, the study proposes a computer vision-based deep learning system trained on a carefully labeled dataset collected from natural environments under varying conditions. Several CNN models (such as EfficientNet-B3 and ResNet-50) are evaluated, with EfficientNet-B3 selected for better feature extraction and generalization. The system also includes Grad-CAM for explainability and confidence calibration to improve reliability.
The problem statement emphasizes that mushroom misclassification can lead to severe health consequences, including poisoning and death, highlighting the need for an accurate, automated, and interpretable AI-based solution.
The literature review summarizes multiple related works in agricultural disease detection and mushroom classification using ML and DL techniques, including CNNs, YOLO models, Random Forest, and hybrid architectures. Reported accuracies are generally high (often 90–99%), but challenges remain in generalization, dataset limitations, and real-world deployment. Existing systems often fail to handle environmental variability and lack severity or practical decision support.
Conclusion
This work addresses one of the critical challenges in the area of automated mushroom species and infection level identification, highly relevant for the prevention of accidental poisoning and ensuring food safety. In an effort to resolve this challenge, the paper presented a deep learning-based classification framework using EfficientNet-B3 and ResNet50, evaluated on a four-class mushroom dataset comprising edible, edible-disease, mold-infected, and poisonous categories. In this regard, the proposed EfficientNet-B3 model achieved an accuracy of 92.84%, substantially outperforming ResNet50, which reached an accuracy of 78.60%. It is expected that the performance of EfficientNet-B3 could be much better due to its compound scaling and enhanced multi-scale feature extraction, which can help capture minute variations in texture, color, and various patterns of infection, not easily interpretable by the naked human eye. The proposed system eliminates manual inspection by expert mycologists and instead enables rapid, efficient, and scalable mushroom identification from simple image inputs. Upon widespread application, the proposed framework has the potentials for minimizing health hazards caused by mushrooms, ensuring safer foraging and farming practices, and enhancing public safety in food consumption.
Future directions address key challenges in mushroom classification, focusing particularly on the recognition of rare species, seasonal variations, and fine-grained subcategories across different regions.
The incorporation of advanced object detection models, such as YOLOv8, would allow for the identification of multiple mushrooms within an image and thus provide greater real-world applicability in forest and agricultural contexts. In addition, embedding the system into mobile or IoT-based devices could facilitate the real-time identification of mushrooms and an immediate assessment of risks directly in the field. Further, a similar model architecture is easy to adapt to related fungal recognition tasks; for instance, the detection of crop infections or the identification of food spoilage extends its applicability to wider agricultural and public health challenges.
References
[1] B. Mondal, et al., “A comprehensive survey on crop disease prediction using machine learning and deep learning techniques,” Journal of Agricultural Informatics, pp. 1–20, 2023.
[2] V. Maral, et al., “AI-driven crop and flower disease detection using CNN with real-time weather-based recommendation system,” International Journal of Advanced Agricultural Technology, vol. 12, no. 4, pp. 55–63, 2024.
[3] T. A. Mir, et al., “Hybrid CNN and Random Forest mode`l for automated mushroom disease diagnosis,” Computers and Electronics in Agriculture, vol. 210, p. 107993, 2023.
[4] C. Venkatesh, et al., “Real-time mushroom disease detection using YOLOv5 for oyster mushroom cultivation,” Procedia Computer Science, vol. 218, pp. 1025–1034, 2023.
[5] N. Dharati and N. Hemavathy, “Classification of edible and poisonous mushrooms using machine learning techniques,” International Journal of Data Science and Analytics, vol. 9, no. 2, pp. 87–95, 2022
[6] R. G. de Luna, et al., “Deep learning-based edible and poisonous mushroom classification using CNN,” Expert Systems with Applications, vol. 207, p. 118145, 2023.
[7] Z. Loukil, et al., “Deep learning-based object detection for agricultural and biological structures,” Multimedia Tools and Applications, vol. 82, pp. 14521–14545, 2023.
[8] A. R. Gawande, et al., “A survey on machine learning approaches for crop disease prediction,” International Journal of Agricultural Science and Technology, vol. 11, no. 3, pp. 220–235, 2023.
[9] Y. Wang, et al., “Mushroom-YOLO: An enhanced YOLOv5 model for real-time mushroom growth-stage detection in Agriculture 4.0,” Sensors, vol. 24, no. 5, p. 2510, 2024.
[10] N. Hemavathy, “3D mushroom detection and pose estimation using RGB-D sensing for robotic harvesting,” Robotics and Autonomous Systems, vol. 162, p. 104328, 2023.
[11] V. Maral, et al., “Generalization challenges in deep learning-based plant disease detection and domain adaptation strategies,” Applied Intelligence, vol. 53, pp. 11985–12001, 2023.
[12] S. K. M. Hassan, et al., “Lightweight CNN for plant disease classification with high accuracy and reduced parameters,” ICT Express, vol. 10, no. 1, pp. 120–128, 2024.
[13] Oad, et al., “Ensemble-based plant leaf disease detection using ResNet50, InceptionV3 and Explainable AI,” Computers and Electronics in Agriculture, vol. 209, p. 107912, 2023.
[14] R. Ouamane, et al., “Hybrid CNN and tensor-subspace model (HOWSVD-MD) for tomato leaf disease classification,” Journal of Imaging, vol. 9, no. 8, p. 153, 2023.
[15] Z. Loukil, et al., “Comparative evaluation of YOLOv5, YOLOv7, and YOLOv8 for real-time agricultural disease detection,” Artificial Intelligence in Agriculture, vol. 9, pp. 32–45, 2023.