ROI
ROI Predictor
Authorized by Jongjin Chung, Joonsik Hwang (KAIST)
Logic

How the ROI webapp works

The app uses a fixed experimental context for injector 800 at 30 C, accepts pressure and duration as the only runtime inputs, runs the bundled PDNN checkpoint, and returns the full ROI waveform with summary metrics.

1. Input contract

The current release accepts two values only:

  • pressure_bar: rail pressure in bar
  • duration_us: injection duration in microseconds

The injector and temperature are fixed in this first version: injector 800 at 30 C.

2. Validation and fixed context

Before prediction, the backend checks:

  • pressure is inside the supported range
  • duration is inside the supported range
  • the model context remains fixed to injector 800 at 30 C

This keeps the UI aligned with the actual checkpoint and training bundle.

3. Runtime path

  1. Load the selected checkpoint from the copied Model folder
  2. Transform the inputs using the fitted input scaler
  3. Apply the PDNN on CPU
  4. Inverse-transform the low-resolution waveform using the fitted output scaler
  5. Resample the waveform to the final 7500-point time grid
  6. Return time_us and roi_mg_per_ms

The runtime caches the model after first load so the next request is faster.

4. Internal duration handling

The model uses duration as a continuous variable. Internally it works on the log of duration, which is why the runtime accepts any supported duration value inside the range instead of only a handful of grid points.

5. Summary metrics

The UI derives simple metrics from the predicted waveform:

  • peak ROI value
  • time of the peak
  • integrated ROI area
  • duration above peak thresholds

6. Batch mode

Batch CSV rows are parsed into the same pressure/duration contract and passed through the same validation path. Invalid rows are reported individually rather than stopping the whole batch.

7. Future geometry-aware extension

v1 is fixed-context and pressure-duration only. The UI and handoff are intentionally structured so a later version can add geometry-aware inputs such as injector hole count, PCD, or hole pattern without changing the app shell.