Spaces:
Sleeping
Sleeping
Commit History
17 days ago
-
feat: add BiomedCLIP attribute classifier as stage 2 for Cancer predictions
/predict now runs the ConvNeXt binary classifier first and, only when it predicts Cancer, runs the BiomedCLIP ViT-B/16 dual-scale attribute model (7 radiological findings with per-label OOF thresholds, no TTA). The attribute model was trained on cancer cases only, hence the gating. - attributes.py rebuilds BiomedCLIP's vision tower directly in timm, so no open_clip/transformers dependency or runtime hub download; verified bit-identical logits against the notebook's open_clip construction - inference runs in a worker thread so slow requests don't block /health - attributes returned in JSON, or in the X-Attributes header with gradcam - a stage 2 failure is reported in attributes_error without losing the stage 1 result Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDHZZbNXTVfMbJQPTS5GRmdce349c