hazelbestt's picture
Update README.md
29dc538 verified
metadata
license: mit
language:
  - en
base_model:
  - openai/clip-vit-base-patch32
pipeline_tag: image-classification
datasets:
  - hazelbestt/bowman_prospects_supervised_images

Bowman Chrome Prospects Classifier

A fine-tuned CLIP model for classifying Bowman Chrome prospect baseball cards into their parallel/rarity variants. The model was trained on this dataset

Model Description

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.

  • Accuracy: 90.84%
  • Base Model: CLIP
  • Fine-tuning Method: Contrastive Loss
  • Task: Image Classification (Baseball Card Parallel Identification)

Usage

from transformers import CLIPProcessor, CLIPModel

model = CLIPModel.from_pretrained("hazelbestt/bowman_prospects_classifier")
processor = CLIPProcessor.from_pretrained("hazelbestt/bowman_prospects_classifier", use_fast=True)

Example Inference

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]}")

Supported Labels

The model can classify cards into the following parallel categories:

Shimmer Parallels

  • Purple Shimmer, Blue Shimmer, Green Shimmer, Gold Shimmer, Orange Shimmer, Red Shimmer, Black Shimmer, Aqua Shimmer, Fuchsia Shimmer, Yellow Shimmer

Wave Parallels

  • Blue Wave, Green Wave, Gold Wave, Orange Wave, Red Wave, Black Wave, Fuchsia Wave, Aqua Wave, Purple Wave, Yellow Wave, Aqua Pink Vapor Wave

Lava Parallels

  • Aqua Lava, Blue Lava, Rose Gold Lava, Gold Lava, Red Lava, Orange Lava, Purple Lava, Fuchsia Lava

Atomic Parallels

  • Atomic, Orange Atomic, Red Atomic

Reptilian Parallels

  • Green Reptilian, Orange Reptilian, Red Reptilian, Blue Reptilian, Black Reptilian

Mojo Parallels (Mega Box Exclusive)

  • Gold Mojo, Orange Mojo, Red Mojo, Black Mojo, Aqua Mojo, Green Mojo, Purple Mojo, Fuchsia Mojo, Yellow Mojo

X-Fractor Parallels

  • X-Fractor, Aqua X-Fractor, Yellow X-Fractor, Orange X-Fractor, Red X-Fractor, Black X-Fractor

Mini-Diamond Parallels

  • Mini Diamond, Black Mini Diamond, Yellow Mini Diamond, Rose Gold Mini Diamond, Green Mini Diamond

RayWave Parallels

  • RayWave, Purple RayWave, Red RayWave

Sapphire Parallels (Special Release)

  • Sapphire, Sapphire Blue, Sapphire Orange, Sapphire Red, Sapphire Gold, Sapphire Green, Sapphire Yellow, Padparadscha

Geometric Parallels (2025 Release)

  • Fuchsia Geometric, Purple Geometric, Green Geometric, Orange Geometric, Gold Geometric, Blue Geometric, Black Geometric, Red Geometric

Other Rare/Special Parallels

  • Speckle, Rose Gold, Canary Diamond, Platinum, Pink, Black, Purple, Blue, Green, Aqua, Yellow, Gold, Orange, Red, Fuchsia, Superfractor

Base

  • Base

Intended Use

This model is intended for:

  • Collectors identifying card parallels from photos
  • Grading/sorting card collections
  • Marketplace listings verification
  • Educational purposes about Bowman Chrome parallel varieties

Limitations

  • Trained specifically on Bowman Chrome prospect cards; may not generalize well to other card brands or sets
  • Performance may vary on low-quality or poorly-lit images
  • Some visually similar parallels (e.g., certain color variations) may be harder to distinguish

Training Details

  • Architecture: CLIP (Vision-Language Model)
  • Training Objective: Contrastive Loss
  • Evaluation Accuracy: 90.84%