Tomato Ripeness Classification
View on GitHubReal-time computer vision system that detects and classifies tomato ripeness stages directly from video. YOLOv8 detection wrapped in a Streamlit and FastAPI app for live inference.
Simple image-level classification breaks down when several tomatoes appear in one frame at different ripeness stages. The project solves the object-level version instead, locating every tomato in a scene and classifying each one individually, then making the result usable through an interactive application rather than a notebook-only model.
The system is built around a YOLOv8 object detector trained on six classes covering size and ripeness stage. Two model sizes were fine-tuned and compared using saved training and evaluation artifacts, so the final choice was evidence-based rather than arbitrary. A Streamlit interface handles the confidence slider and source selection, with support for uploaded images, uploaded video, webcam, RTSP streams, and YouTube video, and a separate FastAPI module demonstrates serving the same model outside Streamlit, including a websocket live-feed path. Object detection was chosen over plain classification specifically because it handles multiple tomatoes at different ripeness stages independently in one frame.

