Skip to content

Add confidence score explanation to output metadata #416

@dreamlessx

Description

@dreamlessx

What

When the pipeline outputs a confidence score, include a human-readable explanation of what contributes to it (identity similarity, landmark accuracy, face detection confidence).

Why

Users see a confidence number (e.g., 0.82) but don't know what it means or how to improve it. Breaking it down into components helps clinicians understand and trust the output.

Suggested approach

  1. Extend the result dict from pipeline.generate() to include a confidence_breakdown field:
    {
        "confidence": 0.82,
        "confidence_breakdown": {
            "face_detection": 0.95,
            "identity_preservation": 0.78,
            "landmark_accuracy": 0.88,
            "mask_coverage": 0.91,
        }
    }
  2. Add a --explain flag to the CLI that prints the breakdown
  3. Show the breakdown in the Gradio output panel

Difficulty: 🟡 Intermediate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    In Progress

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions