{"id":14958097,"url":"https://github.com/akaqox/binary_classification_pytorch","last_synced_at":"2026-02-10T10:31:33.188Z","repository":{"id":254605244,"uuid":"846576943","full_name":"Akaqox/binary_classification_pytorch","owner":"Akaqox","description":"While using pytorch library and cat dog dataset, I tried to preserve clean code. Some extra properties added. ","archived":false,"fork":false,"pushed_at":"2024-08-24T17:02:54.000Z","size":237,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T09:37:33.918Z","etag":null,"topics":["binary-c","checkpoints","classification","clean-code","early-stopping","plot","python","pytorch","pytorch-implementation","readability"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Akaqox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-23T13:56:57.000Z","updated_at":"2024-08-25T08:42:28.000Z","dependencies_parsed_at":"2024-08-24T18:32:02.698Z","dependency_job_id":null,"html_url":"https://github.com/Akaqox/binary_classification_pytorch","commit_stats":null,"previous_names":["akaqox/binary_classification_pytorch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Akaqox/binary_classification_pytorch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akaqox%2Fbinary_classification_pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akaqox%2Fbinary_classification_pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akaqox%2Fbinary_classification_pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akaqox%2Fbinary_classification_pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akaqox","download_url":"https://codeload.github.com/Akaqox/binary_classification_pytorch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akaqox%2Fbinary_classification_pytorch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268360817,"owners_count":24238308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-c","checkpoints","classification","clean-code","early-stopping","plot","python","pytorch","pytorch-implementation","readability"],"created_at":"2024-09-24T13:16:13.683Z","updated_at":"2026-02-10T10:31:28.970Z","avatar_url":"https://github.com/Akaqox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n    \u003ch1\u003e\u003cb\u003e Cat and Dog Classification with Pytorch \u003c/b\u003e\u003c/h1\u003e\n    \u003cp\u003e 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 \u003c/p\u003e\n\n![Python](https://badgen.net/badge/Python/[3.11]/blue?) \n![Pytorch](https://badgen.net/badge/Pytorch/[2.4.0]/red?) \n\u003c/div\u003e\n\n---\n\n## 💾 **ABOUT**\n\n\u003cp\u003eWhile 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 \u003c/p\u003e\n\u003cp\u003eWhile 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, \u003c/p\u003e\n\n\nMy dataset is:\nhttps://www.kaggle.com/datasets/samuelcortinhas/cats-and-dogs-image-classification\n\n\u003cbr /\u003e\n\n## Project Structure\n\nThe project is organized with careful attention to layout and readability. The following key components have been implemented:\n\n- **Classes and Functions with Type Hinting:** The codebase extensively uses type hinting for better code clarity and maintenance.\n- **Metric Tracking:** Implementations for tracking key metrics such as loss and accuracy during model training and evaluation.\n- **Plotting:** Functions to visualize training progress, including loss and accuracy plots.\n- **Training and Evaluation:** Separate classes for handling the training loop and model evaluation, promoting modularity and reuse.\n- **Dataset Handling:** Custom dataset classes to manage data loading and preprocessing efficiently.\n- **Early Stopping:** Implementation of early stopping to prevent overfitting by halting training when performance stops improving.\n- **Model Checkpointing:** Automatically saving the best model during training based on evaluation metrics.\n- **Model Classes:** Various model architectures implemented using PyTorch's `nn.Module`.\n\n## 🔎 **SHOWCASE**\n \u003ch2\u003e\u003cb\u003e Metric Performance Scores \u003c/b\u003e\u003c/h1\u003e\n\u003cimg src=\"https://github.com/akaqox/binary_classification_pytorch/blob/master/presentation/performance_score.png\" /\u003e\n\u003cbr /\u003e\n \u003ch2\u003e\u003cb\u003e Loss and Accuracy Curves\u003c/b\u003e\u003c/h1\u003e\n\u003cimg  src=\"https://github.com/akaqox/binary_classification_pytorch/blob/master/presentation/loss_curve.png\" /\u003e\n\u003cimg  src=\"https://github.com/akaqox/binary_classification_pytorch/blob/master/presentation/accuracy_curve.png\" /\u003e\n\u003cbr /\u003e\n---\n\n## 💻 **TECHNOLOGIES**\n\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n\n![OpenCV](https://img.shields.io/badge/opencv-%23white.svg?style=for-the-badge\u0026logo=opencv\u0026logoColor=white)\n\n![Keras](https://img.shields.io/badge/Keras-%23D00000.svg?style=for-the-badge\u0026logo=Keras\u0026logoColor=white)\n\n![NumPy](https://img.shields.io/badge/numpy-%23013243.svg?style=for-the-badge\u0026logo=numpy\u0026logoColor=white)\n\n![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=for-the-badge\u0026logo=PyTorch\u0026logoColor=white)\n\n![scikit-learn](https://img.shields.io/badge/scikit--learn-%23F7931E.svg?style=for-the-badge\u0026logo=scikit-learn\u0026logoColor=white)\n\n\n\u003cbr /\u003e\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaqox%2Fbinary_classification_pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakaqox%2Fbinary_classification_pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaqox%2Fbinary_classification_pytorch/lists"}