Company: Codtech IT Solutions Private Limited
Name: Abhishek Sharma
Intern ID: CTIS9913
Domain: Data Science
Duration: 6 Weeks
This project was developed as part of the Data Science Internship program at Codtech IT Solutions Private Limited. The objective of this task was to implement a Deep Learning model for Image Classification using PyTorch and generate visual representations of the model's performance.
The project focuses on classifying handwritten digit images using a Convolutional Neural Network (CNN). The model is trained on the widely used MNIST dataset and learns to identify digits ranging from 0 to 9. The complete workflow includes data preprocessing, model development, training, evaluation, result visualization, and GitHub deployment.
This project provided practical exposure to Deep Learning concepts and helped in understanding how modern image classification systems are built and evaluated.
The primary objective of this project was to:
- Understand the fundamentals of Deep Learning
- Learn image classification using Convolutional Neural Networks (CNNs)
- Implement a complete Deep Learning pipeline using PyTorch
- Train and evaluate a CNN model on image data
- Generate visualizations to analyze model performance
- Organize the project using modular and maintainable code
- Deploy the completed project on GitHub
The project was implemented using the following technologies:
- Python
- PyTorch
- TorchVision
- NumPy
- Matplotlib
- Seaborn
- Scikit-learn
These libraries were used for model development, dataset handling, visualization, evaluation, and numerical computations.
The project uses the MNIST handwritten digit dataset available through TorchVision.
- 60,000 training images
- 10,000 testing images
- Grayscale images
- Image size: 28 × 28 pixels
- 10 output classes (digits 0–9)
The dataset is automatically downloaded when the project is executed.
A Convolutional Neural Network (CNN) was designed and implemented using PyTorch.
The architecture includes:
- Convolution Layer (32 Filters)
- ReLU Activation Function
- Max Pooling Layer
- Convolution Layer (64 Filters)
- ReLU Activation Function
- Max Pooling Layer
- Flatten Layer
- Fully Connected Layer (128 Neurons)
- Dropout Layer
- Output Layer (10 Classes)
The CNN automatically learns important image features and uses them to classify handwritten digits accurately.
- Dataset loading
- Tensor conversion
- Data normalization
- Train-validation split
- DataLoader implementation
- CNN architecture creation
- Layer configuration
- Feature extraction setup
- Classification layer implementation
- Forward propagation
- Loss calculation
- Backpropagation
- Weight optimization using Adam Optimizer
- Validation monitoring
- Accuracy calculation
- Classification report generation
- Confusion matrix analysis
- Prediction verification
- Accuracy and Loss Curves
- Confusion Matrix Heatmap
- Sample Prediction Visualization
The trained CNN model achieved high classification accuracy on the MNIST dataset.
Generated outputs include:
- Training and validation performance graphs
- Confusion matrix visualization
- Sample image predictions
- Training history records
- Saved trained model files
The model successfully learned handwritten digit patterns and produced reliable predictions on unseen test data.
Task2/
│
├── data_loader.py
├── model.py
├── train.py
├── evaluate.py
├── visualize.py
├── README.md
├── requirements.txt
│
├── models/
│ ├── best_model.pth
│ └── final_model.pth
│
├── outputs/
│ ├── accuracy_loss_graph.png
│ ├── confusion_matrix.png
│ ├── sample_predictions.png
│ └── training_history.json
Through this project, I gained practical knowledge of:
- Deep Learning fundamentals
- Image Classification
- Convolutional Neural Networks (CNNs)
- PyTorch framework
- Dataset preprocessing
- Model training and evaluation
- Performance visualization
- GitHub project deployment
This project significantly improved my understanding of Deep Learning workflows and provided hands-on experience in building and evaluating neural network models.
Install dependencies:
pip install -r requirements.txtTrain the model:
python train.pyEvaluate the model:
python evaluate.pyGenerate visualizations:
python visualize.pyThis project successfully fulfilled the internship task requirement of implementing a Deep Learning model for Image Classification using PyTorch. A Convolutional Neural Network was developed, trained, evaluated, and visualized using the MNIST dataset. The project demonstrates the complete Deep Learning pipeline from data preparation to model deployment and serves as a strong foundation for future work in Artificial Intelligence and Machine Learning.