2026W-COMP4107/Mushroom-Classification-Neural-Network
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Mushroom Classification Model Name: Christer Henrysson Student Number: 101260693 This is a ResNet18-based CNN that classifies mushroom images and outputs the most likely top 3 species (with percentages of confidence). The trained model was to large for github so you can find it here https://drive.google.com/file/d/1Pb7RKg5J9dacixvK6gWcTevNFaUaXM_r/view?usp=sharing How to get requirements: Run "pip install -r requirements.txt" How To Train: If you want to train your own model Download the dataset from https://www.kaggle.com/datasets/zlatan599/mushroom1 Insert dataset into project directory Train by running "python model.py" How To Run: To get model I trained already go to the following link download the model and place it in the project directory https://drive.google.com/file/d/1Pb7RKg5J9dacixvK6gWcTevNFaUaXM_r/view?usp=sharing Insert desired mushroom images you want to predict into "images" folder (there is a example photo in there) Run "python runner.py" Read outputed text for predictions How to evaluate: Run "python evaluate.py" Make sure: CSV files (train.csv, val.csv, test.csv) are in the same poject directory Images folder (/images) exists for predictions Model file best_resnet18_mushroom.pth is generated before inference