Instructions to use tinutmap/categorAI_img with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tinutmap/categorAI_img with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="tinutmap/categorAI_img") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("tinutmap/categorAI_img") model = AutoModelForImageClassification.from_pretrained("tinutmap/categorAI_img", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: google/vit-base-patch16-224-in21k | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - imagefolder | |
| metrics: | |
| - accuracy | |
| model-index: | |
| - name: categorAI_img | |
| results: | |
| - task: | |
| name: Image Classification | |
| type: image-classification | |
| dataset: | |
| name: imagefolder | |
| type: imagefolder | |
| config: default | |
| split: train | |
| args: default | |
| metrics: | |
| - name: Accuracy | |
| type: accuracy | |
| value: 0.8378378378378378 | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # categorAI_img | |
| This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.7080 | |
| - Accuracy: 0.8378 | |
| ## Model description | |
| More information needed | |
| ## Intended uses & limitations | |
| More information needed | |
| ## Training and evaluation data | |
| More information needed | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 5e-05 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - gradient_accumulation_steps: 4 | |
| - total_train_batch_size: 64 | |
| - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments | |
| - lr_scheduler_type: linear | |
| - lr_scheduler_warmup_ratio: 0.1 | |
| - num_epochs: 25 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | | |
| |:-------------:|:-------:|:----:|:---------------:|:--------:| | |
| | No log | 0.9091 | 5 | 1.8872 | 0.3784 | | |
| | 7.7979 | 1.9091 | 10 | 1.7777 | 0.6419 | | |
| | 7.7979 | 2.9091 | 15 | 1.6224 | 0.6622 | | |
| | 6.9519 | 3.9091 | 20 | 1.4667 | 0.6959 | | |
| | 6.9519 | 4.9091 | 25 | 1.3353 | 0.7365 | | |
| | 5.7562 | 5.9091 | 30 | 1.2522 | 0.7703 | | |
| | 5.7562 | 6.9091 | 35 | 1.1617 | 0.7838 | | |
| | 4.7446 | 7.9091 | 40 | 1.0967 | 0.7635 | | |
| | 4.7446 | 8.9091 | 45 | 1.0362 | 0.7568 | | |
| | 4.0655 | 9.9091 | 50 | 0.9349 | 0.8108 | | |
| | 4.0655 | 10.9091 | 55 | 0.9393 | 0.7905 | | |
| | 3.5041 | 11.9091 | 60 | 0.8859 | 0.7838 | | |
| | 3.5041 | 12.9091 | 65 | 0.9039 | 0.7770 | | |
| | 3.0788 | 13.9091 | 70 | 0.8123 | 0.8041 | | |
| | 3.0788 | 14.9091 | 75 | 0.7946 | 0.8243 | | |
| | 2.7461 | 15.9091 | 80 | 0.8003 | 0.8311 | | |
| | 2.7461 | 16.9091 | 85 | 0.8101 | 0.7703 | | |
| | 2.4988 | 17.9091 | 90 | 0.7111 | 0.8176 | | |
| | 2.4988 | 18.9091 | 95 | 0.7439 | 0.8243 | | |
| | 2.3122 | 19.9091 | 100 | 0.7542 | 0.7905 | | |
| | 2.3122 | 20.9091 | 105 | 0.7323 | 0.8311 | | |
| | 2.3408 | 21.9091 | 110 | 0.7175 | 0.8243 | | |
| | 2.3408 | 22.9091 | 115 | 0.7652 | 0.8041 | | |
| | 2.2846 | 23.9091 | 120 | 0.7211 | 0.8176 | | |
| | 2.2846 | 24.9091 | 125 | 0.7080 | 0.8378 | | |
| ### Framework versions | |
| - Transformers 4.47.1 | |
| - Pytorch 2.5.1.post306 | |
| - Datasets 3.2.0 | |
| - Tokenizers 0.21.0 | |