Skip to content

Add computational cost tab to GUI evaluator #560

Description

@AdityaX18

Context

The GUI (streamlit run app.py) currently exposes three tabs: Dataset Viewer, Inference, and Evaluator. Computational cost information for a loaded model — parameter count, model file size, and forward-pass inference latency — is produced by TorchImageDetectionModel.get_computational_cost() but is only reachable via:

  1. The CLI: pm_evaluate computational-cost ...
  2. The standalone example scripts under examples/

This means a user who has already loaded a detection model in the GUI has to drop to a terminal, re-specify the model path, and read a CSV to get cost numbers. GUI ↔ CLI feature parity is missing for this capability.

This came up as a follow-up to #539 — the maintainer noted that fine-grained per-model cost reporting is a separate concern from aggregate evaluation-loop latency and deserves its own surface.

Proposed change

Add a fourth tab, Computational Cost, that wraps TorchImageDetectionModel.get_computational_cost() for the model already loaded in the sidebar. The tab will let the user:

  • Configure input image size (height, width)
  • Configure runs and warm_up_runs for timing
  • Trigger cost analysis with a button (gated — not recomputed on every widget change)
  • View results as metrics (input shape, parameters in millions, model size in MB, inference latency in ms, derived FPS)
  • Expand to see the full DataFrame
  • Download the result as CSV (parity with the CLI's results.to_csv(out_fname) behavior)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions