CoolFace
Apppublic

animeshakr/oct-fluid-segmentation-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
App README

OCT Fluid Segmentation API

FastAPI inference endpoint for multi-class retinal fluid segmentation.

Endpoints

EndpointMethodDescription
/GETService info
/healthGETHealth check
/predictPOSTSegment OCT scan
/docsGETInteractive Swagger UI

Usage

python
import requests

url = "https://animeshakr-oct-fluid-segmentation-api.hf.space/predict"
with open("oct_scan.png", "rb") as f:
    r = requests.post(url, files={"file": f})
print(r.json())

Response

json
{
  "prediction": {"dominant_fluid": "IRF", "fluid_detected": true},
  "pixel_counts": {"Background": 250000, "IRF": 1200, "SRF": 0, "PED": 0},
  "fluid_volumes_mm3": {"IRF": 0.0456, "SRF": 0.0, "PED": 0.0},
  "probabilities": {"Background": 0.98, "IRF": 0.12, "SRF": 0.02, "PED": 0.01},
  "uncertainty": 0.000234,
  "ucus": {
    "ucus_score": 0.123,
    "urgency_band": "Monitor",
    "action": "Routine follow-up at next scheduled appointment"
  },
  "latency_ms": 1240.5
}

Model: Dual AttentionTransUNetL V2L ONNX ensemble Author: Animesh Kumar — Newcastle University MSc 2025-26