feature-extraction-verification
Extract face.evoLVe embeddings from trained PyTorch checkpoints and evaluate LFW-style verification metrics.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- feature-extraction-verification
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Extract face.evoLVe embeddings from trained PyTorch checkpoints and evaluate LFW-style verification metrics.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md7.6 KB
- 参考文档references/feature-and-verification-workflows.md7.7 KB
- 参考文档references/troubleshooting.md4.7 KB
- 脚本scripts/evaluate_pairs.py11.3 KB
- 脚本scripts/extract_features.py16.3 KB
03 SKILL.md 正文
feature-extraction-verification
Use this sub-skill when you need to:
- extract embeddings from a trained face.evoLVe PyTorch checkpoint,
- run the torchvision/ImageFolder batch path or the OpenCV single-image path,
- compare v1 and v2 preprocessing, with or without horizontal-flip TTA,
- compute ROC, threshold accuracy, or VAL-style verification metrics from embeddings,
- debug checkpoint, backbone, shape, or pair-layout mismatches.
Do not use this sub-skill to train a model, create checkpoints, download data, or align raw faces first. Route those requests to the other face-evolve sub-skills instead.
Read / run
references/feature-and-verification-workflows.md— read this first for the end-to-end extraction and verification flow, preprocessing choices, TTA, andperform_valsemantics.references/api-reference.md— read this when you need exact function signatures, tensor or array shapes, or metric return values.references/troubleshooting.md— read this when loading checkpoints, matching backbones, validating pair counts, or locating bcolz-style validation data.scripts/extract_features.py— run this to produce.npyembeddings from a trained checkpoint using either anImageFolderroot or a single image file.scripts/evaluate_pairs.py— run this to score embeddings against anissamearray and export ROC / accuracy / VAL metrics as JSON.
Routing boundaries
- Checkpoint creation, backbone training, head/loss selection, and optimizer setup belong to
pytorch-training. - Image acquisition, dataset layout, and identity-folder preparation belong to
data-preparation. - Alignment or MTCNN crop before feature extraction belongs to
face-alignment. - PaddlePaddle extraction or verification requests belong to
paddle-workflows.
What this sub-skill guarantees
- Distilled preprocessing for
extract_feature_v1.pyandextract_feature_v2.py. - Explicit horizontal-flip TTA behavior and
l2_normnormalization. - Compatibility checks for 512-d face embeddings from IR / IR-SE / ResNet backbones.
- Pairwise verification metrics that expect embeddings in
[img1, img2, img3, img4, ...]order. - Safe wrappers that do not depend on the original checkout path at runtime.
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).