fruit-classifier / README.md
nahinfarhan's picture
Update README.md
499d69c verified
|
Raw History Blame Contribute Delete
1.88 kB

A newer version of the Streamlit SDK is available: 1.68.0

Upgrade
metadata
title: Fresh vs Rotten Fruit Classifier
emoji: 🍎
colorFrom: green
colorTo: red
sdk: streamlit
sdk_version: 1.48.1
app_file: app_ui.py
pinned: false

🍎 Fresh vs Rotten Fruit Classifier

An AI-powered web application that classifies fruit types and determines their freshness using a pre-trained ResNet152 model.

🎯 Features

  • Fruit Classification: Identifies fruit types (apple, banana, orange, etc.)
  • Freshness Detection: Determines if fruit is fresh or rotten
  • Real-time Processing: Upload images for instant AI predictions
  • User-friendly Interface: Clean Streamlit UI for easy interaction

πŸš€ How to Use

  1. Upload Image: Click "Choose an image..." and select a fruit photo
  2. Classify: Click the "Classify" button to analyze your image
  3. View Results: See the predicted fruit type and freshness status

πŸ€– Model Details

  • Architecture: Multi-task ResNet152
  • Input: 224x224 RGB images
  • Outputs:
    • Fruit classification (apple, banana, orange, mixed)
    • Freshness probability (fresh vs rotten)
  • Training: Trained on diverse fruit dataset with fresh/rotten labels

πŸ“Š Supported Fruits

  • 🍎 Apple
  • 🍌 Banana
  • 🍊 Orange
  • πŸ‡ Mixed fruits

πŸ’‘ Use Cases

  • Food Quality Control: Assess fruit freshness in retail/storage
  • Smart Agriculture: Monitor crop quality and harvest timing
  • Food Safety: Identify potentially spoiled produce
  • Educational: Learn about AI in food technology

πŸ”§ Technical Stack

  • Framework: Streamlit
  • AI Model: TensorFlow/Keras ResNet152
  • Image Processing: PIL, NumPy
  • Deployment: Hugging Face Spaces

πŸ“ Example Results

Upload a fruit image and get:

  • Fruit Type: "Apple" (95.2% confidence)
  • Freshness: "Fresh" (12.3% rotten probability)

Try it now with your own fruit photos! πŸ“πŸ₯πŸ‘