Skip to content

poudelef/Transfer-learning---Feature-Extraction-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Food Image Classification with Transfer Learning (TensorFlow)

This project demonstrates how to use Transfer Learning with TensorFlow and TensorFlow Hub to classify images from the Food101 dataset (10-class, 10% subset). We compare the performance of two pretrained models – ResNet-50 and EfficientNetV2 – as feature extractors.

Overview

Transfer learning leverages the learned patterns of large pretrained models to solve custom image classification tasks with minimal training data. This notebook:

Loads and processes the Food101 (10%) dataset

Uses ResNet-50 and EfficientNetV2 from TensorFlow Hub

Visualizes sample data and training performance

Compares model accuracy and loss over epochs

πŸ›  Technologies Used

Python

TensorFlow & Keras

TensorFlow Hub

Matplotlib

NumPy

ImageDataGenerator

TensorBoard

Google Colab (GPU Runtime)

Classes:

chicken_curry, chicken_wings, fried_rice, grilled_salmon, hamburger, ice_cream, pizza, ramen, steak, sushi

How to Run

Open the notebook in Google Colab

Ensure GPU runtime is enabled (Runtime β†’ Change runtime type β†’ GPU)

Run the cells step-by-step

Use TensorBoard (locally or inline) to visualize logs

Results

Model Accuracy (After 5 Epochs) ResNet-50 ~55.8% EfficientNetV2 ~74.6%

EfficientNetV2 significantly outperformed ResNet-50 on this small dataset in terms of validation accuracy and faster convergence.

Visualizations

Random food image samples

Training vs. Validation Loss and Accuracy plots

TensorBoard logs (Note: tensorboard.dev is deprecated)

Future Work

Fine-tune the feature extractor layers

Use data augmentation to prevent overfitting

Train on the full Food101 dataset

Deploy the best model as an API

Contributing

Feel free to fork, improve, or open issues. Collaboration is welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published