{"id":22261114,"url":"https://github.com/semihdervis/vit-image-classification-with-any-images","last_synced_at":"2025-03-25T13:40:19.027Z","repository":{"id":254760532,"uuid":"847461711","full_name":"semihdervis/ViT-Image-Classification-with-Any-Images","owner":"semihdervis","description":"Training (fine-tuning) and evaluating Vision Transformer (ViT) models on any image dataset","archived":false,"fork":false,"pushed_at":"2024-08-30T15:00:40.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T12:27:09.716Z","etag":null,"topics":["computer-vision","image-classification","vision-transformer","vision-transformer-image-classification","vit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semihdervis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-25T22:07:39.000Z","updated_at":"2024-09-04T09:15:04.000Z","dependencies_parsed_at":"2024-08-25T23:47:47.331Z","dependency_job_id":"18df9d7d-b9f6-4560-bfa3-7ea339f712a8","html_url":"https://github.com/semihdervis/ViT-Image-Classification-with-Any-Images","commit_stats":null,"previous_names":["semihdervis/vit-image-classification-with-any-images"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semihdervis%2FViT-Image-Classification-with-Any-Images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semihdervis%2FViT-Image-Classification-with-Any-Images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semihdervis%2FViT-Image-Classification-with-Any-Images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semihdervis%2FViT-Image-Classification-with-Any-Images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semihdervis","download_url":"https://codeload.github.com/semihdervis/ViT-Image-Classification-with-Any-Images/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245472314,"owners_count":20621086,"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":["computer-vision","image-classification","vision-transformer","vision-transformer-image-classification","vit"],"created_at":"2024-12-03T09:11:31.096Z","updated_at":"2025-03-25T13:40:19.006Z","avatar_url":"https://github.com/semihdervis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ViT-Image-Classification-with-Any-Images\n\n## Overview\nThis repository provides a pipeline for fine-tuning a Vision Transformer (ViT) model on custom image datasets using Hugging Face's Transformers library. The code is designed to offer flexibility in dataset management, model fine-tuning, and inference, making it easy to adapt the ViT model to various image classification tasks\n\n## Setup\n\n### Clone the Repository\n```bash\ngit clone https://github.com/semihdervis/ViT-Image-Classification-with-Any-Images.git\ncd ViT-Image-Classification-with-Any-Images\n```\n\n### Install Requirements\nEnsure you have Python 3.8+ installed. Install the necessary packages using `pip`:\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### Training the Model\n\n1. **Set Dataset and Output Directory:**\n   - Replace `DATASET_PATH` in [`train.py`](train.py) with the path to your image dataset.\n   - Set `OUTPUT_DIR` to your desired model output directory.\n\n2. **Run Training:**\n   ```bash\n   python train.py\n   ```\n\n### Testing the Model with a Single Image\n\n1. **Set Model and Image Paths:**\n   - In [`test_model_with_single_image.py`](test_model_with_single_image.py), replace `MODEL_PATH` with the path to your trained model.\n   - Replace `IMAGE_PATH` with the path to the image you want to classify.\n\n2. **Run the Inference Script:**\n   ```bash\n   python test_model_with_single_image.py\n   ```\n\n### Testing the Model with Video Capture\n\n1. **Set Model Path:**\n   - In [`test_model_with_video_capture.py`](test_model_with_video_capture.py), replace `MODEL_PATH` with the path to your trained model.\n\n2. **Run the Video Capture Script:**\n   ```bash\n   python test_model_with_video_capture.py\n   ```\n\n## License\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemihdervis%2Fvit-image-classification-with-any-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemihdervis%2Fvit-image-classification-with-any-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemihdervis%2Fvit-image-classification-with-any-images/lists"}