How gildardojair/sentivision works
Purpose and deliverables
AURA BUAP × IRIS UDLAP is a browser-only multimodal analysis system for research/service-experience sessions. It captures webcam and microphone streams locally, infers facial affect and vocal prosody, records session telemetry, and exports CSV. A separate standalone dashboard loads exported CSVs locally to produce an aggregate session report.
Primary entry points:
• Live capture app: index.html, orchestrated by app.js
• Offline session dashboard: analizar-sesion.html
• Styling/shared presentation: style.css
Live application orchestration
app.js is the central control plane: it initializes browser permissions and models, runs the real-time sampling loop, updates UI state, selects/comparisons emotion engines, maintains in-memory session records, detects key moments, and serializes CSV at download time. Reloading without export discards state.
The application requires a secure origin or localhost for getUserMedia; it has no backend. Initial model dependencies are downloaded from CDNs and subsequently browser-cached.
Grounding: index.html, app.js, style.css.
Vision and demographic pipeline
MediaPipe Face Landmarker is wrapped behind facemesh.js. It supplies face bounding boxes, 478 3D landmarks, a facial transformation matrix, and 52 blendshapes. This is the source boundary for face count/geometry, head roll-yaw-pitch, eye features, and emotion-model inputs.
Age/gender remains a face-api.js capability, fed a MediaPipe-derived face crop rather than its legacy detector. This separates current facial detection/tracking inputs from demographic inference.
Grounding: facemesh.js, app.js, index.html.
Emotion engines and affect derivation
Three emotion sources can be evaluated live: face-api baseline expressions, heuristic late fusion, and the default trained MLP. The MLP consumes 52 blendshapes, applies embedded network inference and temporal stabilization, and loads trained weights from a repository asset. The fusion engine combines visual blendshapes with voice-derived features.
Emotion probabilities and pose/eye signals are transformed into valence, arousal, Russell-style quadrants, nearest affect labels, positivity, and attention. These derived outputs are downstream of raw inference and are not clinical claims.
Grounding: emotion-ml.js, emotion_ml_weights.json, emotion-fusion.js; affect.js.
Audio, interaction, and satisfaction flow
voice.js uses Web Audio APIs to derive pitch, RMS energy, and vocal activation locally. A manual Client/Advisor role selection is an explicit boundary: the system does not perform speaker diarization.
When the selected speaker is Client, facial valence and vocal activation feed an EMA satisfaction signal. The orchestration layer flags positive/negative key moments and obtains a participant self-evaluation before final CSV generation.
Grounding: voice.js, app.js, analizar-sesion.html.
Quality, persistence, and reporting
Real-time quality metrics operate over sliding windows: detection coverage, expression entropy, and dominant-emotion flip rate. They inform live degradation alerts and are included in the session export.
The exported UTF-8 BOM CSV contains sampled observations, quality data, and key-moment sections. analizar-sesion.html is intentionally self-contained: it parses user-selected session CSV files in-browser and renders timeline, affect quadrants, key moments, and a verdict. Its verdict assumes a single person per recording; multi-person re-identification is not implemented.
Grounding: metrics.js, app.js, analizar-sesion.html.
Evaluation and historical boundary
Offline notebooks and archived browser experiments support benchmarking and prior implementation investigation but are outside the production execution path. The archive contains superseded app snapshots and isolated evaluation/diagnostic tooling; the root application modules define the active architecture.
Grounding: notebooks/evaluacion_edad_genero_3pipelines.ipynb, archive/app_v2.js, archive/evaluacion-offline/.
Main entry points: app.js Session orchestrator · facemesh.js Face Landmarker wrapper · affect.js Affect derivation · voice.js Voice features
Components 20
Live browser app
Local capture, orchestration, and session state.
- Live capture UI
index.html - Session orchestrator · Owns permissions, sampling, UI state, records, and CSV serialization.
app.js - Shared presentation
style.css - Webcam and microphone · Requires secure origin or localhost.
- Role and self-evaluation · Client/Advisor selection replaces speaker diarization.
app.js - Quality metrics · Tracks coverage, entropy, and emotion flip rate.
metrics.js - In-memory session records · Reloading without export discards state.
app.js
Inference pipeline
On-device multimodal analysis.
- Face Landmarker wrapper · Provides face geometry, pose, landmarks, and blendshapes.
facemesh.js - Age and gender inference · Uses a MediaPipe-derived face crop.
app.js - Voice features · Derives pitch, RMS energy, and vocal activation locally.
voice.js - Trained MLP emotion · Runs embedded inference and temporal stabilization over 52 blendshapes.
emotion-ml.js - MLP weights
emotion_ml_weights.json - Heuristic fusion emotion · Combines visual blendshapes and voice features.
emotion-fusion.js - Face-api expressions
app.js - Affect derivation · Produces valence, arousal, quadrants, labels, positivity, and attention.
affect.js
Export and reporting
Local session export and offline review.
- Session CSV export · Contains observations, quality data, and key moments.
app.js - Offline session dashboard · Locally parses CSVs and renders the aggregate report.
analizar-sesion.html
Evaluation history
Outside the production execution path.
- Offline evaluation notebook · Outside the production path.
notebooks/evaluacion_edad_genero_3pipelines.ipynb - Archived app snapshot · Outside the production path.
archive/app_v2.js - Archived evaluation tools · Outside the production path.
Connections 23
- Live capture UI → Session orchestrator: starts
- Shared presentation → Live capture UI: styles
- Webcam and microphone → Session orchestrator: media streams
- Session orchestrator → Face Landmarker wrapper: video frames
- Face Landmarker wrapper → Age and gender inference: face crop
- Session orchestrator → Voice features: audio stream
- Face Landmarker wrapper → Trained MLP emotion: 52 blendshapes
- MLP weights → Trained MLP emotion: loads
- Face Landmarker wrapper → Heuristic fusion emotion: visual features
- Voice features → Heuristic fusion emotion: vocal features
- Face Landmarker wrapper → Face-api expressions: face input
- Trained MLP emotion → Affect derivation: emotion probabilities
- Heuristic fusion emotion → Affect derivation: emotion probabilities
- Face-api expressions → Affect derivation: baseline probabilities
- Role and self-evaluation → Session orchestrator: selected role and rating
- Affect derivation → Session orchestrator: affect and satisfaction inputs
- Voice features → Session orchestrator: vocal activation
- Face Landmarker wrapper → Quality metrics: detection signals
- Affect derivation → Quality metrics: emotion stream
- Session orchestrator → In-memory session records: sampled observations and moments
- Quality metrics → In-memory session records: quality windows
- In-memory session records → Session CSV export: serialize on download
- Session CSV export → Offline session dashboard: user-selected local file