πŸ’— WIA Emotion AI Standard Ebook | Chapter 4 of 8


πŸ’— Chapter 4: Phase 1 - Emotion Data Format

Hongik Ingan (εΌ˜η›ŠδΊΊι–“)

"Benefit All Humanity"

A standardized data format is the foundation of interoperability. The WIA Emotion AI data format ensures that emotion data can be shared and processed across any compliant system.


4.1 Overview

4.1.1 Purpose

Phase 1 defines the JSON-based data format for representing emotion analysis results. This standardized format enables:

4.1.2 Design Goals

Goal Implementation
Simplicity JSON format, clear field names
Completeness Supports all emotion models and modalities
Extensibility Custom fields allowed with prefixes
Validation JSON Schema for automated verification
Precision High-resolution timestamps and values

4.2 Base Message Structure

4.2.1 Complete Schema

{
    "$schema": "https://wiastandards.com/emotion-ai/v1/schema.json",
    "format": "WIA-EMOTION-AI-v1.0",
    "timestamp": "2025-12-19T10:30:00.000Z",
    "subject_id": "user_12345",
    "session_id": "sess_abc123",
    "modality": "facial",

    "emotions": {
        "primary": {
            "label": "happiness",
            "confidence": 0.87
        },
        "secondary": {
            "label": "surprise",
            "confidence": 0.23
        },
        "all": [
            { "label": "happiness", "confidence": 0.87 },
            { "label": "surprise", "confidence": 0.23 },
            { "label": "neutral", "confidence": 0.15 },
            { "label": "sadness", "confidence": 0.05 },
            { "label": "anger", "confidence": 0.03 },
            { "label": "fear", "confidence": 0.02 },
            { "label": "disgust", "confidence": 0.01 }
        ]
    },

    "dimensions": {
        "valence": 0.72,
        "arousal": 0.45,
        "dominance": 0.55
    },

    "action_units": [
        { "au": "AU6", "intensity": 0.8, "name": "Cheek Raiser" },
        { "au": "AU12", "intensity": 0.9, "name": "Lip Corner Puller" },
        { "au": "AU1", "intensity": 0.3, "name": "Inner Brow Raiser" }
    ],

    "face": {
        "detected": true,
        "bbox": { "x": 120, "y": 80, "width": 200, "height": 250 },
        "landmarks": 68,
        "pose": { "pitch": 5.2, "yaw": -3.1, "roll": 1.2 }
    },

    "metadata": {
        "model_version": "2.1.0",
        "model_name": "WIA-EmotionNet",
        "processing_time_ms": 45,
        "device_id": "cam_001",
        "culture_context": "global"
    }
}

4.3 Field Specifications

4.3.1 Root Fields

Field Type Required Description
format string REQUIRED Format identifier: "WIA-EMOTION-AI-v1.0"
timestamp string (ISO 8601) REQUIRED Analysis timestamp
subject_id string OPTIONAL Identifier for the subject (anonymized)
session_id string OPTIONAL Session identifier for grouping
modality string REQUIRED Input type: facial, voice, text, biosignal, multimodal

4.3.2 Emotions Object

Field Type Required Description
emotions.primary object REQUIRED Highest confidence emotion
emotions.primary.label string REQUIRED Emotion label (happiness, sadness, etc.)
emotions.primary.confidence number (0-1) REQUIRED Confidence score
emotions.secondary object OPTIONAL Second highest confidence emotion
emotions.all array OPTIONAL All emotion scores

4.3.3 Valid Emotion Labels

Basic Emotions (required support):
  "happiness"  - Joy, pleasure, contentment
  "sadness"    - Sorrow, grief, melancholy
  "anger"      - Displeasure, frustration, rage
  "fear"       - Apprehension, anxiety, terror
  "disgust"    - Revulsion, aversion
  "surprise"   - Astonishment, amazement
  "neutral"    - No strong emotion detected

Extended Emotions (optional):
  "contempt"   - Scorn, disdain
  "confusion"  - Uncertainty, puzzlement
  "interest"   - Curiosity, engagement
  "boredom"    - Disengagement
  "excitement" - High positive arousal
  "anxiety"    - Worry, unease

