Model Card
PG-COCO-ViT-b16
A classification model (vit_b_16), trained on 55 classes, scoring 72.4% Accuracy.
Pictograph Research · Classification · vit_b_16 · FP32 · a custom license · Public
Overview
This is a classification model built on vit_b_16, trained on the COCO-CLS-5k dataset. It expects 224x224 input and runs in FP32 precision. It predicts skateboarding, skiing, bathroom, bird, frisbee, giraffe, and 49 more.
Performance
Headline: 72.4% Accuracy.
| Metric | Value |
|---|---|
| Accuracy | 72.4% |
| F1 | 62.2% |
| Precision | 66.2% |
| Recall | 61.4% |
Per-class Accuracy
| Class | Accuracy |
|---|---|
| airplane | 94.4% |
| baseball | 85.2% |
| bathroom | 80.0% |
| beach | 0.0% |
| bear | 66.7% |
| bedroom | 40.0% |
| bench | 42.9% |
| bird | 88.9% |
| boat | 78.6% |
| bus | 74.1% |
| cake | 0.0% |
| cat | 90.9% |
| child | 0.0% |
| clock | 91.7% |
| dessert | 0.0% |
| dining | 59.1% |
| dog | 81.2% |
| donut | 50.0% |
| electronics | 66.7% |
| elephant | 100.0% |
| fire hydrant | 70.0% |
| formal wear | 61.5% |
| frisbee | 69.2% |
| fruit | 78.6% |
| giraffe | 90.0% |
| horse | 73.7% |
| hot dog | 50.0% |
| kitchen | 63.3% |
| kite | 62.5% |
| kitesurfing | 0.0% |
Classes
Class index matches the model's output order.
| # | Class |
|---|---|
| 0 | skateboarding |
| 1 | skiing |
| 2 | bathroom |
| 3 | bird |
| 4 | frisbee |
| 5 | giraffe |
| 6 | soccer |
| 7 | teddy bear |
| 8 | elephant |
| 9 | vintage photo |
| 10 | bear |
| 11 | zebra |
| 12 | tennis |
| 13 | train |
| 14 | baseball |
| 15 | cat |
| 16 | dog |
| 17 | airplane |
| 18 | kitchen |
| 19 | kitesurfing |
| 20 | kite |
| 21 | boat |
| 22 | beach |
| 23 | surfing |
| 24 | horse |
| 25 | vase |
| 26 | livestock |
| 27 | bedroom |
| 28 | fruit |
| 29 | living room |
| 30 | market |
| 31 | motorcycle |
| 32 | portrait |
| 33 | clock |
| 34 | street |
| 35 | fire hydrant |
| 36 | bus |
| 37 | luggage |
| 38 | bench |
| 39 | pizza |
| 40 | office |
| 41 | electronics |
| 42 | child |
| 43 | video games |
| 44 | dining |
| 45 | formal wear |
| 46 | donut |
| 47 | dessert |
| 48 | meal |
| 49 | vegetables |
| 50 | cake |
| 51 | hot dog |
| 52 | street sign |
| 53 | stop sign |
| 54 | other |
Training
| Setting | Value |
|---|---|
| Base dataset | COCO-CLS-5k |
| Export | COCO-CLS-5k-base |
| Dataset size | 5,000 images |
| Input size | 224x224 |
| Epochs | 40 |
| Batch size | 32 |
| Precision | FP32 |
| Version | 1.0.0 |
Use this model
Run inference with the Pictograph SDK:
from pictograph import Client, get_model, ClassificationModel, ClassificationResult
client = Client(api_key="pk_live_...") # Settings -> API Keys
# Downloads + caches the weights on first use
model: ClassificationModel = get_model(
name="PG-COCO-ViT-b16",
task="classification",
format="onnx",
precision="fp32",
device="cpu",
client=client,
)
result: ClassificationResult = model.predict(image="photo.jpg")
print(result)
# Fully offline (no API key) once you have the weights + config.json
from pictograph import load_model, ClassificationModel, ClassificationResult
model: ClassificationModel = load_model(
"/path/to/weights.onnx",
"/path/to/config.json",
task="classification",
format="onnx",
)
result: ClassificationResult = model.predict(image="photo.jpg")
- Full inference guide: local inference docs.
- REST + CLI: models API reference.
- Deploy it as an always-on endpoint: deployments.
License
Released under a custom license.
Download the model files
Exports to ONNX. Sign in to download the weights and config, or pull it from the SDK with the Use Model snippet.
Sign in to download Custom License Other
Non-commercial use only. Trained on COCO-CLS-5k, whose images are COCO's: the COCO Consortium does not own their copyright; each image comes from Flickr under its own license, recorded per image in COCO's annotation files, and most of them (68.9% of train2017) are Creative Commons NonCommercial. COCO's annotations are CC BY 4.0, the COCO Consortium. Cite Lin et al., Microsoft COCO: Common Objects in Context (ECCV 2014).
Build your first vision tool
$5 of free compute every month. No card required.