Backend inference interface: accept a CAM output from the swin classifier
- Langage dominant
- Python
- Étoiles
- 2
- Forks
- 2
- Merge moyen
- 5 j 6 h
- PR mergées (30 j)
- 5
Description
The FastAPI EigenGradCAM service (ai-cfia/nachet-model-ccds#38) returns a second
Triton output, `CAM` (FP32, shape `[images, k, grid, grid]`), alongside the usual
`PREDICTIONS`.
The backend can't consume this today. `TritonInferenceResponse` validates that a
swin response has exactly one output named `PREDICTIONS`:
- `backend/app/model/inference.py:609` — `raise ValueError("27spp model returns exactly one output (PREDICTIONS)")`
- `backend/app/model/inference.py:582` — output name must be `"PREDICTIONS"`
To surface explainability through the platform, the backend response contract needs
to optionally accept and pass through a `CAM` output when the model emits one, without
breaking models that return predictions only.
Scope:
- [ ] Relax/extend the swin response model to allow an optional `CAM` output
- [ ] Thread the CAM data through to the API response the frontend consumes
- [ ] Note: `CAM.data` is a nested FP32 array, not a JSON string (unlike PREDICTIONS)
Blocks the "Update Nachet Backend" step of ai-cfia/nachet#34.
Ref: ai-cfia/nachet-model-ccds#38.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.