[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78WVPGBXY6GA5QB26VBM5DN":3,"skill-same:01M78WVPGBXY6GA5QB26VBM5DN":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":45},"01M78WVPGBXY6GA5QB26VBM5DN","embeddings-and-classification",null,"Use Facenet embeddings for face comparison, SVM classifiers, embedding export, clustering, and contributed recognition examples.","VectorSpaceLab\u002FAREX-Skill","VectorSpaceLab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F180637102?v=4","01M7538C5WPSJGWF7KHR4EFZ9F","01M7538C6R2GFP53NPXTCZNBRT",351,"MIT","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: embeddings-and-classification\ndescription: \"Use Facenet embeddings for face comparison, SVM classifiers,\n  embedding export, clustering, and contributed recognition examples.\"\nmetadata:\n  disco-role: operating\ndisable-model-invocation: true\nlicense: MIT\n---\n\n# Facenet Embeddings and Classification\n\nUse this sub-skill when a task starts from a trained Facenet model and asks for embeddings, face comparison, classifier training\u002Fclassification, batch export, clustering, or contributed high-level recognition examples.\n\n## When to read\n\n- The user asks to compare faces or print a distance matrix.\n- The user wants to train a classifier on identity folders or classify held-out images.\n- The task needs exported `embeddings.npy`, `labels.npy`, or label strings.\n- The user asks to cluster similar faces from a folder.\n- The request mentions `compare`, `classifier`, `export_embeddings`, `batch_represent`, `cluster`, `predict`, or real-time face recognition.\n\n## Prerequisites\n\n1. A Facenet TF1 environment that imports `facenet`, `align.detect_face`, TensorFlow, NumPy, SciPy, scikit-learn, and OpenCV.\n2. A model path accepted by Facenet: checkpoint directory or frozen `.pb`. Read [`..\u002Fmodel-export-and-checkpoints\u002FSKILL.md`](..\u002Fmodel-export-and-checkpoints\u002FSKILL.md) for model formats.\n3. Aligned class-folder data for classifier\u002Fexport workflows. If input images are raw photos, read [`..\u002Fdata-and-alignment\u002FSKILL.md`](..\u002Fdata-and-alignment\u002FSKILL.md) first.\n4. Enough images per identity for classifier splitting; defaults in `classifier` require at least 20 images per class when `--use_split_dataset` is enabled.\n\n## Workflow map\n\n- **Compare images**: use [`scripts\u002Fbuild_compare_command.py`](scripts\u002Fbuild_compare_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#compare-images).\n- **Train or use an SVM classifier**: use [`scripts\u002Fbuild_classifier_command.py`](scripts\u002Fbuild_classifier_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#train-or-use-an-svm-classifier).\n- **Export embeddings as NumPy arrays**: use [`scripts\u002Fbuild_export_embeddings_command.py`](scripts\u002Fbuild_export_embeddings_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#export-embeddings).\n- **Cluster faces**: use [`scripts\u002Fbuild_cluster_command.py`](scripts\u002Fbuild_cluster_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#cluster-faces).\n- **Contributed examples**: read [`references\u002Fcontributed-workflows.md`](references\u002Fcontributed-workflows.md) before using contributed webcam, prediction, or Chinese-whispers code.\n\n## Key runtime facts\n\n- The embedding tensor is `embeddings:0`; image input is `input:0`; inference uses `phase_train:0` set to `False`.\n- `facenet.load_data(paths, False, False, image_size)` loads already-aligned images and prewhitens by default.\n- `compare` aligns each input image using MTCNN before model inference.\n- `classifier` trains a linear `sklearn.svm.SVC(kernel='linear', probability=True)` over embeddings and stores `(model, class_names)` in a pickle.\n- Contributed export and clustering scripts overlap with core workflows but have additional assumptions and older APIs.\n\n## Output contract\n\n- Compare emits a human-readable distance matrix; save stdout with the model\u002Fpreprocessing settings if it will be used as evidence.\n- Classifier training writes a pickle containing the fitted SVM and class names; keep it paired with the exact identity-folder mapping used for training.\n- Export writes embeddings and labels with matching row order; preserve the label-string array when handing outputs to another model.\n- Clustering writes images under the requested output directory; use a temporary directory and record the threshold\u002Fminimum cluster size.\n\n## Validation\n\nUse command builders with `--help` first. Run full model-backed commands only after model\u002Fdata paths are available. For automation, treat model downloads, raw webcam capture, and large folder clustering as user-approved operations, not default smoke tests.\n\n## Troubleshooting\n\nRead [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) for classifier pickle mismatches, no detected face, empty embedding arrays, old SciPy image I\u002FO, sklearn label issues, and contributed script hazards.\n","# Facenet Embeddings and Classification\n\nUse this sub-skill when a task starts from a trained Facenet model and asks for embeddings, face comparison, classifier training\u002Fclassification, batch export, clustering, or contributed high-level recognition examples.\n\n## When to read\n\n- The user asks to compare faces or print a distance matrix.\n- The user wants to train a classifier on identity folders or classify held-out images.\n- The task needs exported `embeddings.npy`, `labels.npy`, or label strings.\n- The user asks to cluster similar faces from a folder.\n- The request mentions `compare`, `classifier`, `export_embeddings`, `batch_represent`, `cluster`, `predict`, or real-time face recognition.\n\n## Prerequisites\n\n1. A Facenet TF1 environment that imports `facenet`, `align.detect_face`, TensorFlow, NumPy, SciPy, scikit-learn, and OpenCV.\n2. A model path accepted by Facenet: checkpoint directory or frozen `.pb`. Read [`..\u002Fmodel-export-and-checkpoints\u002FSKILL.md`](..\u002Fmodel-export-and-checkpoints\u002FSKILL.md) for model formats.\n3. Aligned class-folder data for classifier\u002Fexport workflows. If input images are raw photos, read [`..\u002Fdata-and-alignment\u002FSKILL.md`](..\u002Fdata-and-alignment\u002FSKILL.md) first.\n4. Enough images per identity for classifier splitting; defaults in `classifier` require at least 20 images per class when `--use_split_dataset` is enabled.\n\n## Workflow map\n\n- **Compare images**: use [`scripts\u002Fbuild_compare_command.py`](scripts\u002Fbuild_compare_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#compare-images).\n- **Train or use an SVM classifier**: use [`scripts\u002Fbuild_classifier_command.py`](scripts\u002Fbuild_classifier_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#train-or-use-an-svm-classifier).\n- **Export embeddings as NumPy arrays**: use [`scripts\u002Fbuild_export_embeddings_command.py`](scripts\u002Fbuild_export_embeddings_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#export-embeddings).\n- **Cluster faces**: use [`scripts\u002Fbuild_cluster_command.py`](scripts\u002Fbuild_cluster_command.py), then read [`references\u002Fworkflows.md`](references\u002Fworkflows.md#cluster-faces).\n- **Contributed examples**: read [`references\u002Fcontributed-workflows.md`](references\u002Fcontributed-workflows.md) before using contributed webcam, prediction, or Chinese-whispers code.\n\n## Key runtime facts\n\n- The embedding tensor is `embeddings:0`; image input is `input:0`; inference uses `phase_train:0` set to `False`.\n- `facenet.load_data(paths, False, False, image_size)` loads already-aligned images and prewhitens by default.\n- `compare` aligns each input image using MTCNN before model inference.\n- `classifier` trains a linear `sklearn.svm.SVC(kernel='linear', probability=True)` over embeddings and stores `(model, class_names)` in a pickle.\n- Contributed export and clustering scripts overlap with core workflows but have additional assumptions and older APIs.\n\n## Output contract\n\n- Compare emits a human-readable distance matrix; save stdout with the model\u002Fpreprocessing settings if it will be used as evidence.\n- Classifier training writes a pickle containing the fitted SVM and class names; keep it paired with the exact identity-folder mapping used for training.\n- Export writes embeddings and labels with matching row order; preserve the label-string array when handing outputs to another model.\n- Clustering writes images under the requested output directory; use a temporary directory and record the threshold\u002Fminimum cluster size.\n\n## Validation\n\nUse command builders with `--help` first. Run full model-backed commands only after model\u002Fdata paths are available. For automation, treat model downloads, raw webcam capture, and large folder clustering as user-approved operations, not default smoke tests.\n\n## Troubleshooting\n\nRead [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) for classifier pickle mismatches, no detected face, empty embedding arrays, old SciPy image I\u002FO, sklearn label issues, and contributed script hazards.\n",{"name":5,"license":14,"metadata":23,"description":7,"disable-model-invocation":25},{"disco-role":24},"operating",true,"main","ac3fe1afa80fb9a09775ecfb2b6cc3ba850a2db6","skills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification",27,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab","2026-09-03 10:25:21",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":25},[35,38,41],{"tool":36,"command":37},"npx","npx skills add VectorSpaceLab\u002FAREX-Skill --skill embeddings-and-classification",{"tool":39,"command":40},"bunx","bunx skills add VectorSpaceLab\u002FAREX-Skill --skill embeddings-and-classification",{"tool":42,"command":43},"pnpm","pnpm dlx skills add VectorSpaceLab\u002FAREX-Skill --skill embeddings-and-classification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002FSKILL.md",[46,52,56,60,64,70,74,78],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fcli-reference.md","REFERENCE","参考文档",1546,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Freferences\u002Fcli-reference.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fcontributed-workflows.md",2189,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Freferences\u002Fcontributed-workflows.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Ftroubleshooting.md",1724,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Freferences\u002Ftroubleshooting.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fworkflows.md",3344,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Freferences\u002Fworkflows.md",{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Fbuild_classifier_command.py","SCRIPT","脚本",1320,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Fscripts\u002Fbuild_classifier_command.py",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Fbuild_cluster_command.py",1305,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Fscripts\u002Fbuild_cluster_command.py",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fbuild_compare_command.py",860,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Fscripts\u002Fbuild_compare_command.py",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Fbuild_export_embeddings_command.py",1532,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Ffacenet\u002Fsub-skills\u002Fembeddings-and-classification\u002Fscripts\u002Fbuild_export_embeddings_command.py",[83,91,98,105,112,119],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M799NYSH1R3RVAHSM2D88Y84","passnet-triton-opt","Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block\u002Fgrid\u002Fwarp 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.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-triton-opt\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M799NS5APEC0N1FZ7XZVW6BN","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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-solve\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":18},"01M799NNY9BKSM21V5R7QVTBJX","passnet-skill","PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under .\u002Fpass_dir\u002F, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-skill\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":18},"01M799NHH6NP7Z1RK77KGXAN6S","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()\u002Freplacement_args()\u002Freplacement_func() files, when a pass \"failed to match\", or when deciding how to fuse multiple kernels\u002Fops.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-pattern-fusion\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":18},"01M799ND2J4WNC2PGAZ0A06NDF","passnet-orchestrate","Round\u002Fbatch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep\u002Frevert 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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-orchestrate\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":18},"01M799N8SBTMY02ZDG2AZF5ZWE","passnet-feedback","Fast, deterministic feedback for PassNet work: pre-flight pattern\u002Fmatch 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).","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-feedback\u002FSKILL.md",[],[]]