Downloads · 30 days
19
22% of all-time downloads
hazelbestt/bowman_prospects_classifier
bowman_prospects_classifier is a image classification model from hazelbestt. Use it when you need a label for an image. The card lists the license as mit.
A fine-tuned CLIP model for classifying Bowman Chrome prospect baseball cards into their parallel/rarity variants. The model was trained on this dataset
Downloads · 30 days
19
22% of all-time downloads
All-time downloads
86
Public
Parameters
150M
599 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors599 MB · 99%
From the Hugging Face model README
A fine-tuned CLIP model for classifying Bowman Chrome prospect baseball cards into their parallel/rarity variants. The model was trained on this dataset
This model is a CLIP (Contrastive Language-Image Pre-training) model fine-tuned via contrastive loss to identify the specific parallel type of Bowman Chrome prospect baseball cards from images alone. It can distinguish between base cards and various rare parallels including Shimmer, Wave, Lava, Atomic, Mojo, X-Fractor, Sapphire, and many more.
from transformers import CLIPProcessor, CLIPModel
model = CLIPModel.from_pretrained("hazelbestt/bowman_prospects_classifier")
processor = CLIPProcessor.from_pretrained("hazelbestt/bowman_prospects_classifier", use_fast=True)
from PIL import Image
import torch
image = Image.open("your_card_image.jpg")
model = CLIPModel.from_pretrained("hazelbestt/bowman_prospects_classifier")
processor = CLIPProcessor.from_pretrained("hazelbestt/bowman_prospects_classifier", use_fast=True)
proc = processor(
text=None,
images=image,
return_tensors="pt",
padding=True
)
with torch.no_grad():
img_feat = model.get_image_features(proc["pixel_values"].to(device))
img_feat = img_feat / img_feat.norm(dim=-1, keepdim=True)
labels = ["base", "purple shimmer", "gold mojo", "red atomic", "sapphire"] # subset example
text_proc = processor(text=labels, return_tensors="pt", padding=True, truncation=True)
text_input_ids = text_proc["input_ids"].to(device)
text_attention = text_proc["attention_mask"].to(device)
with torch.no_grad():
txt_feat = model.get_text_features(
input_ids=text_input_ids,
attention_mask=text_attention,
)
txt_feat = txt_feat / txt_feat.norm(dim=-1, keepdim=True)
sims = (img_feat @ txt_feat.T).squeeze(0)
best_idx = sims.argmax().item()
print(f"Predicted: {labels[best_idx]}")
The model can classify cards into the following parallel categories:
This model is intended for: