Instructions to use soodoku/piedomains-image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use soodoku/piedomains-image with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="soodoku/piedomains-image") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("soodoku/piedomains-image") model = AutoModelForImageClassification.from_pretrained("soodoku/piedomains-image", device_map="auto") - Notebooks
- Google Colab
- Kaggle
piedomains-image
Classifies a website into one of 42 content categories from a screenshot of its homepage.
An opt-in signal in piedomains; text
classification is the default, for the reason below.
It is weak, and it does not improve the text model
0.456 accuracy / 0.370 macro-F1 on held-out screenshots. Against the text model's 0.707 macro-F1 on the same paired domains, that is not close.
Combining the two was tried four ways on 1,725 paired domains, with both checkpoints verified disjoint from that split:
| combiner | test macro-F1 | vs text |
|---|---|---|
| text only | 0.7067 | β |
| image only | 0.3306 | β0.376 |
| stacked, logistic | 0.6749 | β0.032 |
| stacked, gradient-boosted | 0.6550 | β0.052 |
| stacked, MLP | 0.6632 | β0.044 |
Every combiner is worse than text alone. Weighted per-class fusion reached the same conclusion by driving the text weight to 1.0 β the fitted way of saying "ignore the screenshot".
So why does it exist
Because some callers have no text: bot-walled pages, image-only landing pages, sites that render nothing without JavaScript. For those a weak answer beats no answer, and this is the honest weak answer. It is not a general-purpose classifier and should not be used as one.
What it can and cannot see
At 224px a page is unreadable, so this model reads layout, colour and gross structure, not words. It is best on visually distinctive categories and near-useless on ones defined by their text.
Temperature-scaled: T = 1.5761, ECE 0.1437 to 0.0305.
Backbone, chosen by measurement
google/siglip2-base-patch16-224 against google/vit-base-patch16-224-in21k on identical
data, GPU and step count: 0.531/0.397 versus 0.335/0.140. ViT started at ln(42) = 3.74 β
chance β and barely moved. Object-recognition pretraining transfers poorly to screenshots.
train_domains.json
This checkpoint records the domains it trained on. Split files are not enough to prove a later evaluation is clean: a checkpoint outlives the splits it was fitted against, and two runs here were invalidated by exactly that β one scoring on 73% of its own training data while every split file looked consistent. Check this file, not the splits.
- Downloads last month
- 19
Model tree for soodoku/piedomains-image
Base model
google/siglip2-base-patch16-224