{"id":17989480,"url":"https://github.com/evilfreelancer/clothing-classifier","last_synced_at":"2025-10-25T02:39:51.908Z","repository":{"id":251631640,"uuid":"837972760","full_name":"EvilFreelancer/clothing-classifier","owner":"EvilFreelancer","description":"Pure TorchVision-based implementation of clothing classification.","archived":false,"fork":false,"pushed_at":"2024-08-04T15:46:18.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T03:41:20.143Z","etag":null,"topics":["api","classification","fashion","mnist","torch","torchvision"],"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/EvilFreelancer.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-04T15:28:47.000Z","updated_at":"2024-08-04T16:01:51.000Z","dependencies_parsed_at":"2024-08-04T17:39:13.484Z","dependency_job_id":null,"html_url":"https://github.com/EvilFreelancer/clothing-classifier","commit_stats":null,"previous_names":["evilfreelancer/clothing-classifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EvilFreelancer/clothing-classifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilFreelancer%2Fclothing-classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilFreelancer%2Fclothing-classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilFreelancer%2Fclothing-classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilFreelancer%2Fclothing-classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvilFreelancer","download_url":"https://codeload.github.com/EvilFreelancer/clothing-classifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilFreelancer%2Fclothing-classifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265746426,"owners_count":23821651,"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","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":["api","classification","fashion","mnist","torch","torchvision"],"created_at":"2024-10-29T19:14:47.299Z","updated_at":"2025-10-25T02:39:46.871Z","avatar_url":"https://github.com/EvilFreelancer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Clothing Classifier \n\nPure TorchVision-based implementation of clothing classification.\n\n## Features\n\n* 64px per 64px input images supported\n* Train a model on Fashion MNIST dataset\n* Multithreading support (may handle multiple requests at the same time)\n* 10 basic classes (limited due to Fashion MNIST)\n\n## Requirements\n\nBefore you begin, ensure you have a machine with an GPU that supports modern CUDA, due to the computational\ndemands of the docker image.\n\n* Nvidia GPU\n* CUDA\n* Docker\n* Docker Compose\n* Nvidia Docker Runtime\n\nFor detailed instructions on how to prepare a Linux machine for running neural networks, including the installation of\nCUDA, Docker, and Nvidia Docker Runtime, please refer to the\npublication \"[How to Prepare Linux for Running and Training Neural Networks? (+ Docker)](https://dzen.ru/a/ZVt9kRBCTCGlQqyP)\"\non Russian.\n\n## Installation\n\n1. Clone the repo and switch to sources root:\n\n   ```shell\n   git clone https://github.com/EvilFreelancer/cloth-classifier.git\n   cd cloth-classifier\n   ```\n\n2. Copy the provided Docker Compose template:\n\n    ```shell\n    cp docker-compose.dist.yml docker-compose.yml\n    ```\n\n3. Build the Docker image:\n\n    ```shell\n    docker-compose build\n    ```\n\n4. Start the services:\n\n    ```shell\n    docker-compose up -d\n    ```\n\n## How to use\n\n```shell\ncurl \\\n  \"http://localhost:8080/predict\" \\\n  -X POST \\\n  -H \"Content-Type: multipart/form-data\" \\\n  -F \"file=@tshirt.jpg\"\n```\n\n```json\n{\n  \"class\": 0,\n  \"class_label\": \"T-shirt\",\n  \"probability\": 2.12345\n}\n```\n\n## Available classes\n\n```python\nCLASSES = [\n    'T-shirt', 'Trouser', 'Pullover', 'Dress', 'Coat',\n    'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle Boot'\n]\n```\n\n## Train model\n\nLogin to container:\n\n```shell\ndocker-compose exec app bash\n```\n\nRun training script:\n\n```shell\npython3 /app/train_model.py\n```\n\nIt will train a model and put it to `./models/cloth_model_simple.pth`.\n\n## Links\n\n* https://github.com/sssingh/fashion-mnist-classification/blob/master/fashion_mnist_classification_nn_pytorch.ipynb\n* https://github.com/roboflow/notebooks/blob/main/notebooks/train-vision-transformer-classification-on-custom-data.ipynb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilfreelancer%2Fclothing-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilfreelancer%2Fclothing-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilfreelancer%2Fclothing-classifier/lists"}