Image Classification
timm
Safetensors
PyTorch
Turkish
English
timm-image-classification
efficientnetv2
vehicle-classification
car-body-type
Eval Results (legacy)
Instructions to use ryan12345441/car-body-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use ryan12345441/car-body-classifier with timm:
import timm model = timm.create_model("hf_hub:ryan12345441/car-body-classifier", pretrained=True) - Notebooks
- Google Colab
- Kaggle
| """Upload this prepared model repository to Hugging Face Hub. | |
| Usage: | |
| HF_TOKEN=... python upload_to_hub.py --repo-id USER_OR_ORG/REPO_NAME | |
| The token is read from the environment by huggingface_hub. Do not hard-code it. | |
| """ | |
| from __future__ import annotations | |
| import argparse | |
| from pathlib import Path | |
| from huggingface_hub import HfApi | |
| def parse_args() -> argparse.Namespace: | |
| parser = argparse.ArgumentParser(description="Upload model repository to Hugging Face Hub.") | |
| parser.add_argument("--repo-id", required=True, help="Target model repo, e.g. username/yazlab6-car-body-classifier") | |
| parser.add_argument("--repo-dir", default=".", help="Local prepared repo directory") | |
| parser.add_argument("--private", action="store_true", help="Create or keep the Hub repo private") | |
| return parser.parse_args() | |
| def main() -> None: | |
| args = parse_args() | |
| repo_dir = Path(args.repo_dir).resolve() | |
| api = HfApi() | |
| api.create_repo(repo_id=args.repo_id, repo_type="model", private=args.private, exist_ok=True) | |
| api.upload_folder( | |
| repo_id=args.repo_id, | |
| repo_type="model", | |
| folder_path=repo_dir, | |
| ignore_patterns=[ | |
| "__pycache__/**", | |
| "*.pyc", | |
| ".git/**", | |
| ".env*", | |
| "*.log", | |
| ], | |
| ) | |
| if __name__ == "__main__": | |
| main() | |