Downloads · 30 days
14
14% of all-time downloads
small-models-for-glam/index-card-blank-detector
index-card-blank-detector is a image classification model from small-models-for-glam. Use it when you need a label for an image. It is set up for transformers. The card lists the license as cc-by-4.0.
A tiny (0.95M-param), CPU-runnable image classifier that labels a single cropped archival index card blank or content. It is a cheap pre-filter: run it before expensive VLM metadata extraction (NuExtract3 / Qwen-VL) s…
Downloads · 30 days
14
14% of all-time downloads
All-time downloads
97
Public
Parameters
956K
7.7 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors3.9 MB · 100%
From the Hugging Face model README
A tiny (0.95M-param), CPU-runnable image classifier that labels a single cropped archival
index card blank or content. It is a cheap pre-filter: run it before expensive VLM
metadata extraction (NuExtract3 / Qwen-VL) so blank cards are skipped instead of burning GPU
and cluttering the output. Built to generalise across collections (Boston Public Library
shelf-list cards + National Library of Scotland Advocates Library cards).
Fine-tuned from apple/mobilevit-xx-small
on small-models-for-glam/index-card-blank-content.
from transformers import pipeline
clf = pipeline("image-classification",
model="small-models-for-glam/index-card-blank-detector", device=-1) # CPU
print(clf("card.jpg"))
# [{'label': 'content', 'score': 0.99}, {'label': 'blank', 'score': 0.01}]
As a --skip-blank pre-filter over a folder or dataset, see infer.py in the
project repo: cards predicted blank are
skipped so the VLM only runs on content cards.
pipeline)| split | accuracy | blank recall | content recall |
|---|---|---|---|
| BPL (60) | 1.00 | 1.00 | 1.00 |
| NLS content (15) | 1.00 | n/a | 1.00 |
| punch-hole / smudge blanks (28) | 1.00 | 1.00 | — |
Evaluated through the actual pipeline() inference path (not just the in-training number — a
preprocessing mismatch can hide behind a self-consistent training metric).
Blank-vs-content is visually easy (bare stock vs printed form), so accuracy saturates — the smallest backbone was chosen.
| backbone | params | gold acc | CPU latency (batch=1) |
|---|---|---|---|
| MobileViT-XX-Small (this model) | 0.95M | 100% | ~26 ms |
| MobileNetV2 | 2.23M | 100% | ~37 ms |
| ViT-Tiny | 5.52M | 100% | ~17 ms |
AI-bootstrapped → agent-verified → trained, no from-scratch hand labelling:
card_type, an ink-density heuristic
with punch-hole removal (100% blank recall / 96% content recall when calibrated; used to
harvest extra blanks), the NLS card-detector's box-count (validated as an oracle — reliable
on NLS, noisy on BPL crops), and the NLS has_card flag.Full trajectory in the project BUILD-LOG.md; method derives from the
data-centric-model-dev workflow and is the
companion to the NLS card detector.
divider cards are a planned third class (captured in the dataset, held out of this
binary model); for now a divider is classified content (sent to the VLM).source_collection).Point an agent at a sample of your cards; bootstrap labels from whatever weak signals you have
(a detector, an existing metadata field, an ink-density heuristic with punch-hole handling);
auto-accept agreements and human-correct the rest; hold out a small verified gold set; then
re-run training with your rows tagged by source_collection.