Skip to content

Bravinkindi9/Data_augmentation_DL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Data Augmentation: The Ultimate Overfitting Fix

Slide 1: The Problem - Overfitting πŸ“‰

When a deep learning model learns the training data too well, it ends up failing on new data it hasn't seen before. This is called overfitting, and it's a huge problem, especially with small datasets.


Slide 2: The Solution - Data Augmentation πŸš€

Data augmentation is a powerful trick that helps fix overfitting. It works by creating new training data from your existing images by applying random transformations like:

  • Flipping (layers.RandomFlip)
  • Rotating (layers.RandomRotation)
  • Zooming (layers.RandomZoom)

This makes your model more robust and able to generalize better to unseen images.


Slide 3: The Project in Action πŸ› οΈ

This notebook shows a simple step-by-step example using TensorFlow and Keras.

  1. The Dataset: We start with the flower_photos dataset, which is a perfect example for demonstrating overfitting.
  2. The Base Model: We first train a simple Convolutional Neural Network (CNN) without any data augmentation to establish a baseline.
  3. The Augmented Model: We then add a data augmentation layer to the model and re-train it.

Slide 4: The Results & Takeaway πŸ“ˆ

By training on an augmented dataset, the model's performance on new data improves significantly.

  • Baseline Model (without augmentation): Our initial model achieved an accuracy of approximately 71.3% on the validation set.
  • Augmented Model (with augmentation): The augmented model is expected to show a substantial increase in accuracy, proving that data augmentation successfully helps the model generalize better and reduces overfitting.

Slide 5: How to Run This Yourself πŸ§‘β€πŸ’»

To get started, simply open the Data augmentation solve Overfitting.ipynb notebook in a Jupyter environment and run all the cells. The notebook will handle all the data downloads and model training for you.

You'll see the results for yourself in the output!

About

This project is a great demonstration of how data augmentation can be used to combat overfitting in deep learning models. It uses a simple convolutional neural network (CNN) and the flower_photos dataset to show how training a model on a limited dataset can lead to poor performance on new data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors