NCI Ireland Β· Multi-Cancer AI Β· v2.4.2

NeuroScope AI
Documentation

Multi-cancer clinical decision support platform β€” 6 pipelines, 7 ONNX models, Microsoft SSO, and FHIR R4 export.

Get Started API Reference Register Institution
7/7Models Loaded
6Cancer Pipelines
30+API Endpoints
0.988Best AUC
FHIR R4Export Format
Introduction

What is NeuroScope AI?

NeuroScope AI is a multi-cancer clinical decision support platform built for NHS and international hospitals. It combines 7 validated ONNX model pipelines with Microsoft Entra ID SSO, federated learning, and full FHIR R4 export β€” all in a single FastAPI deployment on HuggingFace Spaces.

🧠
6 Cancer Pipelines
Brain, Lung, Breast, Liver, Skin, Spine β€” each with dedicated ONNX models.
πŸ”
Microsoft Entra ID SSO
Role-based access: superadmin, admin, clinician, viewer. OAuth2 token flow.
πŸ“‹
FHIR R4 + ICD-10
Every scan exports a FHIR DiagnosticReport with ICD-10 codes and NCCN treatment recs.
πŸ—ΊοΈ
Grad-CAM++ + TIxAI
Per-scan explainability heatmaps with trustworthiness index scoring.
πŸ”—
Federated Learning
DP-SGD with Opacus. Patient data never leaves the institution.
πŸ₯
Hospital Workflow
Registration, approval, multi-hospital management, audit logging.
⚠ NeuroScope AI is a clinical decision support tool, not a medical device. All AI outputs must be reviewed by a qualified clinician before clinical action.
Getting Started

Quickstart

Get access to NeuroScope AI in three steps.

1

Register your institution

Complete the hospital registration form at /register. Your application is reviewed within 2 business days.

2

Sign in with Microsoft SSO

Once approved, sign in at /ui using your institutional Microsoft account.

3

Upload a scan and analyze

python
import requests

res = requests.post(
    "https://tejansree-neuroscope-ai.hf.space/scan",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    files={"file": open("brain_mri.jpg", "rb")},
    data={"cancer_type": "brain", "patient_id": "PT-001"}
)
print(res.json()["verdict"])  # CANCER_DETECTED / NORMAL / REVIEW
Platform

Architecture

NeuroScope AI is a single FastAPI service on HuggingFace Spaces, serving 7 ONNX models with Microsoft Entra ID SSO and Supabase (primary) + JSON file fallback data layer.

01
Upload Scan
β†’
02
Auth Check
β†’
03
ONNX Inference
β†’
04
Grad-CAM++
β†’
05
FHIR Report
β†’
06
Audit Log

Tech Stack

LayerTechnologyPurpose
APIFastAPI + Uvicorn30+ REST endpoints
AuthMicrosoft Entra IDSSO, RBAC, token validation
ModelsONNX Runtime (INT8)7 quantised cancer detection models
DatabaseSupabase + JSON fallbackScan results, hospitals, audit logs
HostingHuggingFace SpacesProduction deployment
PrivacyOpacus DP-SGDFederated learning with Ξ΅<10
Platform

Models & Performance

Seven ONNX INT8 quantised models loaded at startup. All trained on publicly available datasets and validated on held-out test sets.

Model KeyCancer TypeArchitectureModalityPerformance
brain_clsBrainEfficientNet-B4MRIAUC 0.9882
brain_segBrain SegmentationSegResNetMRIDice 0.8351
lung_detLung NoduleResNet3DCTAUC 0.9816
breast_detBreastEfficientNet-B5UltrasoundAUC 0.8693
liver_segLiverResUNetCTDice 0.5773 ⚠
skin_clsSkinEfficientNet-B4DermoscopyMelAUC 0.8995
spine_clsSpineHybridSpineNetMRIMeanAUC 0.7112
⚠ Liver segmentation (Dice 0.5773) is research preview only β€” binary tumor segmentation due to dataset limitations. Not for clinical use.
Platform

