Skip to content

shivareddy2002/rice-grain-classifier

Repository files navigation

🌾 Rice Type Classifier using CNN

A Deep Learning–based application that classifies different types of rice grains from uploaded images.
Built with Python, TensorFlow/Keras, and Streamlit for an interactive web interface.


🔗 Live Demo

👉 Visit Rice Grain Classifier Web App

Live Demo Badge


✨ Key Features

  • 📤 Upload & Predict – Upload a rice grain image and get instant predictions
  • 🔎 Top-K Results – Displays most probable varieties with confidence scores
  • 🌾 Supported Varieties:
    • Arborio
    • Basmati
    • Ipsala
    • Jasmine
    • Karacadag
  • 💻 Clean Web UI – Simple and interactive Streamlit interface
  • Real-Time Predictions – Powered by a custom-trained CNN

📊 Dataset

  • Custom-labeled dataset of different rice varieties (Arborio, Basmati, Ipsala, Jasmine, Karacadag)
  • Preprocessing: resize, normalize, data augmentation
  • Model trained on balanced rice image dataset

🛠️ Tech Stack

Technology Purpose
Python 3.8+ Core Programming
TensorFlow / Keras Deep Learning (CNN Model)
Streamlit Web App Interface
FastAPI (optional) REST API Backend
OpenCV & PIL Image Preprocessing
NumPy / Pandas Data Handling
Matplotlib / Seaborn Training Visualizations

🔮 How It Works

1️⃣ Upload a rice grain image (JPG/PNG)
2️⃣ Image is preprocessed (resize → normalize)
3️⃣ CNN model predicts probabilities of each variety
4️⃣ App shows Top-K predictions with confidence scores


🖼️ Web Interface Screenshots

🌾 Home Page (Uploading Image)

Upload Page

🔍 Resizing the uploaded image

Prediction Page

📊 Prediction with Confidence Score

Confidence View


🚀 Future Enhancements

  • ➕ Add more rice varieties and expand dataset
  • 📱 Mobile-friendly responsive UI
  • ☁️ Deploy on Hugging Face Spaces, AWS, or GCP
  • 🧩 Enable batch prediction for multiple grains

🤝 Contributing

Contributions are welcome!

  1. 🍴 Fork the repository
  2. 🌱 Create a feature branch
  3. 🚀 Submit a pull request

👨‍💻 Author

Lomada Siva Gangi Reddy

  • 🎓 B.Tech CSE (Data Science), RGMCET (2021–2025)
  • 💡 Interests: Python | Machine Learning | Deep Learning | Data Science
  • 📍 Open to Internships & Job Offers

📬 Contact Me:


📌 Project Workflow

flowchart LR
    A[Importing Libraries] --> B[Loading Image Dataset]
    B --> C[Preprocessing: Augmentation, Normalization]
    C --> D[Model Building: CNN]
    D --> E[Prediction Result]
    E --> F[Project Deployment: Streamlit / FastAPI]

    %% Styles
    style A fill:#FFD54F,stroke:#F57F17,stroke-width:2px,color:#000;
    style B fill:#4FC3F7,stroke:#0277BD,stroke-width:2px,color:#fff;
    style C fill:#AED581,stroke:#33691E,stroke-width:2px,color:#000;
    style D fill:#BA68C8,stroke:#4A148C,stroke-width:2px,color:#fff;
    style E fill:#FF8A65,stroke:#BF360C,stroke-width:2px,color:#fff;
    style F fill:#90CAF9,stroke:#0D47A1,stroke-width:2px,color:#000;



Loading

About

A CNN-powered rice grain classifier that accurately identifies different rice varieties using deep learning and Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published