Skip to content

Pranav-by/Pytorch_Computer_Vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

PyTorch Computer Vision using CNN

This project demonstrates how to build, train, and evaluate Convolutional Neural Networks (CNNs) using PyTorch for computer vision tasks. The notebook is designed to be beginner-friendly yet interview‑ready, explaining each major step involved in a deep learning vision pipeline.


πŸš€ Project Overview

Computer Vision is one of the most impactful applications of Deep Learning. In this project, we:

  • Understand the fundamentals of Convolutional Neural Networks (CNNs)
  • Build a CNN model from scratch using PyTorch
  • Train the model on image data
  • Evaluate performance and analyze results

This repository serves as a learning + reference project for students preparing for:

  • Deep Learning exams
  • Viva / Interviews
  • Hands‑on PyTorch practice

πŸ“‚ Project Structure

Pytorch_Computer_Vision/
β”‚
β”œβ”€β”€ pytorch_computer_vision_cnn.ipynb   # Main Jupyter Notebook
β”œβ”€β”€ README.md                           # Project documentation

🧠 Concepts Covered

  • Basics of Computer Vision
  • What is a Convolutional Neural Network (CNN)
  • Why CNNs are better than Fully Connected Networks for images
  • Convolution operation
  • Filters / Kernels
  • Feature Maps
  • Stride and Padding
  • Pooling layers (Max Pooling)
  • Activation functions (ReLU)
  • Fully Connected layers
  • Loss functions
  • Backpropagation
  • Optimizers (SGD / Adam)
  • Training and Validation workflow

πŸ› οΈ Technologies Used

  • Python
  • PyTorch
  • Torchvision
  • Jupyter Notebook
  • NumPy
  • Matplotlib

🧩 Model Architecture (High Level)

The CNN model generally follows this flow:

  1. Input Image
  2. Convolution Layer(s)
  3. ReLU Activation
  4. Max Pooling
  5. Flatten Layer
  6. Fully Connected Layer(s)
  7. Output Layer

This architecture helps the model learn:

  • Edges β†’ Shapes β†’ Objects (hierarchical feature learning)

πŸ” Training Pipeline

  1. Load dataset
  2. Apply necessary transformations
  3. Define CNN model
  4. Choose loss function
  5. Choose optimizer
  6. Train model over epochs
  7. Evaluate accuracy and loss

πŸ“Š Results & Observations

  • Model successfully learns visual patterns from data
  • Training loss decreases with epochs
  • Accuracy improves as the network learns meaningful features

(Detailed outputs and graphs are available inside the notebook.)


▢️ How to Run the Project

  1. Clone the repository
git clone https://github.com/Pranav-by/Pytorch_Computer_Vision.git
cd Pytorch_Computer_Vision
  1. Install dependencies
pip install torch torchvision matplotlib numpy
  1. Open the notebook
jupyter notebook pytorch_computer_vision_cnn.ipynb
  1. Run cells step by step

πŸ“Œ Key Takeaways

  • CNNs automatically extract spatial features
  • PyTorch makes model building flexible and intuitive
  • Understanding the pipeline is more important than memorizing code

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors