Downloads · 30 days
23
0% of all-time downloads
Jacques7103/Food-Recognition
Food-Recognition is a image classification model from Jacques7103. Use it when you need a label for an image. It is set up for transformers. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
23
0% of all-time downloads
All-time downloads
6.3K
Public
Parameters
85.8M
4.5 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin343 MB · 50%
From the Hugging Face model README
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on an unknown dataset. It achieves the following results on the evaluation set:
The Vision Transformer (ViT) is a transformer encoder model (BERT-like) pretrained on a large collection of images in a supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels.
Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. One also adds a [CLS] token to the beginning of a sequence to use it for classification tasks. One also adds absolute position embeddings before feeding the sequence to the layers of the Transformer encoder.
Note that this model does not provide any fine-tuned heads, as these were zero'd by Google researchers. However, the model does include the pre-trained pooler, which can be used for downstream tasks (such as image classification).
By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder. One typically places a linear layer on top of the [CLS] token, as the last hidden state of this token can be seen as a representation of an entire image.
You can use the raw model for image classification. See the model hub to look for fine-tuned versions on a task that interests you.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.5974 | 0.21 | 100 | 0.6096 | 0.8292 |
| 0.5911 | 0.43 | 200 | 0.5204 | 0.8476 |
| 0.7085 | 0.64 | 300 | 0.4329 | 0.8708 |
| 0.5302 | 0.85 | 400 | 0.4843 | 0.8428 |
| 0.2436 | 1.07 | 500 | 0.3767 | 0.886 |
| 0.2355 | 1.28 | 600 | 0.3344 | 0.8956 |
| 0.1497 | 1.49 | 700 | 0.3447 | 0.8932 |
| 0.2213 | 1.71 | 800 | 0.3082 | 0.9072 |
| 0.2197 | 1.92 | 900 | 0.3169 | 0.902 |
| 0.0719 | 2.13 | 1000 | 0.2977 | 0.9136 |
| 0.0526 | 2.35 | 1100 | 0.3455 | 0.9084 |
| 0.0926 | 2.56 | 1200 | 0.3140 | 0.9208 |
| 0.0427 | 2.77 | 1300 | 0.3307 | 0.9128 |
| 0.0716 | 2.99 | 1400 | 0.3007 | 0.9204 |
| 0.0151 | 3.2 | 1500 | 0.2791 | 0.9292 |
| 0.032 | 3.41 | 1600 | 0.2737 | 0.9296 |
| 0.0611 | 3.62 | 1700 | 0.2620 | 0.9336 |
| 0.0175 | 3.84 | 1800 | 0.2610 | 0.9324 |