Skip to content

Add intensity sweep visualization to CLI #415

@dreamlessx

Description

@dreamlessx

What

Add a --sweep flag to the CLI that generates a grid of outputs at multiple intensity levels (e.g., 20%, 40%, 60%, 80%, 100%) for a single procedure.

Why

Intensity sweep is available in the Gradio demo (Tab 3) but not from the command line. Clinicians and researchers who work from scripts need this functionality without launching the web UI.

Expected behavior

python scripts/run_inference.py photo.jpg \
    --procedure rhinoplasty \
    --sweep 20,40,60,80,100 \
    --output output/sweep_grid.png

This should produce a single image with labeled columns showing each intensity level side by side.

Implementation hints

  • The Gradio sweep logic in scripts/app.py (Tab 3) already does this — extract and generalize it
  • Use OpenCV hconcat or numpy hstack to assemble the grid
  • Add column labels with cv2.putText

Difficulty: 🟡 Intermediate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions