- ec_joint_best.pt + tpd_joint_best.pt now contain the OOD-equipped
joint checkpoints (val AUROC 0.965 EC, 0.967 TPD); From-Image tab
will show OOD warnings under joint mode just like the headline path.
- Add image_encoder.py (imported by multi_mechanism_model.py and
tpd_model.py for the Phase-2 joint encoder) and image_preprocessing.py
(used by app.py for auto-crop + gridline removal preview).
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add EC/TPD Phase-2 joint (image+waveform) checkpoints
- Add EC/TPD Phase-1 image-only checkpoints
- multi_mechanism_model.py / tpd_model.py: add input_mode='image+waveform'
with parallel image + signal encoders fused via joint_fusion MLP
- inference.py: load joint checkpoints, predict_*_joint, hybrid path
routes through new joint result tuple; auto-detect input_mode from
state_dict for older Phase-1 checkpoints
- app.py: From-Image hybrid pipeline (Image-direct / Digitize-then-infer
/ Ensemble / Auto-fallback / Joint Phase-2), method-comparison HTML
panel, preprocessed-image preview, radio default auto-flips to
'Joint image+waveform (Phase 2)' when joint env vars are set
New env vars to set in HF Space:
TRACE_EC_IMAGE_CHECKPOINT=checkpoints/ec_image_best.pt
TRACE_TPD_IMAGE_CHECKPOINT=checkpoints/tpd_image_best.pt
TRACE_EC_JOINT_CHECKPOINT=checkpoints/ec_joint_best.pt
TRACE_TPD_JOINT_CHECKPOINT=checkpoints/tpd_joint_best.pt
Co-authored-by: Cursor <cursoragent@cur…