How leitrim/humanface works
Human is a cross-platform TensorFlow.js vision library. A caller supplies an image, video, canvas, or tensor to the Human API; it prepares the input, loads and runs enabled vision models, and returns structured detections and optional visualizations. The README documents face analysis and recognition, body and hand tracking, gestures, segmentation, object detection, and image enhancement. The graph reflects sampled source and explicit README capabilities; links to unsampled subsystems are limited to documented or indexed relationships.
Main entry points: human.ts Human API · backend.ts TensorFlow backends · load.ts Model loading · image.ts Image processing
Components 24
API and orchestration
- Human API
src/human.ts - Configuration
src/config.ts - Public exports
src/exports.ts
Input and runtime
- Image processing
src/image/image.ts - Image enhancement
src/image/enhance.ts - Webcam handling
src/util/webcam.ts - Environment detection
src/util/env.ts - TensorFlow backends
src/tfjs/backend.ts - Model loading
src/tfjs/load.ts - Model registry
src/models.ts
Vision models
- Face analysis
src/face/face.ts - Face mesh
src/face/facemesh.ts - Face mesh coordinates
src/face/facemeshcoords.ts - Body pose
src/body/blazepose.ts - Hand tracking
src/hand/handposepipeline.ts - Finger gestures
src/hand/fingerpose.ts - Gesture analysis
src/gesture/gesture.ts - Object detection
src/object/centernet.ts - Body segmentation
src/segmentation/rvm.ts
Results and presentation
- Detection results
src/result.ts - Drawing options
src/draw/options.ts - Result drawing
src/draw/draw.ts
Other components
- Application caller
- TensorFlow.js
Connections 25
- Application caller → Human API: submits input
README.md - Human API → Configuration: uses options
src/human.ts - Human API → Image processing: processes input
src/human.ts - Image processing → Image enhancement: applies enhancement
src/image/image.ts - Human API → TensorFlow backends: checks backend
src/human.ts - TensorFlow backends → Environment detection: checks capabilities
src/tfjs/backend.ts - TensorFlow backends → TensorFlow.js: configures runtime
src/tfjs/backend.ts - Human API → Model loading: loads models
src/human.ts - Model loading → TensorFlow.js: loads graph models
src/tfjs/load.ts - Model loading → Model registry: uses model definitions
src/tfjs/load.ts - Human API → Face analysis: runs face analysis
src/human.ts - Face analysis → Face mesh: runs face mesh
src/face/face.ts - Face mesh → Face mesh coordinates: uses coordinates
src/face/facemesh.ts - Human API → Body pose: runs pose model
src/human.ts - Human API → Hand tracking: runs hand tracking
src/human.ts - Hand tracking → Finger gestures: estimates finger pose
src/hand/handposepipeline.ts - Human API → Object detection: runs object detection
src/human.ts - Human API → Body segmentation: runs segmentation
src/human.ts - Human API → Gesture analysis: analyzes gestures
src/human.ts - Gesture analysis → Finger gestures: classifies fingers
src/gesture/gesture.ts - Human API → Detection results: returns detections
src/human.ts - Human API → Result drawing: draws results
src/human.ts - Result drawing → Drawing options: uses options
- Human API → Webcam handling: supports webcam input
README.md - Human API → Public exports: exposes API types
src/human.ts