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:
- The CLI:
pm_evaluate computational-cost ...
- 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)
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 byTorchImageDetectionModel.get_computational_cost()but is only reachable via:pm_evaluate computational-cost ...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:runsandwarm_up_runsfor timingresults.to_csv(out_fname)behavior)