4.3.4 Dimensions Object

Field Type Range Description
dimensions.valence number -1.0 to +1.0 Positive/negative feeling
dimensions.arousal number -1.0 to +1.0 Energy/activation level
dimensions.dominance number -1.0 to +1.0 Control/influence (optional)

4.3.5 Action Units Array

Field Type Description
action_units[].au string AU code (AU1, AU2, AU4, etc.)
action_units[].intensity number (0-1) Activation intensity
action_units[].name string Human-readable name (optional)

4.4 Modality-Specific Extensions

4.4.1 Facial Modality

{
    "modality": "facial",
    "face": {
        "detected": true,
        "count": 1,
        "bbox": {
            "x": 120,
            "y": 80,
            "width": 200,
            "height": 250
        },
        "landmarks": 68,
        "pose": {
            "pitch": 5.2,
            "yaw": -3.1,
            "roll": 1.2
        },
        "quality": {
            "blur": 0.1,
            "exposure": 0.8,
            "occlusion": 0.05
        }
    },
    "action_units": [
        { "au": "AU6", "intensity": 0.8 },
        { "au": "AU12", "intensity": 0.9 }
    ]
}

4.4.2 Voice Modality

{
    "modality": "voice",
    "voice": {
        "duration_ms": 3500,
        "sample_rate": 44100,
        "features": {
            "pitch_mean": 180.5,
            "pitch_std": 25.3,
            "intensity_mean": 65.2,
            "speech_rate": 4.2,
            "pause_ratio": 0.15
        },
        "language": "en-US",
        "transcript": "I'm really happy about this!"
    }
}

4.4.3 Text Modality

{
    "modality": "text",
    "text": {
        "content": "This product is absolutely amazing!",
        "language": "en",
        "length": 37,
        "sentiment": {
            "polarity": 0.92,
            "subjectivity": 0.85
        },
        "entities": [
            {
                "text": "product",
                "emotion": "happiness",
                "confidence": 0.88
            }
        ],
        "aspects": [
            {
                "aspect": "quality",
                "sentiment": 0.95
            }
        ]
    }
}

4.4.4 Biosignal Modality

{
    "modality": "biosignal",
    "biosignal": {
        "signals": ["ecg", "eda"],
        "duration_ms": 60000,
        "metrics": {
            "heart_rate": {
                "mean": 75,
                "std": 8,
                "hrv_rmssd": 42.5
            },
            "eda": {
                "scl_mean": 3.2,
                "scr_count": 5,
                "scr_amplitude_mean": 0.8
            }
        },
        "derived": {
            "stress_level": 0.35,
            "engagement": 0.72,
            "relaxation": 0.55
        }
    }
}

4.4.5 Multimodal

{
    "modality": "multimodal",
    "modalities_used": ["facial", "voice"],
    "fusion_method": "weighted_average",
    "modality_weights": {
        "facial": 0.6,
        "voice": 0.4
    },
    "modality_results": {
        "facial": {
            "emotions": { "primary": { "label": "happiness", "confidence": 0.85 } },
            "dimensions": { "valence": 0.7, "arousal": 0.5 }
        },
        "voice": {
            "emotions": { "primary": { "label": "happiness", "confidence": 0.78 } },
            "dimensions": { "valence": 0.6, "arousal": 0.6 }
        }
    }
}

4.5 Metadata Object

Field Type Description
model_version string Version of the analysis model
model_name string Name of the model used
processing_time_ms integer Time taken to process
device_id string Identifier for input device
culture_context string Cultural context for interpretation
wia_certified boolean Whether model is WIA certified

4.6 Complete Example

