How niranjan20069019-pixel/oncolens_ai works
OncoLens AI supports clinical oncology imaging workflows: users authenticate, submit scans, receive model classifications and Grad-CAM explanations, and access saved history and reports. The documented Streamlit dashboard and API are represented alongside the React frontend present in the tree; their runtime linkage is not established by the sampled excerpts. The prediction pipeline exposes validation, preprocessing, inference, explainability, and persistence stages. Edges are limited to calls shown in excerpts, SOURCE INDEX references, or README statements; unsampled feature links are omitted where evidence is insufficient.
Main entry points: api API routes · prediction_service.py Prediction pipeline · api_client.py Dashboard API client · main.py FastAPI application
Components 25
User interfaces
- Clinical dashboard
app/frontend - Web frontend
frontend/src - Dashboard API client
app/frontend/api_client.py
API and access
- FastAPI application
app/main.py - API routes
app/api - Authentication
app/api/v1/auth.py - JWT access control
app/auth - Request and result schemas
app/models/schemas.py - Prediction endpoint
app/api/v1/predict.py - History endpoint
app/api/v1/history.py - Progress WebSocket
app/api/v1/websocket.py - Health checks
app/api/v1/health.py - Configuration
app/utils/config.py
Imaging analysis
- Image preprocessing
app/ml/preprocessor.py - DICOM loading
app/ml/dicom_loader.py - Tumor classifier
app/ml/inference.py - Grad-CAM explainability
app/ml/gradcam.py
Clinical services
- Prediction pipeline
app/services/prediction_service.py - Clinical analytics
app/services/analytics.py - PDF reports
app/services/report_service.py - Progress hub
app/services/progress_hub.py
Persistence
- Clinical records
app/database/models.py - Record operations
app/database/crud.py - Database sessions
app/database/session.py
Other components
- Clinician / patient
Connections 34
- Clinician / patient → Clinical dashboard: uses
README.md - Clinician / patient → Web frontend: uses
- Clinical dashboard → Dashboard API client: calls
app/frontend/pages/doctor_workspace.py - Dashboard API client → FastAPI application: HTTP requests
app/frontend/api_client.py - FastAPI application → API routes: registers
app/main.py - API routes → Authentication: registers
app/api/router.py - API routes → Prediction endpoint: registers
app/api/router.py - API routes → History endpoint: registers
app/api/router.py - API routes → Progress WebSocket: registers
app/api/router.py - API routes → Health checks: registers
app/api/router.py - Authentication → JWT access control: authenticates
app/api/v1/auth.py - JWT access control → Record operations: looks up users
app/auth/dependencies.py - Record operations → Clinical records: reads and writes
app/database/crud.py - FastAPI application → Database sessions: initializes
app/main.py - Database sessions → Clinical records: creates schema
app/database/session.py - Prediction endpoint → Prediction pipeline: runs
app/api/v1/predict.py - Prediction endpoint → JWT access control: checks access
app/api/v1/predict.py - Prediction pipeline → Image preprocessing: preprocesses via
- Image preprocessing → DICOM loading: loads via
app/ml/preprocessor.py - Prediction pipeline → Tumor classifier: runs
app/services/prediction_service.py - Tumor classifier → Image preprocessing: preprocesses with
app/ml/inference.py - Tumor classifier → Grad-CAM explainability: generates map
app/ml/inference.py - Prediction pipeline → Clinical analytics: builds payload
app/services/prediction_service.py - Prediction pipeline → Record operations: saves scan
app/services/prediction_service.py - Prediction pipeline → Progress hub: emits stages
app/services/prediction_service.py - Progress WebSocket → Progress hub: streams updates
app/api/v1/websocket.py - History endpoint → Record operations: queries history
app/api/v1/history.py - Dashboard API client → Progress WebSocket: subscribes
app/frontend/api_client.py - Dashboard API client → History endpoint: fetches history
- Dashboard API client → PDF reports: downloads PDF
- Health checks → Tumor classifier: checks model
app/api/v1/health.py - FastAPI application → Configuration: configures
app/main.py - Tumor classifier → Configuration: loads settings
app/ml/inference.py - Web frontend → FastAPI application: API integration