CAPA

CAPA SDK Documentation

Craniofacial Analysis & Prediction Architecture

Welcome to the CAPA SDK documentation. This SDK provides advanced craniofacial analysis capabilities based on 15+ peer-reviewed scientific papers.

Table of Contents

  1. Getting Started - Installation and quick start guide
  2. API Reference - Complete API documentation
  3. Financial Verticals - Phase 1 biometric pipelines (KYC, continuous auth, anti-deepfake)
  4. Scientific Foundation - Research papers and methodology
  5. Examples - Usage examples and tutorials
  6. Configuration - Configuration options

Overview

CAPA SDK provides the following analysis capabilities:

Core Features (craniofacial analysis)

FeatureDescription
WD AnalysisBizygomatic width measurement and social orientation classification
Forehead AnalysisFrontal inclination angle and impulsiveness level assessment
Morphology AnalysisFace shape classification and facial proportion analysis
Neoclassical CanonsClassical facial proportion validation
Multi-Angle AnalysisCombined analysis from multiple image angles

Financial Verticals (Phase 1 — biometric pipelines)

White-box, audit-friendly pipelines built on top of the morphology and biometric primitives. All decisions carry decision_reason, provenance and a structured audit_trail.

ModuleClassPurpose
capa.biometricFaceMatcherArcFace (InsightFace buffalo_l) face verification, cosine threshold 0.40
capa.biometricLivenessAnalyzerPassive liveness fusing 3D structure + LBP texture + radial FFT + temporal coherence
capa.kycKYCPipelineSelfie + ID document → identity match, liveness, MRZ parsing, audit trail
capa.continuous_authContinuousAuthSystemPer-user baseline + drift detection (z-score over enrolment self-similarity)
capa.deepfakeDeepfakeDetectorMulti-frame fusion: identity consistency + mesh stability + liveness + spectral + blink dynamics

Quick Example

from capa import CoreAnalyzer

# Initialize
analyzer = CoreAnalyzer()

# Analyze
result = analyzer.analyze_image("photo.jpg")

# Access results
print(f"WD Value: {result.wd_result.wd_value}")
print(f"Face Shape: {result.morphology_result.shape_classification.primary_shape.value}")

# Cleanup
analyzer.shutdown()

Architecture

capa/
├── analyzers/          # Analysis orchestrators
│   ├── CoreAnalyzer
│   ├── MultiAngleAnalyzer
│   └── ResultsIntegrator
│
├── modules/            # Scientific analysis modules
│   ├── WDAnalyzer
│   ├── ForeheadAnalyzer
│   ├── MorphologyAnalyzer
│   └── NeoclassicalCanonsAnalyzer
│
├── biometric/          # Phase 1 — biometric primitives
│   ├── FaceMatcher           (ArcFace verification)
│   └── LivenessAnalyzer      (passive liveness, multi-modal)
│
├── kyc/                # Phase 1.A — KYC pipeline
│   ├── KYCPipeline
│   └── DocumentProcessor     (face crop + MRZ extraction)
│
├── continuous_auth/    # Phase 1.B — Continuous authentication
│   └── ContinuousAuthSystem  (baseline + drift detection)
│
├── deepfake/           # Phase 1.C — Anti-deepfake
│   └── DeepfakeDetector      (multi-frame video analysis)
│
└── _internal/          # Internal support systems
    ├── IntelligentLandmarkSystem
    ├── AdaptiveQualitySystem
    └── ContinuousImprovementSystem

Requirements

  • Python 3.9+
  • OpenCV
  • dlib
  • MediaPipe
  • face-recognition
  • scikit-learn
  • scipy
  • numpy
  • insightface + onnxruntime (Phase 1 — biometric)
  • passporteye + tesseract (Phase 1.A — KYC MRZ)

License

Dual License (Non-Commercial Free / Commercial Paid)

Use TypeLicenseCost
Personal projectsNon-Commercial LicenseFree
Academic researchNon-Commercial LicenseFree
Educational useNon-Commercial LicenseFree
Non-profit internal useNon-Commercial LicenseFree
Commercial useCommercial License RequiredContact us

Patent Notice

This software implements methods covered by US Patent 10,885,309: "System and method for evaluating personality using anthropometric measurement of a person's face"

For commercial licensing inquiries, contact: yarelleyva2@gmail.com

See the full LICENSE file for complete terms.

Support

For issues and questions, please visit our GitHub repository.

CAPA v1.1.0