Authentication

NeuroScope AI uses Microsoft Entra ID (formerly Azure AD) for SSO. All API endpoints (except /health, /register, /tos, /dpa, /docs) require a valid Bearer token.

http
Authorization: Bearer <microsoft_access_token>

Tokens are obtained via the Microsoft OAuth2 flow. The UI handles this automatically via the Sign in with Microsoft button.

Platform

Roles & Access Control

RoleAccess LevelPermissions
superadminGlobalAll endpoints, all hospitals, system config
adminHospitalApprove users, view all hospital scans, manage settings
clinicianHospitalUpload scans, view results, export FHIR, provide feedback
viewerHospitalView scan results only β€” read-only access
API Reference

Core Endpoints

Base URL: https://tejansree-neuroscope-ai.hf.space

MethodEndpointAuthDescription
GET/healthNoneAPI status, model count, version
GET/modelsNoneList all loaded models and status
GET/uiNoneMain dashboard HTML
GET/registerNoneHospital registration form
GET/tosNoneTerms of Service
GET/dpaNoneData Processing Agreement
GET/docsNoneThis documentation page

Scan Analysis

MethodEndpointDescription
POST/scanUpload and analyze a single medical scan
POST/scan/batchBatch analyze multiple scans
GET/scan/{scan_id}Retrieve a previous scan result
GET/scan/{scan_id}/fhirFHIR R4 DiagnosticReport export
GET/patient/{id}/historyAll scans for a patient
GET/scan/{id}/feedbackGet clinician feedback on a scan
POST/scan/{id}/feedbackSubmit clinician feedback

POST /scan β€” Example

python
res = requests.post(
    "https://tejansree-neuroscope-ai.hf.space/scan",
    headers={"Authorization": "Bearer TOKEN"},
    files={"file": open("scan.jpg", "rb")},
    data={
        "cancer_type": "brain",   # brain|lung|breast|liver|skin|spine
        "patient_id":  "PT-2024-001",
        "patient_age": "52",
        "patient_sex": "female",
    }
)
data = res.json()
print(data["verdict"])     # CANCER_DETECTED / NORMAL / REVIEW_REQUIRED
print(data["confidence"])  # 0.934
print(data["icd10"])       # C71.9

Hospital Management

MethodEndpointRoleDescription
POST/hospital/registerPublicSubmit hospital registration
GET/hospital/approvalAnyCheck registration status
POST/hospital/approveSuperadminApprove a pending hospital
POST/hospital/rejectSuperadminReject a pending hospital
GET/hospital/listSuperadminList all hospitals
GET/hospital/statsAdmin+Hospital usage statistics

Admin Endpoints

MethodEndpointDescription
GET/auth/auditAudit log (last N entries)
GET/auth/usersList users for current hospital
GET/admin/statsPlatform-wide statistics
POST/federated/submitSubmit federated learning update
GET/federated/statusFederated learning round status

FHIR Export

Every scan can be exported as a FHIR R4 DiagnosticReport with ICD-10 coding and NCCN treatment recommendations.

json
{
  "resourceType": "DiagnosticReport",
  "status":       "final",
  "code":         { "text": "NeuroScope AI Analysis β€” Brain MRI" },
  "conclusion":   "CANCER_DETECTED: Glioblastoma (93.4%)",
  "conclusionCode": [{
    "coding": [{ "system": "http://hl7.org/fhir/sid/icd-10", "code": "C71.9" }]
  }]
}
Reference

Cancer Pipelines

Pipelinecancer_type valueInputICD-10Status
BrainbrainMRI (JPEG/NIfTI)C71.xProduction
LunglungCT scan (JPEG)C34.xProduction
BreastbreastUltrasound (JPEG)C50.xProduction
LiverliverCT scan (JPEG)C22.xResearch Preview
SkinskinDermoscopy (JPEG)C43.xProduction
SpinespineMRI (JPEG)C41.2Production