Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FruitLens Fruit Classification System

A Flask image-classification project created from the mixed fruit/vegetable archive. The app keeps only fruit classes, trains a local scikit-learn image model, and presents predictions with a frontend style based on the original food recommendation system.

Fruit Dataset

Kept fruit classes:

apple, banana, grapes, kiwi, lemon, mango, orange, pear, pineapple, pomegranate, watermelon

Excluded vegetable-style classes from the archive:

beetroot, bell pepper, cabbage, capsicum, carrot, cauliflower, chilli pepper, corn, cucumber, eggplant, garlic, ginger, jalepeno, lettuce, onion, paprika, peas, potato, raddish, soy beans, spinach, sweetcorn, sweetpotato, tomato, turnip

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Train The Model

python3 train_model.py

This creates:

models/fruit_classifier.joblib
models/fruit_classifier.json

Run The App

python3 app.py

Open:

http://127.0.0.1:8081

If needed:

PORT=5099 python3 app.py

For deployment, set a real Flask session secret in the environment:

SECRET_KEY="change-this-to-a-long-random-value" python3 app.py

Project Structure

app.py
ml/classifier.py
templates/
static/
dataset/train/
dataset/validation/
dataset/test/
models/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages