Visual Geometry Group (VGG) is one of the most influential convolutional neural networks in computer vision. It is a deep convolutional neural network architecture known for its simple, uniform use of small 3x3 filters stacked in sequence, enabling powerful image recognition and feature extraction.

We just published a course on the freeCodeCamp.org YouTube channel that will teach you to rebuild the VGG architecture from the ground up while mastering the theory, mathematics, and design principles that shaped it. Mohammed Al Abrah created this course.

This course explores the origins and philosophy behind VGG, breaks down the math of convolutions, and compares VGG’s design to its peer architectures, all while building a modular, transparent implementation in PyTorch. You’ll gain practical experience with data handling, transformation, and visualization in Google Colab, and use tools like torchinfo, matplotlib, and CNN Explainer to analyze and interpret your models. The course features a full training loop with live loss curve plotting, fine-tuning, and plenty of opportunities to experiment and visualize results.

Here is the full list of sections in the course:

  • Welcome & Overview of the VGG Atlas

  • Philosophy Behind VGG: Depth with Simplicity

  • Historical Origins & Architectural Motivation

  • Mathematics of Convolution in VGG

  • Design Principles: Uniformity & Depth

  • Peer Comparison: VGG vs Contemporary Architectures

  • Training Strategy: Optimizing the VGG Model

  • Exploring Data Augmentation Techniques

  • VGG in Transfer Learning Applications

  • Visualization & Interpretability Techniques

  • VGG Variants: A Family of Deep Nets

  • Hands-on Walkthrough: Practical Applications

  • VGG Ecosystem & Research Resources

  • Kicking Off Practical Labs in Google Colab

  • Setting Up Your Coding Environment

  • Tiny VGG: Building the Model from Scratch

  • Importing Essential Libraries

  • Loading and Preparing Data in Google Colab

  • Familiarizing with Data Folders and Files

  • Setting Up the Directory Path for Data

  • Becoming One with the Data

  • Visualizing Sample Images with Metadata

  • Visualizing Images in Python Using NumPy and Matplotlib

  • Transforming the Data

  • Visualizing Transformed Data with PyTorch

  • Transforming Data with torchvision.transforms

  • Loading Data Using ImageFolder

  • Turning Loaded Images into a DataLoader

  • Visualizing Some Sample Images

  • Starting VGG Model Construction & Explaining Structure Using CNN Explainer Tool

  • Replicating the CNN Explainer Tool VGG Model in Google Colab Using Code

  • Instantiating an Instance from the VGG Model

  • Displaying and Summarizing the VGG Model

  • Dummy Forward Pass Using a Single Image

  • Using torchinfo to Understand Input/Output Shapes in the Model

  • Model Summary

  • Creating the Training and Testing Loop

  • Creating a Function to Combine Training and Testing Steps

  • Calling the Training Function

  • Training the Model: Running the Training Step

  • Reading the Results, Fine-Tuning, and Improving Hyperparameters

  • Plotting the Loss Curve and Fine-Tuning with Different Settings

Watch the full course on the freeCodeCamp.org YouTube channel (5-hour watch).