mattrguerra/meridian-skillsmainPrivate on GitHub, published here in full

model-selection.md

Language Markdown3.8 KB64 lines

skills/topaz-prepress/references/model-selection.md

  1. # Model selection reference
  2. How the prep engine routes an image to a Topaz Gigapixel model, what each feature means, and
  3. when to override the automatic call by eye. Read this when a recommendation looks wrong or the
  4. user asks why a model was chosen.
  5. ## Features measured (`analyze()`)
  6. | Feature | Meaning | Reads as |
  7. |---|---|---|
  8. | `uniq` | raw unique opaque colors | low (<200) = clean indexed/vector logo |
  9. | `uniqq` | colors after quantizing to 32 levels/channel | collapses JPEG/AA near-duplicates; reflects the *real* palette |
  10. | `flat` | uniq ÷ opaque-pixel count | high (>0.15) on a small image = jaggy AA = genuinely low-res |
  11. | `edge` | mean absolute luminance gradient | high = lots of edges (text, linework, detail) |
  12. | `hf` | high-frequency energy (image minus slight blur) | low on a *large* image = soft = possible false resolution |
  13. | `blk` | step magnitude on the 8px DCT grid vs everywhere | >1.1 hints at JPEG block artifacts |
  14. | `transp` / `semi` | fraction not fully opaque / soft-edged | drives alpha split + defringe |
  15. ## Routing table (`classify()`)
  16. Rules are evaluated in order; the first match wins.
  17. | # | Condition | Category | Model (alt) | Key settings |
  18. |---|---|---|---|---|
  19. | 1 | `px < 90k` AND `flat > 0.15` | Low-res / degraded | **Wonder 3** (Low Resolution 2) | generative; no Python sharpen |
  20. | 2 | JPEG, `edge > 0.03` | Detailed line art (JPEG) | **Art & CG** (Standard) | Fix Compression On |
  21. | 3 | JPEG, else | Flat logo (JPEG) | **Art & CG** (Standard) | Fix Compression On |
  22. | 4 | `uniq < 200` | Flat vector logo | **Text & Shapes** (Art & CG) | Fix Compression Off |
  23. | 5 | `px > 300k` AND `uniqq > 700` | Detailed illustration | **Standard** (Art & CG) | true-to-input |
  24. | 6 | else | Gradient / rendered logo | **Art & CG** (Standard) | keeps gradients + clean edges |
  25. Independent of category:
  26. - **Fix Compression**: On (Medium) for any JPEG source, Off otherwise.
  27. - **Denoise / Sharpen**: Off by default. Denoise Low only if grain survives Fix Compression.
  28. Never sharpen in the pre-pass; the model owns edges.
  29. - **Face Recovery**: Off. Skull marks and mascot figures are stylized, not real faces, and
  30. Face Recovery will distort them.
  31. - **Pre-downscaling**: flagged Low-Medium when `min_side ≥ 600` and `hf < 0.012` (large but
  32. soft). Recommend Topaz's own toggle, or re-run with `--predownscale` to bake it in.
  33. - **Color space**: preserve input; export Adobe RGB if the file is going into CMYK prepress.
  34. Do not rely on Topaz's single SWOP CMYK profile for dye-sub/large-format, convert in prepress.
  35. ## When to override by eye
  36. The classifier routes from statistics and can't see *meaning*. Override when the image tells
  37. you something the numbers don't:
  38. - **Flat vector defaulted to Text & Shapes, but it's emblem/illustration-dominant** (a badge,
  39. a mascot, a crest with little lettering): switch to **Art & CG**. Text & Shapes is for pieces
  40. that are mostly type and geometry.
  41. - **A "gradient/rendered" logo is actually a photograph or photoreal render**: consider
  42. **Standard** or **High Fidelity 3** instead of Art & CG.
  43. - **A flat JPEG is extremely soft and large** (text edges mushy): pre-downscale first
  44. (`--predownscale`) so Fix Compression + Art & CG have concentrated pixels to work from.
  45. - **Degraded route (Wonder 3) over-invents detail** on a recognizable mark: fall back to the
  46. alternate (Low Resolution 2), which reconstructs less aggressively and stays closer to source.
  47. ## Print sizing logic
  48. The report's "Print reach" lines come from the source dimensions × Topaz's 6x ceiling, divided
  49. by viewing-distance PPI: 150 PPI for close viewing (≤6 ft), 100 PPI standing (~10 ft), 60 PPI
  50. distant (≥20 ft). These follow Topaz's own viewing-distance guidance (closer needs more PPI).
  51. Use them to tell a client whether a small source can actually reach the banner size they want,
  52. before committing to the upscale.