face-api.js
БесплатноБез исполняемых скриптовНе проверенBuild face detection, face landmark detection, face recognition, face expression (emotion) recognition, and age/gender estimation with the face-api.js library…
от openlark396 установок в других каталогахОб этом скилле
face-api.js
Face detection/recognition on top of TensorFlow.js core. Browser (WebGL) or Node.js (@tensorflow/tfjs-node + canvas polyfills).
Use Cases
Use when detecting faces in images/video/webcam, drawing bounding boxes or 68-point landmarks, computing/matching 128-d face descriptors via FaceMatcher, classifying facial expressions, estimating age/gender, or realtime face tracking. Covers model selection (SSD Mobilenet v1, Tiny Face Detector, MTCNN), model loading, and the detectAllFaces/detectSingleFace chained API.
What it does
Face detection (3 detectors), 68-point landmarks, 128-d descriptor recognition via FaceMatcher, 7-expression classification, and age/gender estimation. Draw boxes/landmarks/expression bars to canvas; realtime webcam tracking.
Decide first
Pick the detector, then chain the signals you need. Model details (sizes, accuracy, exact filenames, download) → references/models.md.
| Need | Detector / model |
|---|---|
| Realtime / mobile / webcam | Tiny Face Detector (tiny_face_detector_model) |
| Accurate boxes (the default) | SSD Mobilenet v1 (ssd_mobilenetv1_model) |
| 5-point landmarks + scale control | MTCNN (mtcnn_model) |
| Landmarks | face_landmark_68_model / _tiny |
| Identity | face_recognition_model (128-d) |
| Emotion | face_expression_model |
| Age & gender | age_gender_model |
Quick start
Browser: npm i face-api.js. Node: npm i face-api.js canvas @tensorflow/tfjs-node, then faceapi.env.monkeyPatch({ Canvas, Image, ImageData }) (from canvas, required before any detection).
Load models once — manifest + shards must sit in the same directory:
await faceapi.loadSsdMobilenetv1Model('/models') // or faceapi.nets.ssdMobilenetv1.loadFromUri('/models')
await faceapi.loadFaceLandmarkModel('/models')
await faceapi.loadFaceRecognitionModel('/models')
Core API
const results = await faceapi
.detectAllFaces(input) // or detectSingleFace(input)
.withFaceLandmarks() // 68 points
.withFaceDescriptors(); // 128-d Float32Array
Chain methods: .withFaceLandmarks(useTinyModel?) · .withFaceDescriptor()/.withFaceDescriptors() · .withFaceExpressions() · .withAgeAndGender().
- Recognition:
new faceapi.FaceMatcher(refs).findBestMatch(q.descriptor)→{ label, distance }(threshold 0.6). - Draw:
faceapi.matchDimensions(canvas, size)+faceapi.resizeResults(results, size)+faceapi.draw.drawDetections/.drawFaceLandmarks/.drawFaceExpressions.
Runnable examples → references/examples.md. Full API → references/api-reference.md.
Gotchas
- Manifest + shard files must live in the same directory or loading fails.
- Node requires
monkeyPatch({ Canvas, Image, ImageData })first; MTCNN also needsImageData. - No TS types in v0.22.2 (and no
@types/face-api.js): add adeclare moduleshim, useany, or use the maintained@vladmandic/face-apifork (types + CDN models). - Pins old
@tensorflow/tfjs-core1.7.x — don't mix newer tfjs. - First inference is slow (warm-up); wrap realtime loops in
tf.tidy(). - Docs are stale: old
drawDetection/drawLandmarks/BoxWithText→ usefaceapi.draw.drawDetections/.drawFaceLandmarks/.DrawTextField.
Установить face-api.js в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл face-api.js?
Build face detection, face landmark detection, face recognition, face expression (emotion) recognition, and age/gender estimation with the face-api.js library (browser or Node.js).
Как установить скилл face-api.js?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл face-api.js запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic