facescan-auraeai
v1.0.15
Published
Face scanning with color analysis using MediaPipe FaceMesh
Downloads
379
Readme
🎭 FaceScan AuraeAI
Unleash the power of facial analysis with MediaPipe FaceMesh integration! Perfect for health tech, biometric analysis, and real-time face tracking applications.
✨ Features
- 🎯 Real-time face detection and mesh mapping
- 🌈 Advanced RGB color analysis from specific facial regions
- 📸 Smart frame capture with compression
- 💪 Robust error handling and data validation
- 🎨 Visual feedback with canvas rendering
- 📊 Comprehensive biometric data extraction
🩺 Health Parameters Detected FaceScan AuraeAI provides a comprehensive analysis of various health parameters through advanced facial scanning: Vital Signs
❤️ Heart Rate (HR) 🫁 Respiratory Rate (RR) 🩸 Blood Pressure (BP) 🌡️ Mean Arterial Pressure (MAP) 💗 Cardiac Output 🔵 SpO2 (Blood Oxygen Saturation)
Body Composition
💧 Body Water Percentage 💧 Total Body Water 🏋️ Ideal Body Weight 📊 BMI (Body Mass Index) 🔄 Total Body Fat Percentage 🩸 Blood Volume
Cardiac Metrics
❤️ Maximum Heart Rate (HR Max) 🎯 Target Heart Rate Range 💓 Heart Rate Reserve 🔋 Heart Utilization
Blood Parameters
🩸 Hemoglobin (Hb) 📊 HbA1c (Glycated Hemoglobin)
Stress & Recovery
😌 Stress Index 📈 Stress Level 💗 SDNN (Standard Deviation of NN intervals) 💓 RMSSD (Root Mean Square of Successive Differences) 📊 PNN50 (Percentage of NN intervals)
Fitness Metrics
🏃♂️ VO2 Max (Maximum Oxygen Uptake) 📊 ABSI (A Body Shape Index)
Overall Health
🎯 Wellness Score 📈 Age-related Health Indicators
🚀 Installation
npm install facescan-auraeai
📦 Dependencies
This package requires the following peer dependencies:
{
"@mediapipe/face_mesh": "*",
"@mediapipe/camera_utils": "*",
"@mediapipe/control_utils": "*",
"@mediapipe/drawing_utils": "*"
}
🎮 Quick Start
const FaceScan = require("facescan-auraeai");
// Initialize components
await FaceScan.initializeFaceMesh();
await FaceScan.initializeCamera(videoElement);
FaceScan.initializeCanvas(canvasElement);
// Start analysis
const results = await FaceScan.startAnalysis(
(data) => {
console.log("Analysis complete:", data);
},
{
userId: "user123",
sessionId: "session456",
}
);
📊 Sample Health Data Response javascriptCopy{ "statusCode": 200, "body": { // Vital Signs "HR": 72.0, // Heart rate in BPM "RR": 22.0, // Respiratory rate "BP": "100/74", // Blood pressure "MAP": "82.67 mmHg", // Mean arterial pressure "Cardiac Output": 1.1, // Cardiac output "Spo2": 99.0, // Blood oxygen saturation
// Body Composition
"Body Water": 51.39, // Body water percentage
"Total Body Water": 43.68, // Total body water
"Ideal body weight": 39.0, // Ideal body weight
"BMI": 43.4, // Body Mass Index
"Total Body Fat": 41.6, // Body fat percentage
"Blood Volume": 5870.0, // Blood volume
// Cardiac Metrics
"HR Max": 195.0, // Maximum heart rate
"Target Heart Rate Range": "166.0 bpm",// Target heart rate
"Heart Rate Reserve": 123.0, // Heart rate reserve
"Heart Utilize": 37.0, // Heart utilization
// Blood Parameters
"Hb": "13.7", // Hemoglobin
"HbA1c": "6.5", // Glycated hemoglobin
// Stress & Recovery
"Stress Index": 0.64, // Stress index
"Stress level": "Elevated", // Stress level
"SDNN": "52", // Heart rate variability
"RMSSD": "34", // Root mean square differences
"PNN50": "36", // NN interval percentage
// Fitness & Overall Health
"VO2 Max": 41.44, // Maximum oxygen uptake
"ABSI": 0.059, // Body shape index
"wellnessScore": 78, // Overall wellness score
// Metadata
"gender": "Male",
"Age": "21",
"timestamp": "26 October 2024 at 11:50:30 IST+0530"
} }
🛠️ API Reference
initializeFaceMesh()
Initializes the MediaPipe FaceMesh with optimal settings for facial analysis.
initializeCamera(videoElement)
Sets up the camera feed with the specified video element.
videoElement
: HTML video element for camera feed
initializeCanvas(canvasElement)
Prepares the canvas for rendering facial landmarks.
canvasElement
: HTML canvas element for visualization
startAnalysis(callback, metadata)
Begins the facial analysis process.
callback
: Function to receive analysis resultsmetadata
: Optional object with additional data- Returns: Promise with analysis results
🎨 Visualization
The package provides real-time visualization of:
- Facial mesh tessellation
- Eye and eyebrow tracking
- Iris detection
- Face oval mapping
- Lip contour tracking
🔐 Privacy & Security
- All processing happens client-side
- No facial data is stored permanently
- Compressed and encoded frame capture for minimal memory usage
- Secure data handling with proper cleanup
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📝 License
ISC © Ana Fariya
🙏 Acknowledgments
Special thanks to the MediaPipe team for their amazing face mesh implementation.
Made with ❤️ by Ana Fariya