3ddfa-v2
Routes 3DDFA_V2 face-alignment setup, still-image demos, video tracking, and ONNX benchmarking workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- 3ddfa-v2
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Routes 3DDFA_V2 face-alignment setup, still-image demos, video tracking, and ONNX benchmarking workflows.
- disable-model-invocation
- true
02 资源文件 9
- 参考文档references/api-reference.md4.1 KB
- 参考文档references/model-assets.md2.9 KB
- 参考文档references/repo-provenance.md556 B
- 参考文档references/repo-routing-metadata.json486 B
- 参考文档references/troubleshooting.md4.0 KB
- 脚本scripts/bootstrap_runtime.py1.8 KB
- 脚本scripts/build_native_extensions.py1.8 KB
- 脚本scripts/check_assets.py1.7 KB
- 脚本scripts/check_core_imports.py1.3 KB
03 SKILL.md 正文
3DDFA_V2
Use this skill for the 3DDFA_V2 face-alignment repo. The public workflow is a small pipeline: build the native pieces, then run still-image, video/tracking, or ONNX/benchmark commands.
Start here
- If anything fails to build or import, open
references/troubleshooting.md. - If you need model files or config choices, open
references/model-assets.md. - If you need class/function details, open
references/api-reference.md. - Run the setup route first whenever
render.so,cpu_nms, orSim3DR_Cythonis missing.
The repository is source-first, not a packaged wheel. Use the bundled helpers in this skill tree instead of calling the original repo scripts directly.
Routes
setup-and-assets
Use when the user asks to install or verify the runtime, build compiled pieces, check checkpoint/config assets, or fix import/build failures.
Read sub-skills/setup-and-assets/SKILL.md, references/model-assets.md, and
references/troubleshooting.md.
Use the bundled helpers:
scripts/build_native_extensions.pyscripts/check_assets.pyscripts/check_core_imports.py
still-image-demo
Use for single-image inference, 2D landmark overlays, 3D renderings, depth, PNCC, UV texture, pose boxes, PLY, or OBJ exports.
Read sub-skills/still-image-demo/SKILL.md and
sub-skills/still-image-demo/references/workflows.md.
Use sub-skills/still-image-demo/scripts/run-still-image.py for a headless-friendly wrapper.
video-and-tracking
Use for MP4/AVI processing, tracking, smoothing, or frame-window control.
Read sub-skills/video-and-tracking/SKILL.md and
sub-skills/video-and-tracking/references/workflows.md.
Use sub-skills/video-and-tracking/scripts/run-video.py and sub-skills/video-and-tracking/scripts/run-video-smooth.py.
onnx-and-benchmarking
Use for ONNX acceleration, CPU latency, thread tuning, or microbenchmarks.
Read sub-skills/onnx-and-benchmarking/SKILL.md and
sub-skills/onnx-and-benchmarking/references/workflows.md.
Use sub-skills/onnx-and-benchmarking/scripts/run-latency.py and sub-skills/onnx-and-benchmarking/scripts/run-speed-cpu.py.
Common runtime facts
- Default config:
configs/mb1_120x120.yml. - Alternate configs:
configs/mb05_120x120.ymlandconfigs/resnet_120x120.yml. - Provide an input image or video path for demos; local smoke fixtures may be used when the checkout includes them.
- Generated outputs live under
examples/results/. demo.pysupports2d_sparse,2d_dense,3d,depth,pncc,uv_tex,pose,ply, andobj.demo_video.pyanddemo_video_smooth.pysupport2d_sparseand3d; webcam mode is manual-only and is documented, but not bundled as a runnable helper.--onnxswitches the demo pipeline to the CPU-friendly ONNX path.uv_texneeds SciPy and the BFM UV/config assets.- The repo still references deprecated NumPy aliases such as
np.long, so the bundled runtime helpers restore a compatibility layer before importing the pipeline.
Headless use
The bundled helpers default to headless plotting behavior so they work in non-GUI environments. If you need interactive windows, override that behavior explicitly.
What not to route here
- Experimental Gradio notebook/demo code.
- Generic face detection tasks that do not involve the 3DDFA_V2 alignment pipeline.
- Training or dataset creation tasks; this repo is inference-oriented.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).