This first project has the ambitious goal of building a deep learning model capable of classifying images of fungi into their species, providing information on the edibility or toxicity of each recognized species
The Mushroom Vision 4 app, currently running on HuggingFace, uses a DenseNet161 architecture to classify mushroom images into 4 classes.
The table below shows the species considered in this study (you can try these images by dragging and dropping them into the app).
Species name | Common name | Photo | Edibility | |
---|---|---|---|---|
01 | Amanita Muscaria | Cocco del monte | Toxic | |
02 | Amanita Vaginata | Amanita | Not edible | |
03 | Boletus Edulis | Porcino | Great | |
04 | Boletus Erythropus | Cappella Malefica | Toxic when raw |
Feature extractors with 4 different architectures were tried:
- AlexNet
- DenseNet121
- ResNet50
- VGG16
The DenseNet121 performed better so all variants of this architecture available on torch were tested to identify the best performing:
- DenseNet121
- DenseNet161
- DenseNet169
- DenseNet201
The 161 form ouperformed the others as shown in the confusion matrices below.
The main goal was to minimize the classifications of poisonous mushrooms as edible, those that could potentially bring the most harm to potential users. In the validation set, no such errors are made while in the test set, probably due to the imbalance in the classes, misclassifications in this direction are present.
Despite this, the model offers very accurate performance as well as very high confidence levels on its predictions.