Edible and poisonous mushrooms are difficult to distinguish visually, potentially causing errors in determining their safety for consumption. This study aims to develop a MobileNetV2-based image classification model to distinguish edible and poisonous mushrooms. A quantitative experimental approach with transfer learning was applied to 2,820 images from 47 species, consisting of 25 edible and 22 poisonous species. The dataset was divided into 70% training, 10% validation, and 20% testing data. The research involved image preprocessing, MobileNetV2 architecture design using ImageNet-pretrained weights, model training with Adam optimizer and categorical cross-entropy loss, and evaluation using accuracy, precision, recall, F1-score, and confusion matrix. The model achieved 98% training accuracy, 96% validation accuracy, and 92.2% testing accuracy, with a test loss of 0.271. On the testing data, the edible and poisonous classes achieved F1-scores of 0.93 and 0.91, respectively. These results indicate that MobileNetV2 can effectively classify edible and poisonous mushrooms with good generalization performance. The model can serve as an image-based identification aid but should not be used as the sole basis for determining mushroom safety.
Copyrights © 2026