← All Projects

Rice Type Classification with CNNs

Sorting five rice varieties from magnified grain images using deep learning

Overview

We taught a computer to look at a single grain of rice and name which of five varieties it is.

Methodology

flowchart LR
  A[Image Dataset] --> B[Resize / Normalize / Augment]
  B --> C["CNN: Conv + Pooling layers"]
  C --> D[Dense + Softmax]
  D --> E[Train w/ Early Stopping]
  E --> F["Evaluate: Accuracy and Confusion Matrix"]

The Data (Rice Varieties)

We started with about 74,000 labeled photos of rice grains split evenly across the five types.

Sample Images & Preprocessing

We looked at example grains from each type and shrank every image to a small standard size before training.

CNN Architecture

We built and compared several network designs, settling on a compact convolutional model with dropout.

Results & Accuracy

Even with very short training the smaller convolutional model classified most grains correctly with few mix-ups.

Key Takeaways

A small, well-regularized convolutional network sorts rice varieties accurately and fast enough for real use.

More Visualizations

Tech Stack

Attribution

This project was completed as part of the MIT Applied Data Science Program (MIT IDSS / Great Learning). The program provided the case-study scaffolding; the analysis, code, and results are my own. Published with permission, for portfolio use only.