While using pytorch library and cat dog dataset, I tried to preserve clean code. Some extra properties added. Supervised by Fatih Haslak during internship period on Visea Innovative
While starting this project my objective was learning Pytorch library. On the .py files, I give attention to project layout, as addition on class and functions type hinting method used
While implementing classes and functions, I tried to morely classes for clean code and readibility. Some implementated properties are metrics, plot loss and acc, train class, evalutation class, dataset class, early stopping, saving best model,
My dataset is: https://www.kaggle.com/datasets/samuelcortinhas/cats-and-dogs-image-classification
The project is organized with careful attention to layout and readability. The following key components have been implemented:
- Classes and Functions with Type Hinting: The codebase extensively uses type hinting for better code clarity and maintenance.
- Metric Tracking: Implementations for tracking key metrics such as loss and accuracy during model training and evaluation.
- Plotting: Functions to visualize training progress, including loss and accuracy plots.
- Training and Evaluation: Separate classes for handling the training loop and model evaluation, promoting modularity and reuse.
- Dataset Handling: Custom dataset classes to manage data loading and preprocessing efficiently.
- Early Stopping: Implementation of early stopping to prevent overfitting by halting training when performance stops improving.
- Model Checkpointing: Automatically saving the best model during training based on evaluation metrics.
- Model Classes: Various model architectures implemented using PyTorch's
nn.Module
.
---