Skip to content

This project focuses on designing and training a Convolutional Neural Network (CNN) to classify images from the CIFAR-10 dataset. The main emphasis is on exploring CNN architecture and the impact of batch size and number of epochs on model accuracy.

Notifications You must be signed in to change notification settings

Bit-Maximum/CNN-for-CIFAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Image Classification with CNN (CIFAR-10)

en ru

👤 Maxim Merkurev

🏫 Far Eastern Federal University, 2025


📌 About the project

This project focuses on designing and training a Convolutional Neural Network (CNN) to classify images from the CIFAR-10 dataset. The main emphasis is on exploring CNN architecture and the impact of batch size and number of epochs on model accuracy.

🔗 Colab Version:
Open In Colab

Local launch via JupyterLab is also supported.


🖼 CIFAR-10: Dataset Description

CIFAR-10 contains:

  • 60 000 color images 32×32
  • 10 classes:
    airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
  • Training set: 50 000 images
  • Test set: 10 000 images

CIFAR-10 is widely used in research and competitions as a benchmark for testing computer vision models.

![CIRAF demo](translation/media/CIRAF demo.png)

🧠 What is a CNN?

Convolutional Neural Networks (CNNs) are a type of architecture designed specifically for image processing:

  • 🎯 Detect local patterns (edges, shapes)
  • 🧱 Reduce parameter count compared to MLPs
  • 🔁 Reuse filters across the image
  • ⬇ Robust to translation and scaling

🧮 Model Architecture

Block Components
Input 32×32×3 (RGB image)
Conv 1 64 filters (5×5) → BatchNorm → ReLU → MaxPool (2×2)
Conv 2 128 filters (3×3) → BatchNorm → ReLU
Conv 3 256 filters (3×3) → BatchNorm → ReLU → MaxPool (2×2)
Flatten Transition to fully connected layers
FC 1 1024 neurons → ReLU → Dropout(0.5)
FC 2 1024 neurons → ReLU → Dropout(0.5)
FC 3 512 neurons → ReLU
Output 10 neurons → Softmax (for classification)

🚀 Installation (for local use)

  1. Clone the repository:
git clone https://github.com/Bit-Maximum/CNN-for-CIFAR.git
cd CNN-for-CIFAR
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the project:
jupyter lab run.ipynb

📈 Results

  • 📊 Test accuracy: 78.6%
  • 📉 Training graphs (available in Colab/report):
    • Smooth decrease in loss
    • Steady increase in accuracy
  • 📌 Conclusion: The model shows confident learning and can be further improved by increasing the number of epochs.

🔍 Some confusion observed between similar classes (e.g., cat vs dog).

Accuracy-VS-Epoch

Accuracy-VS-Batch-Size

Accuracy-Measurement

t-SNE-Zero-Epoch

t-SNE-10-Epoch

Example predictions from the trained model: Prediction-Demo

📚 Theoretical Background

Covered topics include:

  • 📦 CIFAR-10 as a benchmark image classification dataset
  • 🧠 CNN layers and pooling operations
  • 🧮 BatchNorm, Dropout, ReLU/Softmax activations
  • 🔁 Effect of training parameters like batch size and number of epochs

About

This project focuses on designing and training a Convolutional Neural Network (CNN) to classify images from the CIFAR-10 dataset. The main emphasis is on exploring CNN architecture and the impact of batch size and number of epochs on model accuracy.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published