Skip to content

This project explores rice image classification using CNN, SVM, and KNN techniques across five rice categories. By comparing their performance, we aim to identify the most effective method for accurate classification, contributing to advancements in agricultural image analysis and deep learning applications.

License

Notifications You must be signed in to change notification settings

Yilun-D/DL-proj-rice-image-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Learning project S23: Rice image classification

Description

A project involving image classification, especially using the Deep Learning Model CNN, which acquired accuracy of approx. 99%. Using this model, we did a training to classify images into 5 different classes. We also used the Machine Learning models SVM and KNN for a comparison.

A convolutional Neural Network Model, using Pytorch Framework

A deep learning model, we aim to achieve a thorough understanding of the model's performance subtleties, as well as remarkable classification accuracy.

An SVM model,

Support Vector Machines (SVM) are a type of supervised learning model used for classification tasks. SVM separates data points into different classes by finding the optimal hyperplane. In image classification, SVM efficiently handles high-dimensional data, effectively distinguishing between features to classify images accurately.

A K-nearest Neighbors model,

A machine learning model, a simple yet powerful machine learning model that operates on the principle of similarity. KNN predicts the class or value of a new data point by considering the majority label or average value of its nearest neighbors from the training dataset.

Background and Data

For this image classification, we used a rice types images dataset from Kaggle, which is the following : https://www.kaggle.com/datasets/muratkokludataset/rice-image-dataset

It contains 75 000 color images (RGB color space -Red, Green and Blue-) with 5 classes (rice types), each class contains 15 000 images. To explore this project, please verify you are working on a GPU device for afaster training and better performance. The evaluation part can be done on CPU.

Usage

Insert unseen images, in this case a rice image, and get a prediction of it's label. The project is submitted as a Jupyter notebook which includes Data preprocessing, building a model, model training and evaluation, as well as some visualization. Based on the accuracy of each model, we deduced that the best model is CNN model, which is a Deep Learning model.

Explanation of some codes

for each model, we worked with different Framework. for CNN model, we used the Pytorch Framework. Since it is the case, the preprocessing part is different, where it needs to follow each Framework as well as the type of model used.

Support

If you need support, you can follow the contributors on GitHub, using their username: Djihene Beladjine : DjiheneBA ; Yilun Du : Yilun-D ; Christy Lazar : lazarchris ;

Thank you.

About

This project explores rice image classification using CNN, SVM, and KNN techniques across five rice categories. By comparing their performance, we aim to identify the most effective method for accurate classification, contributing to advancements in agricultural image analysis and deep learning applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published