Downloads · 30 days
11
11% of all-time downloads
louijiec/envisage
envisage is a image classification model from louijiec. 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.
This is the official model card for envisage, a Vision Transformer (ViT) model fine-tuned for image classification.
Downloads · 30 days
11
11% of all-time downloads
All-time downloads
100
Public
Parameters
85.8M
2.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.4 GB · 57%
From the Hugging Face model README
This is the official model card for envisage, a Vision Transformer (ViT) model fine-tuned for image classification.
This model was fine-tuned from the google/vit-base-patch16-224-in21k base model on the cifar10 dataset, which consists of 60,000 32x32 color images in 10 distinct classes.
google/vit-base-patch16-224-in21kcifar10airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truckThe easiest way to use this model for inference is with the pipeline API from the transformers library.
First, ensure you have the necessary libraries installed:
pip install transformers torch pillow
Then, you can use the following Python snippet to classify an image:
from transformers import pipeline
from PIL import Image
import requests
# Load the classification pipeline with your model
pipe = pipeline("image-classification", model="louijiec/envisage")
# Load an image from a URL (e.g., a cat)
url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cat-tree.jpeg"
image = Image.open(requests.get(url, stream=True).raw)
# Get the predictions
predictions = pipe(image)
print("Predictions:")
for p in predictions:
print(f"- {p['label']}: {p['score']:.4f}")
# Expected output will show the model's confidence for each class,
# with 'cat' likely having the highest score.
The model was trained in a Google Colab environment using the transformers Trainer API.
The model was evaluated on the cifar10 test split, which contains 10,000 images.
trainer.evaluate() step here. For example: 0.965]This model is intended for educational purposes and as a demonstration of fine-tuning a Vision Transformer on a common benchmark dataset. It performs well on images similar to those in the cifar10 dataset (small, low-resolution images of the 10 specified classes).
Limitations:
cifar10 data (e.g., high-resolution photos, medical images, or classes not seen during training).cifar10 dataset.