Skip to content

Dataset and Captions

Mark Rogers edited this page Oct 16, 2026 · 1 revision

Dataset and captions

prep

BW prep KIT builds dataset/brand/ and dataset/<site>/ from the captures and imports:

  • Tiles: each full page is cut into viewport-sized tiles from the top (--tiles 3). Trainers only shrink pictures into their buckets, so a whole long page would be unreadable.
  • Specimens: each component is cropped and set on the page's background colour with a margin. Small parts are upscaled at most 2x, so they train at a usable size and read as "an isolated component on a plain background".
  • Dedupe: near-duplicates by perceptual hash (--dedupe 4), and the same component with the same words (the "Menu" button on every page).
  • Caps per site: 2 headers, 2 footers, 2 navs, 8 buttons, 6 inputs, 24 tiles, 12 of anything else; --max-per-site 60 in all.
  • Brand set: an equal share from every site (--brand-max 90). Site set: only that site.

Each picture gets a template caption, and manifest.jsonl records where it came from.

Sizes that work: 40-100 pictures for the brand across sites, 20-40 for a site. Fewer than 15 is thin.

Captions

The rule: describe the content and the arrangement, quote the main strings, and never name colours, fonts, corners, shadows, spacing or the brand. Those are what the LoRA should learn.

acmeui acmecareersui, desktop web page screenshot. A job search results page: a search bar with a location field across the top, filter checkboxes in a left column, and a list of six job cards each with a title, a location and an "Apply now" button.

BW caption KIT rewrites the captions with a local vision model through Ollama (--model qwen3-vl:8b by default, --host for another machine). It caches by picture, so the brand set and site sets share the work. It flags style words. Gemma 4 26B wrote captions like the one above in our test, at about 15-60 s a picture on an Apple silicon Mac.

An agent can also write captions by opening each picture. Do that only with the user's yes if the agent is a cloud model, because the screenshots then leave the machine.

review

BW review KIT writes review.html, with every picture and its caption. Delete weak pictures together with their .txt, and fix captions by hand.

Clone this wiki locally