Pictograph Research

PG-COCO-ViT-b16

Pictograph Research · Classification · Trained 15m ago · Custom license

Sign in to import View on Hugging Face

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
Accuracy72.4%
F162.2%
Precision66.2%
Recall61.4%

Per-class Accuracy

Class Accuracy
airplane94.4%
baseball85.2%
bathroom80.0%
beach0.0%
bear66.7%
bedroom40.0%
bench42.9%
bird88.9%
boat78.6%
bus74.1%
cake0.0%
cat90.9%
child0.0%
clock91.7%
dessert0.0%
dining59.1%
dog81.2%
donut50.0%
electronics66.7%
elephant100.0%
fire hydrant70.0%
formal wear61.5%
frisbee69.2%
fruit78.6%
giraffe90.0%
horse73.7%
hot dog50.0%
kitchen63.3%
kite62.5%
kitesurfing0.0%

Classes

Class index matches the model's output order.

# Class
0skateboarding
1skiing
2bathroom
3bird
4frisbee
5giraffe
6soccer
7teddy bear
8elephant
9vintage photo
10bear
11zebra
12tennis
13train
14baseball
15cat
16dog
17airplane
18kitchen
19kitesurfing
20kite
21boat
22beach
23surfing
24horse
25vase
26livestock
27bedroom
28fruit
29living room
30market
31motorcycle
32portrait
33clock
34street
35fire hydrant
36bus
37luggage
38bench
39pizza
40office
41electronics
42child
43video games
44dining
45formal wear
46donut
47dessert
48meal
49vegetables
50cake
51hot dog
52street sign
53stop sign
54other

Training

Setting Value
Base datasetCOCO-CLS-5k
ExportCOCO-CLS-5k-base
Dataset size5,000 images
Input size224x224
Epochs40
Batch size32
PrecisionFP32
Version1.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")

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

COCO-CLS-5k

Pictograph Research Pictograph Research
5,000 images · 0 classes
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).

Join the discussion

Comments and reactions live in the app.

Sign in to comment

Build your first vision tool

$5 of free compute every month. No card required.