slugvision / README.md
kelnei's picture
Link the now-public project repo
6af475e verified
|
Raw
History Blame Contribute Delete
4.61 kB
---
license: gemma
task_categories:
- image-to-text
language:
- en
size_categories:
- 10K<n<100K
tags:
- synthetic
- slug-generation
- editorial-images
- distillation
pretty_name: slugvision
---
# slugvision
~32,000 image → URL-slug pairs for training small vision-language models to
generate 3–5 word kebab-case permalink slugs, e.g. `three-brown-teddy-bears`,
`nursing-workforce-growth-scaling`. Built as the distillation corpus for
[slugvision-500m](https://huggingface.co/kelnei/slugvision-500m) and
[slugvision-2.2b](https://huggingface.co/kelnei/slugvision-2.2b).
The distribution mimics editorial-site image uploads (article cards): a mix
of everyday photos, conceptual editorial illustrations, product shots,
clinical stock imagery, and web-page screenshots. All slugs were authored by
a locally hosted Gemma-family teacher (26B-class); roughly half the corpus
pairs each image with the article headline it was generated for, which
trains a titled mode where the slug reflects the article topic rather than
just the visible content.
## Slices
| Slice | Images | Labels file | Images included? | Title mode |
|---|---|---|---|---|
| photo | 20,000 | `photo/slugs_photos.jsonl` | **No** — COCO train2017 (see below) | untitled |
| illustration | 5,000 | `illustration/slugs_illustrations.jsonl` | Yes (FLUX.1-schnell renders) | titled |
| product | 2,500 | `product/slugs_products.jsonl` | Yes (FLUX.1-schnell renders) | untitled |
| clinical | 2,500 | `clinical/slugs_clinical.jsonl` | Yes (FLUX.1-schnell renders) | half titled / half untitled |
| screenshot | 2,000 | `screenshot/slugs_screenshots.jsonl` | Yes (rendered from bundled HTML) | titled |
**COCO images are not redistributed** — they are Flickr-sourced with mixed
per-image licenses. `photo/slugs_photos.jsonl` keys each slug by its COCO
train2017 filename (e.g. `000000000776.jpg`); download the images from
[cocodataset.org](https://cocodataset.org/#download) and join on filename.
Every other slice's images were generated for this dataset and ship here.
## Layout
```
photo/slugs_photos.jsonl labels keyed by COCO filename
illustration/
slugs_illustrations.jsonl labels (+ generation headline as title)
illustration_prompts.jsonl teacher-authored FLUX prompts (headline, scene, style)
images/illus-NNNNNN.jpg 5,000 renders
product/ (same shape: labels, prompts, images/prod-NNNNNN.jpg)
clinical/
... labels, prompts, images/clin-NNNNNN.jpg
clinical_titles_half.jsonl which images were labeled with a title
screenshot/
slugs_screenshots.jsonl labels (page headline as title)
screenshot_prompts.jsonl page index (id, topic, headline)
pages/shot-NNNNNN.html 2,000 teacher-authored self-contained pages
images/shot-NNNNNN.jpg rendered screenshots (varied viewports)
train.jsonl the exact 30,739-pair training split
eval.jsonl the frozen 1,000-image eval split (200/slice)
```
Label record shape:
```json
{"image": "illus-000014.jpg", "slug": "iron-absorption-mechanism-process",
"raw": "iron-absorption-mechanism-process",
"title": "How Iron Absorption Works in the Human Body", "valid": true}
```
`slug` is the normalized label (lowercase kebab-case); `raw` is the teacher's
verbatim reply; `valid` flags 3–5 word format compliance (97.7–99.8% per
slice). `title: null` means the untitled prompt mode. `train.jsonl` /
`eval.jsonl` records use repo-relative image paths plus a `slice` field —
photo-slice paths point at COCO filenames you must supply yourself.
## Generation pipeline
1. **Prompts/pages**: the teacher authored FLUX prompts (headline + scene +
style) for illustrations, products, and clinical imagery, and complete
self-contained HTML pages for screenshots.
2. **Images**: FLUX.1-schnell (4 steps) rendered the three generated slices;
Playwright/Chromium screenshotted the HTML at weighted random viewports.
3. **Labels**: the teacher labeled every image — with the source headline in
context for titled slices, image-only otherwise.
All generation, training, and eval scripts live in the project repo:
[github.com/kelnei/slugvision](https://github.com/kelnei/slugvision).
## License notes
- Slugs, prompts, and HTML pages are outputs of a Gemma-family model —
usable per the [Gemma Terms of Use](https://ai.google.dev/gemma/terms)
(hence the license tag).
- Generated images are FLUX.1-schnell outputs (Apache-2.0 model).
- COCO annotations/filenames referenced under CC-BY 4.0; images not included.