← All Projects

Food Image Classification with CNNs

Teaching a convolutional neural network to tell Bread, Soup, and Vegetable-Fruit apart

Overview

We taught a computer to look at a photo of food and decide which of three food types it is.

Methodology

flowchart LR
  A[Image Dataset] --> B[Resize / Normalize / Augment]
  B --> C["CNN: Conv + Pooling layers"]
  C --> D[Dense + Softmax]
  D --> E[Train w/ Early Stopping]
  E --> F["Evaluate: Accuracy and Confusion Matrix"]

The Data

We started with folders of food photos already sorted into training and testing piles.

Sample Images & Preprocessing

We looked at example pictures from each food type and cleaned them up before training.

CNN Architecture

We built two layered networks, the second one designed to avoid memorizing the training photos.

Results & Accuracy

The second network did a noticeably better job and confused fewer photos than the first.

Key Takeaways

A well-regularized CNN can reliably sort food photos, and there is still room to push accuracy higher.

Tech Stack

Attribution

This project was completed as part of the MIT Applied Data Science Program (MIT IDSS / Great Learning). The program provided the case-study scaffolding; the analysis, code, and results are my own. Published with permission, for portfolio use only.