This model is design to classify 4 different types of grains: noodles, rice, couscous, and oatmeal by using the FastAI library with Fastbook and ResNet-18 convolutional neural network architecture.
The model files can be found in the "Files and Versions" section.
Training Data
Limited dataset of 400 labeled images of grains, with 100 images for each category.
Obtained using DuckDuckGo Images API
Resized to 128x128 pixels to reduce storage and computation usage.
3 additional training epochs are performed to fine-tune the model for grain classification task.
Metrics
Model performance are evaluated using confusion matrix. Confusion matrix measures the metric of accuracy and precision. The prediction is in 4 categories:
True positive: Model correctly predicted positive class.
False Positive: Model incorrectly predicted when actual is negative class.
True Negative: Model correctly predict negative class.
False Negative: Model incorrectly predict negative class when actual is positive.
Results
In the images below, you can see that there are different shades.
The darker shade represents correct predictions
The lighter shade represents incorrect predictions.
First training:
Second training:
First training
Second training
We can see that the model has improved after cleaning the data.
it improved in predicting the images correctly.
there is better accuracy in the second training compared to the first training. The number of darker shades is higher.
there is less confusion in the second training compared to the first training. The number of lighter shades is lower.