Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akaqox/binary_classification_pytorch
While using pytorch library and cat dog dataset, I tried to preserve clean code. Some extra properties added.
https://github.com/akaqox/binary_classification_pytorch
binary-c checkpoints classification clean-code early-stopping plot python pytorch pytorch-implementation readability
Last synced: 2 months ago
JSON representation
While using pytorch library and cat dog dataset, I tried to preserve clean code. Some extra properties added.
- Host: GitHub
- URL: https://github.com/akaqox/binary_classification_pytorch
- Owner: Akaqox
- Created: 2024-08-23T13:56:57.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-24T17:02:54.000Z (4 months ago)
- Last Synced: 2024-09-27T20:03:52.191Z (3 months ago)
- Topics: binary-c, checkpoints, classification, clean-code, early-stopping, plot, python, pytorch, pytorch-implementation, readability
- Language: Python
- Homepage:
- Size: 231 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cat and Dog Classification with Pytorch
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
![Python](https://badgen.net/badge/Python/[3.11]/blue?)
![Pytorch](https://badgen.net/badge/Pytorch/[2.4.0]/red?)---
## 💾 **ABOUT**
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
## Project Structure
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`.## 🔎 **SHOWCASE**
Metric Performance Scores
Loss and Accuracy Curves
---## 💻 **TECHNOLOGIES**
![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
![OpenCV](https://img.shields.io/badge/opencv-%23white.svg?style=for-the-badge&logo=opencv&logoColor=white)
![Keras](https://img.shields.io/badge/Keras-%23D00000.svg?style=for-the-badge&logo=Keras&logoColor=white)
![NumPy](https://img.shields.io/badge/numpy-%23013243.svg?style=for-the-badge&logo=numpy&logoColor=white)
![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=for-the-badge&logo=PyTorch&logoColor=white)
![scikit-learn](https://img.shields.io/badge/scikit--learn-%23F7931E.svg?style=for-the-badge&logo=scikit-learn&logoColor=white)
---