一键导入
ascii-art-pipeline
Production-grade ASCII/Braille rendering for still images, video, and animated eikons with quality gates and integer scaling
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Production-grade ASCII/Braille rendering for still images, video, and animated eikons with quality gates and integer scaling
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ascii-art-pipeline |
| description | Production-grade ASCII/Braille rendering for still images, video, and animated eikons with quality gates and integer scaling |
| author | Ousia Research (plntrprotocol) |
| maintainer | Anduril |
| license | MIT |
| tags | ["ascii","rendering","video","eikon","quality-gate","scaling"] |
| version | 1.0.0 |
| hermes | {"integration":"skill","category":"creative-tooling","maturity":"production","dependencies":["Pillow>=10.0","numpy>=1.26","ffmpeg (optional, for video interpolation)"],"entrypoint":"ascii-pipeline"} |
Deterministic, quality-gated ASCII/Braille rendering for Hermes operations. Still images, video extraction, animated eikon generation. Pure-Python backend. Zero runtime binary dependencies. Scale 1–16× from base 48×24 grid.
Risomorphism-1911 is the ASCII rendering foundation for Hermes ops. It provides:
--scale N, 1–16) on base 48×24 gridlow-contrast-garble-risk before shipThis skill is production-locked after V6 edge-wash failure analysis. All outputs are deterministic and quality-gated.
From the repository root (requires Python 3.11+):
pip install -e .
This installs the ascii-pipeline CLI entry point.
Dependencies:
Pillow>=10.0, numpy>=1.26ffmpeg (with minterpolate filter) for motion-compensated frame interpolationascii-pipeline presets
List available presets: stroke-clarity, d30-dense, braille-detail, eikon-motion.
ascii-pipeline diagnose <text-file>
Run quality diagnostics on an existing ASCII art file. Output includes:
unique_glyphs: count of distinct characters usedfill_ratio: proportion of non-background cellsverdict: high-contrast / low-contrast-garble-risk / braille-dominantascii-pipeline render-preview <image>
Quick side-by-side preview (original + ASCII) at default scale (48×24) with stroke-clarity preset. PNG output to preview.png.
ascii-pipeline render-image \
--input <image-path> \
--preset <preset-name> \
[--scale N] [--fullsize] \
--out <output.txt> \
--preview-out <output.png> \
--diagnostics-out <output.json>
Render a still image to ASCII or Braille.
Flags:
--preset: one of stroke-clarity, d30-dense, braille-detail (still-image presets)--scale N: integer multiplier on base 48×24 grid; range 1–16. Default: 1--fullsize: alias for --scale 4 (192×96, showcase master)--out: text output path--preview-out: PNG preview path--diagnostics-out: JSON metrics pathNotes:
d30-dense at scale ≥8 uses edge-aware downsampling internally (slower but edge-preserving)braille-detail produces 4× effective resolution via Braille dot matrixlow-contrast-garble-risk verdict still writes files but flags failureascii-pipeline build-eikon-from-video \
--video <mp4-path> \
--fps <frames-per-second> \
--states <state-count> \
--id <eikon-id> \
[--no-motion-phases] [--grid WxH] [--charset <preset-name>]
Build an animated eikon from video input.
Flags:
--video: path to MP4 file (ffmpeg must be available for extraction)--fps: target frame rate (12, 24, 48 recommended; 48 uses interpolation if available)--states: number of motion states (typically 3: idle/thinking/speaking)--id: eikon identifier (used for output filenames)--no-motion-phases: disable motion-phase clustering; treat all frames as one state--grid: explicit grid size as WxH; default 192x96 (scale-4 of 48×24)--charset: preset to use; default d30-dense for eikon-motionOutput:
<id>.eikon — binary eikon file (frame data + metadata)<id>-player.html — embedded HTML5 canvas player (base64-encoded data, works offline)--fps 48 and ffmpeg with minterpolate is available, motion-compensated interpolation is applied for smoother playback.Workflow:
ffmpeg (temporary PNGs in tmp/)minterpolate).eikon binary + HTML5 playerHigh-contrast, bold strokes. Direct intensity→character mapping. No block processing. Best for posters, logos, clean linework. Edge-aware not applicable. Fastest.
180-glyph block-mode preset. Divides source into 16×16 pixel blocks, selects character by weighted intensity vote. Uses edge-aware Laplacian-weighted downsampling to preserve edges at high scale. Atmospheric density. Slower at scale ≥8.
Braille dot matrix (2×4 per character) with Floyd–Steinberg error diffusion. Produces 4× effective resolution. No block collapse; detail-preserving. Dense, tactile, high information density.
Video pipeline preset. Does not accept --scale directly; instead uses --grid and --fps in build-eikon-from-video. Internally uses d30-dense charset with frame clustering and optional interpolation. Outputs animated eikon + HTML player.
Every render produces a verdict in the diagnostics JSON:
| Verdict | Meaning | Action |
|---|---|---|
high-contrast | Production-safe. Edges clear, density appropriate. | Ship |
low-contrast-garble-risk | Edge washout or over-averaging detected. Output unreadable. | Reject |
braille-dominant | Braille preset active; 4× resolution achieved. | Accept (braille mode) |
The d30-dense preset at scale-16 previously failed with low-contrast-garble-risk due to majority-vote block collapse. This was corrected with edge-aware weighting; all regenerated scale-16 assets now pass high-contrast.
Base resolution: 48×24 (standard Herm avatar).
| Scale | Grid | Use case | Performance |
|---|---|---|---|
| 1 | 48×24 | Avatar, deployment, chat | Fast (~0.1s) |
| 2–4 | 96×48 – 192×96 | Showcase, poster, detail view | Moderate (~0.3–1.2s) |
| 8 | 384×192 | High-fidelity showcase, print | Slow (~4–8s) |
| 16 | 768×384 | Maximum poster, archival | Very slow (~15–30s), edge-aware mandatory |
All scales share the same preset pipeline. Intermediate grids scale automatically; e.g., d30-dense intermediate processing grid = base_grid × scale.
Caution: d30-dense at scale 16 is resource-intensive (6144×3072 intermediate before collapse). Use for showcase only. Avatar-scale (--scale 1) remains fast.
The build-eikon-from-video command implements a complete video→animated eikon workflow:
ffmpeg -i input.mp4 -vf fps=... tmp/frame_%04d.pngd30-dense preset at target grid--states groups (default 3)--fps 48 and ffmpeg minterpolate available, generate smooth in-between frames.eikon binary (frame indices + glyph arrays) + standalone HTML5 playerThe HTML player:
Example output:
owl-smooth.eikon 10.8 MB (573 frames, 48 fps interpolated)
owl-player-embedded.html 14.2 MB (offline-capable player)
Problem (V6): Factor-16 block downsampling with majority-vote averaging washed out edges. Diagnostic: low-contrast-garble-risk.
Solution: Edge-aware Laplacian-weighted block reduction + CLAHE (Contrast Limited Adaptive Histogram Equalization) preprocessing.
This fix is mandatory for d30-dense at scale ≥8. All high-scale assets in examples/ use this pipeline.
The repository includes curated examples:
examples/
├── animated-eikon/ # owl eikon suite (12fps, 24fps, 48fps smooth)
├── dense-field/ # dense-field still renders (all presets × scales)
├── portrait/ # portrait still renders (all presets × scales)
└── scene-cosmic-pyramid/
├── preset-renders/ # cosmic pyramid: stroke-clarity, d30-dense, braille-detail; multiple scales
└── source/ # cosmic-pyramid.jpg
Gallery: Open gallery/index.html in a browser to view all 16 panels with verdicts and notes.
| Scenario | Preset | Scale | Verdict target |
|---|---|---|---|
| Avatar / chat | d30-dense | 1 | high-contrast |
| Poster / showcase | stroke-clarity | 4 | high-contrast |
| Maximum detail still | braille-detail | 4–8 | braille-dominant |
| Animated eikon | eikon-motion (video) | 4 (192×96) | high-contrast per frame |
Always run ascii-pipeline diagnose on outputs before shipping. If verdict is low-contrast-garble-risk:
d30-dense: increase scale to 4+ (more pixels per glyph) or switch to stroke-claritystroke-clarity: check source contrast; may need preprocessingbraille-detail: normally yields braille-dominant; accept if Braille is intended--fps 48 + ffmpeg minterpolate for smooth playback (requires ffmpeg compiled with minterpolate support)--states 3 works for most speech/animation; adjust for more motion nuance<id>-player.html to target location; works offline.txt (ASCII), .png (preview), .json (diagnostics), .eikon (video), .html (player)tmp/; clean with rm -rf tmp/verdict field in JSON is authoritativeRun the test suite:
pytest tests/ -v
Current status: 11 tests passing covering CLI parsing, preset existence, scale flag behavior, diagnostics, and backend purity (no chafa dependency).
MIT — permissive, matches Hermes ecosystem licensing.
This skill is intended for inclusion in the main Hermes agent repository under skills/ascii-art-pipeline/. Integration steps:
skills/ascii-art-pipeline/ in hermes-agentpyproject.toml dependencies are added to Hermes package metadataascii-pipeline auto-registered via Hermes skill loaderContact: Anduril (@Anduril) or Ousia Research (plntrprotocol)
Status: Production-ready. Deploy.