Architecture
Modules
Section titled “Modules”| Module | Needs | Does |
|---|---|---|
dataset_desk/desk.py |
numpy, Pillow | the scan, the caches, the analyses, the report and the CLI |
dataset_desk/backends.py |
numpy; torch and transformers only when a model backend runs | thread caps, the embedding backends, the drafters |
dataset_desk/description_gate.py |
the standard library; a tokenizer only for the token count | the description gate, the review queue, the worksheet |
dataset_desk/errors.py |
the standard library | the structured error and the error codes |
The flow
Section titled “The flow”- Scan. Walk
outputs/<folder>/, hash every image (sha256), and merge byte-identical files into one item. For each unique image, compute a 256-bit dHash and a 30-number look vector, and join its record, its wave’sgeneration.jsonand_curation.json, and the generation data in its PNG text chunks. The results go toscan.jsonl, keyed by sha256, so later runs and other backends reuse them. - Embed (model backends only). Images, and the approved descriptions, become unit-norm vectors in one space. Only items not already in the cache are embedded.
- Analyse. Duplicates in three tiers, the Vendi score, outliers by content and by look, nearest and furthest unapproved images, coverage, and the description fit check.
- Gate. The description gate runs on every approved record, with no model.
- Report. Markdown, the review queue and the worksheet.
Backends
Section titled “Backends”| Backend | Model | Pinned revision | Notes |
|---|---|---|---|
eg2 |
google/embeddinggemma-2 |
914f7f8 |
text, images, and both together; float32 or bfloat16, never float16 |
siglip2 |
google/siglip2-so400m-patch14-384 |
e8e4872 |
text padded to 64 tokens, the way it was trained |
none |
no embeddings; the lite tier | ||
fake |
deterministic vectors for tests |
The drafter plain-sight runs florence-community/Florence-2-large at revision 4271c66, through plain-sight’s own
engine when it is installed, otherwise through the native transformers classes. It always loads offline, and never with
remote code.
The look channel
Section titled “The look channel”Thirty bounded numbers per image, computed at native resolution: palette and tone statistics, plus surface and brushwork texture measures. It is cheap, needs no model, and separates “the style is off” from “the subject is odd”.
Guards
Section titled “Guards”- Thread caps. Importing
dataset_desk.backendssets the BLAS and OpenMP thread variables before numpy loads, and a torch region holds BLAS to one thread with torch’s own pool at--threads. - Read-only projects. The CLI refuses an
--outinside the project. - The GPU. Any device but
cpuneeds--grant, and the grant id is written into the cache’smeta.json. - Locked benchmark projects. A project being used as a retrieval benchmark must not have its queries accepted or
shaped by the models the benchmark measures. On the locked projects, description embeddings and model-based acceptance
(
eg2_fit_accept,ai_eyes_verify) are refused until--allow-multimodal-poolis passed after the counted run.
