Downloads · 30 days
0
beardless47/swu-card-scanner
swu-card-scanner is a machine learning model from beardless47. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
AI-powered card recognition for Star Wars Unlimited TCG.
Downloads · 30 days
0
Access
Public
Updated Dec 4, 2025
Repo size
1.8 MB
Likes
0
Public
Click a slice to open those files.
.pkl1.8 MB · 87%
From the Hugging Face model README
AI-powered card recognition for Star Wars Unlimited TCG.
Uses openai/clip-vit-large-patch14 for image embeddings with a pre-computed database of 262 card embeddings.
import requests
import base64
# Read image
with open("card.jpg", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
# Call endpoint
response = requests.post(
"https://api-inference.huggingface.co/models/YOUR_USERNAME/swu-card-scanner",
headers={"Authorization": "Bearer YOUR_HF_TOKEN"},
json={
"inputs": image_b64,
"parameters": {"top_k": 5}
}
)
print(response.json())
curl -X POST \
https://api-inference.huggingface.co/models/YOUR_USERNAME/swu-card-scanner \
-H "Authorization: Bearer YOUR_HF_TOKEN" \
-H "Content-Type: application/json" \
-d '{"inputs": "BASE64_IMAGE_DATA"}'
{
"success": true,
"quality": "excellent",
"message": "Match confidence: 98.5%",
"best_match": {
"card_id": "card_11",
"confidence": 0.985,
"name": "Allegiant General Pryde",
"image_url": "https://cdn.swu-db.com/images/cards/JTL/133.png",
"data": { ... }
},
"alternatives": [ ... ]
}
handler.py - Custom inference handlerembeddings_clip-large.pkl - Pre-computed card embeddingscard_data.json - Card metadata