A machine learning application that classifies plant edibility from images using transfer learning.
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txtdata/
train/
edible/
image1.jpg
...
not_edible/
image2.jpg
...
python -m src.train --data-dir data --epochs 10 --batch-size 16uvicorn api.server:app --host 0.0.0.0 --port 8000- Web UI:
http://localhost:8000/ - API:
POST /predictwith image file
plant-edibility/
├── src/ # Training code
├── api/ # FastAPI server
├── web/ # Frontend
├── models/ # Saved checkpoints
└── data/ # Your dataset
GET /health- Health checkPOST /predict- Upload image, get predictionGET /- Web interface
--arch resnet18|resnet50--freeze- Train only classifier head--epochs 10- Number of training epochs--batch-size 16- Batch size (reduce if OOM)
MODEL_CHECKPOINT- Path to model file (default:models/plant_edibility_resnet18.pth)