---
title: "2026-08-31 ve2e minimal PI CAI inference class"
description: "Pivoted the unsupported ISUP class into a PI-CAI-compatible csPCa detection-map inference class."
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-08-31 ve2e minimal PI CAI inference class

## Work Done

- Audited current training configs and established that shipped experiments train binary csPCa classification plus lesion segmentation, while no shipped YAML configures direct six-class GG classification.
- Renamed `src/ve2e/inference/isup.py` to `picai.py` and replaced the ISUP types with `PICAIInference`, `PICAIInferenceInput`, and `PICAIInferenceOutput`.
- Made the ClearML model ID required rather than retaining the incompatible GG default.
- Added model-ready `t2`, `dwi_b1400`, `adc`, and `pmask` inputs.
- Reused canonical logits conversion, calibrated detection-map extraction, candidate extraction, and secondary-lesion scaling.
- Returned `detection_maps` directly consumable as `picai_eval.evaluate(y_det=...)`, plus patient-level csPCa probabilities.
- Passed local Ruff, formatting, compilation, complexity, mocked inference, and calldiff checks. A remote Linux Pixi check was blocked by missing private JFrog authentication on the devbox.
- Appended and pushed commit `f7b749e6` to `feat/isup-inference`.

## Lessons Learned: Pitfalls

- Schema support and tests do not imply a shipped training configuration exists. The initial ISUP class targeted a six-class contract absent from current named experiments.
- The remote Linux host is useful but does not currently have the private Pixi channel credentials needed to solve this project environment.

## Lessons Learned: Improvements

- Audit runnable training configs before defining task-specific inference APIs.
- Keep PI-CAI inference on the exact validation post-processing path so inference output can feed the official evaluator without parallel logic.

Source: https://docs.virdx.dev/knowledge/inbox/2026-08-31-clinical-ve2e-picai-inference-class/index.mdx
