Still-image demo
Use this sub-skill for demo.py workflows on a single image: sparse or dense
landmarks, 3D renderings, depth, PNCC, UV texture, pose boxes, and PLY/OBJ mesh
exports.
When to read
Read this sub-skill when the task asks to:
- Run 3DDFA_V2 on a still image.
- Generate
2d_sparse, 2d_dense, 3d, depth, pncc, uv_tex, pose,
ply, or obj outputs.
- Use
--onnx for a single-image demo.
- Diagnose
No face detected, missing result files, headless plotting, or
mode-specific failures.
Before running
- Use
../setup-and-assets/ if native extensions or checkpoints are not known
to be ready.
- Check
../../references/model-assets.md when switching configs or missing
weight files.
- In headless environments, keep
--show_flag false; the bundled wrapper also
sets a headless plotting backend.
Main wrapper
The bundled wrapper preserves the original demo.py CLI. Put original demo
arguments after --:
python <skill-root>/sub-skills/still-image-demo/scripts/run-still-image.py \
--repo-root <checkout> -- \
-f <image-path> -o 3d --show_flag false --onnx
Use direct repo commands only when you already applied the same compatibility
and headless setup the wrapper provides.
Output selection
Read references/workflows.md for the full output-mode table. The highest-use
choices are:
2d_sparse for 68-point landmark overlays.
2d_dense for dense landmark visualization.
3d for rendered dense mesh overlay.
depth, pncc, and uv_tex for specialized per-pixel visual products.
pose for yaw/pitch/roll pose-box visualization.
ply and obj for mesh serialization.
Outputs default to examples/results/ and use the input basename plus the
selected option.
Decision points
- Prefer
--onnx for CPU latency and when the .onnx assets are already
present or can be auto-converted.
- Use
configs/mb05_120x120.yml when the task values speed over the default
backbone.
- Use dense reconstruction for
3d, depth, pncc, uv_tex, ply, and
obj; sparse mode is enough for 2d_sparse and pose.
- If the user needs multi-frame tracking, route to
../video-and-tracking/.
- If the user asks about latency numbers rather than a saved image, route to
../onnx-and-benchmarking/.
Troubleshooting
Read references/troubleshooting.md for still-image-specific failures and
../../references/troubleshooting.md for shared build/import failures.
1---2name: "still-image-demo"3description: "Run 3DDFA_V2 still-image alignment, rendering, pose, texture, and4 mesh export workflows."5metadata:6 source: https://skillmd.com/skills/vectorspacelab/still-image-demo7 disco-role: operating8disable-model-invocation: true9license: MIT10---1112# Still-image demo1314Use this sub-skill for `demo.py` workflows on a single image: sparse or dense15landmarks, 3D renderings, depth, PNCC, UV texture, pose boxes, and PLY/OBJ mesh16exports.1718## When to read1920Read this sub-skill when the task asks to:2122- Run 3DDFA_V2 on a still image.23- Generate `2d_sparse`, `2d_dense`, `3d`, `depth`, `pncc`, `uv_tex`, `pose`,24 `ply`, or `obj` outputs.25- Use `--onnx` for a single-image demo.26- Diagnose `No face detected`, missing result files, headless plotting, or27 mode-specific failures.2829## Before running30311. Use `../setup-and-assets/` if native extensions or checkpoints are not known32 to be ready.332. Check `../../references/model-assets.md` when switching configs or missing34 weight files.353. In headless environments, keep `--show_flag false`; the bundled wrapper also36 sets a headless plotting backend.3738## Main wrapper3940The bundled wrapper preserves the original `demo.py` CLI. Put original demo41arguments after `--`:4243```bash44python <skill-root>/sub-skills/still-image-demo/scripts/run-still-image.py \45 --repo-root <checkout> -- \46 -f <image-path> -o 3d --show_flag false --onnx47```4849Use direct repo commands only when you already applied the same compatibility50and headless setup the wrapper provides.5152## Output selection5354Read `references/workflows.md` for the full output-mode table. The highest-use55choices are:5657- `2d_sparse` for 68-point landmark overlays.58- `2d_dense` for dense landmark visualization.59- `3d` for rendered dense mesh overlay.60- `depth`, `pncc`, and `uv_tex` for specialized per-pixel visual products.61- `pose` for yaw/pitch/roll pose-box visualization.62- `ply` and `obj` for mesh serialization.6364Outputs default to `examples/results/` and use the input basename plus the65selected option.6667## Decision points6869- Prefer `--onnx` for CPU latency and when the `.onnx` assets are already70 present or can be auto-converted.71- Use `configs/mb05_120x120.yml` when the task values speed over the default72 backbone.73- Use dense reconstruction for `3d`, `depth`, `pncc`, `uv_tex`, `ply`, and74 `obj`; sparse mode is enough for `2d_sparse` and `pose`.75- If the user needs multi-frame tracking, route to `../video-and-tracking/`.76- If the user asks about latency numbers rather than a saved image, route to77 `../onnx-and-benchmarking/`.7879## Troubleshooting8081Read `references/troubleshooting.md` for still-image-specific failures and82`../../references/troubleshooting.md` for shared build/import failures.