Skip to content

farazmirzax/CNN-Playground

Repository files navigation

CNN Practice Projects 🚀

Welcome to your CNN learning journey! This workspace contains 5 progressive projects designed to build your understanding from the ground up.

💡Quick Start

New here? → Read the Getting Started Guide for setup instructions, installation, and tips!

📚 Learning Path

Project 1: MNIST Digit Recognition (START HERE!)

Difficulty: ⭐ Beginner
What you'll learn:

  • Basic CNN structure (Conv layers, Pooling, Dense layers)
  • How images flow through a network
  • Training and evaluation basics
  • Dataset: Handwritten digits (28x28 grayscale)

Project 2: Fashion MNIST Classifier

Difficulty: ⭐⭐ Beginner+
What you'll learn:

  • Working with more complex patterns
  • Improving accuracy with better architectures
  • Dropout for preventing overfitting
  • Dataset: Clothing items (28x28 grayscale)

Project 3: CIFAR-10 Image Classification

Difficulty: ⭐⭐⭐ Intermediate
What you'll learn:

  • Handling colored images (RGB)
  • Deeper CNN architectures
  • Batch normalization
  • Dataset: 10 classes (airplanes, cars, birds, cats, etc.)

Project 4: Cats vs Dogs Classifier

Difficulty: ⭐⭐⭐⭐ Intermediate+
What you'll learn:

  • Data augmentation (flipping, rotation, zoom)
  • Transfer learning basics
  • Working with larger images
  • Dataset: Real photos of cats and dogs

Project 5: Custom CNN Architecture

Difficulty: ⭐⭐⭐⭐⭐ Advanced
What you'll learn:

  • Designing your own architecture
  • Experimenting with hyperparameters
  • Model comparison and optimization

🎯 How to Use This Workspace

  1. Start with Project 1 - Don't skip ahead! Each project builds on previous concepts
  2. Read the comments - Every line is explained in simple terms
  3. Run the code - See the results yourself
  4. Experiment - Change parameters and see what happens
  5. Ask questions - If something is unclear, ask!

📦 Requirements

pip install tensorflow numpy matplotlib scikit-learn

💡 Key CNN Concepts (Simple Explanations)

What is a CNN?

Think of it as a smart image analyzer that learns patterns. It doesn't memorize images - it learns features like "edges", "curves", "textures" that help identify objects.

Convolutional Layers (Conv2D)

  • What it does: Scans the image with small filters to detect patterns
  • Think of it as: A magnifying glass that looks for specific features
  • No complex math needed: Just know it finds patterns!

Pooling Layers (MaxPooling)

  • What it does: Shrinks the image while keeping important information
  • Think of it as: Zooming out to see the big picture
  • Benefit: Makes the network faster and reduces overfitting

Dense Layers (Fully Connected)

  • What it does: Makes the final decision based on detected features
  • Think of it as: The "brain" that combines all clues to make a prediction

Activation Functions (ReLU, Softmax)

  • ReLU: Adds non-linearity (helps learn complex patterns)
  • Softmax: Converts outputs to probabilities (e.g., 80% dog, 20% cat)

🎓 Tips for Success

  1. Don't worry about the math - Focus on understanding what each layer does conceptually
  2. Visualize - Each project includes visualization code
  3. Start simple - Begin with small networks, then add complexity
  4. Monitor training - Watch accuracy improve over epochs
  5. Experiment - Change one thing at a time and observe the effect

📊 Expected Performance

Project Expected Accuracy Training Time
MNIST 98-99% ~2 minutes
Fashion MNIST 88-92% ~3 minutes
CIFAR-10 70-75% ~5 minutes
Cats vs Dogs 80-85% ~10 minutes
Custom Varies Varies

🤔 Common Questions

Q: Why does my model get worse after a while?
A: This is called "overfitting" - your model memorized the training data. We'll learn to fix this!

Q: What if my accuracy is lower?
A: That's okay! Focus on understanding the concepts first. Performance will improve with practice.

Q: Do I need a GPU?
A: No! These projects run fine on CPU. They might take a bit longer, but they work.

🚀 Ready to Start?

Head to project_1_mnist/ and open mnist_cnn.py to begin your journey!

Remember: Every expert was once a beginner. Take it one project at a time! 💪

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages