Run this model with HF Jobs
Run hilmansw/resnet18-food-classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/hilmansw/resnet18-food-classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/hilmansw/resnet18-food-classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use hilmansw/resnet18-food-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hilmansw/resnet18-food-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="hilmansw/resnet18-food-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("hilmansw/resnet18-food-classifier") model = AutoModelForImageClassification.from_pretrained("hilmansw/resnet18-food-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model description
This model is a fine-tuned version of microsoft/resnet-18 on an custom dataset. This model was built using the "Padang Cuisine (Indonesian Food Image Classification)" dataset obtained from Kaggle. During the model building process, this was done using the Pytorch framework with pre-trained Resnet-18. The method used during the process of building this classification model is fine-tuning with the dataset.
Training results
| Epoch | Accuracy |
|---|---|
| 1.0 | 0.6030 |
| 2.0 | 0.8342 |
| 3.0 | 0.8442 |
| 4.0 | 0.8191 |
| 5.0 | 0.8693 |
| 6.0 | 0.8643 |
| 7.0 | 0.8744 |
| 8.0 | 0.8643 |
| 9.0 | 0.8744 |
| 10.0 | 0.8744 |
| 11.0 | 0.8794 |
| 12.0 | 0.8744 |
| 13.0 | 0.8894 |
| 14.0 | 0.8794 |
| 15.0 | 0.8945 |
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- loss_function = CrossEntropyLoss
- optimizer = AdamW
- learning_rate: 0.00001
- batch_size: 16
- num_epochs: 15
Framework versions
- Transformers 4.34.0
- Pytorch 2.0.1+cu118
- Datasets 2.14.5
- Tokenizers 0.14.1
- Downloads last month
- 18
Model tree for hilmansw/resnet18-food-classifier
Base model
microsoft/resnet-18