Instructions to use tustoz/resnet50 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tustoz/resnet50 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="tustoz/resnet50") 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("tustoz/resnet50") model = AutoModelForImageClassification.from_pretrained("tustoz/resnet50", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| license: apache-2.0 | |
| base_model: microsoft/resnet-50 | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - imagefolder | |
| metrics: | |
| - accuracy | |
| model-index: | |
| - name: resnet50 | |
| results: | |
| - task: | |
| name: Image Classification | |
| type: image-classification | |
| dataset: | |
| name: imagefolder | |
| type: imagefolder | |
| config: default | |
| split: validation | |
| args: default | |
| metrics: | |
| - name: Accuracy | |
| type: accuracy | |
| value: 0.9926 | |
| <!-- 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. --> | |
| # resnet50 | |
| This model is a fine-tuned version of [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) on the imagefolder dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.0210 | |
| - Accuracy: 0.9926 | |
| - F1 Weighted: 0.9926 | |
| - F1 Macro: 0.9925 | |
| - Precision Weighted: 0.9926 | |
| ## 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: 0.0003 | |
| - train_batch_size: 128 | |
| - eval_batch_size: 256 | |
| - seed: 42 | |
| - gradient_accumulation_steps: 2 | |
| - total_train_batch_size: 256 | |
| - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments | |
| - lr_scheduler_type: linear | |
| - lr_scheduler_warmup_steps: 0.1 | |
| - num_epochs: 5 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Weighted | F1 Macro | Precision Weighted | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:------------------:| | |
| | 3.7125 | 1.0 | 193 | 0.1263 | 0.961 | 0.9604 | 0.9602 | 0.9628 | | |
| | 0.1261 | 2.0 | 386 | 0.0376 | 0.9882 | 0.9882 | 0.9881 | 0.9885 | | |
| | 0.0347 | 3.0 | 579 | 0.0232 | 0.9926 | 0.9926 | 0.9925 | 0.9927 | | |
| | 0.0165 | 4.0 | 772 | 0.0238 | 0.992 | 0.992 | 0.9919 | 0.9921 | | |
| | 0.0109 | 5.0 | 965 | 0.0210 | 0.9926 | 0.9926 | 0.9925 | 0.9926 | | |
| ### Framework versions | |
| - Transformers 5.0.0 | |
| - Pytorch 2.10.0+cu128 | |
| - Datasets 4.0.0 | |
| - Tokenizers 0.22.2 | |