{
    "format": "WIA-EMOTION-AI-v1.0",
    "timestamp": "2025-12-19T10:30:00.123Z",
    "subject_id": "user_12345",
    "session_id": "sess_20251219_001",
    "modality": "facial",

    "emotions": {
        "primary": {
            "label": "happiness",
            "confidence": 0.87
        },
        "secondary": {
            "label": "surprise",
            "confidence": 0.23
        },
        "all": [
            { "label": "happiness", "confidence": 0.87 },
            { "label": "surprise", "confidence": 0.23 },
            { "label": "neutral", "confidence": 0.15 },
            { "label": "sadness", "confidence": 0.05 },
            { "label": "anger", "confidence": 0.03 },
            { "label": "fear", "confidence": 0.02 },
            { "label": "disgust", "confidence": 0.01 }
        ]
    },

    "dimensions": {
        "valence": 0.72,
        "arousal": 0.45
    },

    "action_units": [
        { "au": "AU6", "intensity": 0.8, "name": "Cheek Raiser" },
        { "au": "AU12", "intensity": 0.9, "name": "Lip Corner Puller" },
        { "au": "AU1", "intensity": 0.3, "name": "Inner Brow Raiser" },
        { "au": "AU2", "intensity": 0.25, "name": "Outer Brow Raiser" },
        { "au": "AU25", "intensity": 0.4, "name": "Lips Part" }
    ],

    "face": {
        "detected": true,
        "count": 1,
        "bbox": { "x": 120, "y": 80, "width": 200, "height": 250 },
        "landmarks": 68,
        "pose": { "pitch": 5.2, "yaw": -3.1, "roll": 1.2 },
        "quality": { "blur": 0.1, "exposure": 0.8, "occlusion": 0.05 }
    },

    "metadata": {
        "model_version": "2.1.0",
        "model_name": "WIA-EmotionNet-v2",
        "processing_time_ms": 45,
        "device_id": "webcam_001",
        "culture_context": "western",
        "wia_certified": true,
        "certification_level": 2
    }
}

4.7 JSON Schema Definition

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://wiastandards.com/emotion-ai/v1/schema.json",
    "title": "WIA Emotion AI Data Format",
    "type": "object",
    "required": ["format", "timestamp", "modality", "emotions"],
    "properties": {
        "format": {
            "type": "string",
            "pattern": "^WIA-EMOTION-AI-v[0-9]+\\.[0-9]+$"
        },
        "timestamp": {
            "type": "string",
            "format": "date-time"
        },
        "modality": {
            "type": "string",
            "enum": ["facial", "voice", "text", "biosignal", "multimodal"]
        },
        "emotions": {
            "type": "object",
            "required": ["primary"],
            "properties": {
                "primary": { "$ref": "#/definitions/emotionScore" },
                "secondary": { "$ref": "#/definitions/emotionScore" },
                "all": {
                    "type": "array",
                    "items": { "$ref": "#/definitions/emotionScore" }
                }
            }
        },
        "dimensions": {
            "type": "object",
            "properties": {
                "valence": { "type": "number", "minimum": -1, "maximum": 1 },
                "arousal": { "type": "number", "minimum": -1, "maximum": 1 },
                "dominance": { "type": "number", "minimum": -1, "maximum": 1 }
            }
        },
        "action_units": {
            "type": "array",
            "items": { "$ref": "#/definitions/actionUnit" }
        }
    },
    "definitions": {
        "emotionScore": {
            "type": "object",
            "required": ["label", "confidence"],
            "properties": {
                "label": { "type": "string" },
                "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
            }
        },
        "actionUnit": {
            "type": "object",
            "required": ["au", "intensity"],
            "properties": {
                "au": { "type": "string", "pattern": "^AU[0-9]+$" },
                "intensity": { "type": "number", "minimum": 0, "maximum": 1 },
                "name": { "type": "string" }
            }
        }
    }
}

4.8 Chapter Summary

[OK] Key Takeaways:

  1. JSON Format: All emotion data uses JSON with defined schema
  2. Required Fields: format, timestamp, modality, emotions
  3. Emotion Models: Supports both discrete labels and V-A dimensions
  4. Action Units: FACS AU encoding with 0-1 intensity
  5. Modality Extensions: Specific fields for face, voice, text, biosignal
  6. Multimodal: Fusion results with modality weights
  7. Validation: JSON Schema enables automated verification

4.9 Looking Ahead

In Chapter 5, we will explore Phase 2: API Interface, covering REST API endpoints for emotion analysis across all modalities.


Chapter 4 Complete | Approximate pages: 16

Next: Chapter 5 - Phase 2: API Interface


WIA - World Certification Industry Association

Hongik Ingan - Benefit All Humanity

https://wiastandards.com