How taufiq-1705/irisvison-ai works
Iris Vision is a retinal-image classification product with a FastAPI dashboard/API and a PyTorch model-development workflow. A user submits an image; the API validates and preprocesses it, applies the documented two-layer OOD defense and returns a disease prediction. The repository also supports dataset preparation and audit, training, evaluation/Grad-CAM, and model comparison. The source excerpts are partial, so some internal links are supported by the SOURCE INDEX or README rather than shown call sites; unsampled details are not inferred.
Main entry points: main.py API and dashboard · dataset.py Dataset splits and loading · train.py Classifier training · evaluate.py Test evaluation and Grad-CAM
Components 15
Prediction Service
- API and dashboard
app/main.py - Prediction response
app/main.py
Image Inference
- Image validation
src/image_validator.py - Fundus preprocessing
src/preprocess.py - Binary gatekeeper
app/main.py - Disease classifier
src/model.py
Dataset Operations
- Dataset splits and loading
src/dataset.py - OOD data preparation
src/prepare_ood_data.py - Dataset audit
src/audit_dataset.py
Model Development
- Project configuration
src/config.py - Classifier training
src/train.py - Gatekeeper training
src/train_gatekeeper.py
Evaluation
- Test evaluation and Grad-CAM
src/evaluate.py - Model comparison
src/compare_models.py
Other components
- Image submitter
Connections 21
- Image submitter → API and dashboard: submits image
README.md - API and dashboard → Image validation: validates upload
app/main.py - API and dashboard → Fundus preprocessing: preprocesses image
app/main.py - API and dashboard → Binary gatekeeper: checks eye input
app/main.py - API and dashboard → Disease classifier: classifies image
README.md - API and dashboard → Prediction response: returns result
README.md - Dataset splits and loading → Fundus preprocessing: uses preprocessing
src/dataset.py - Dataset audit → Fundus preprocessing: uses preprocessing
src/audit_dataset.py - Dataset audit → Project configuration: reads settings
src/audit_dataset.py - OOD data preparation → Project configuration: reads paths
src/prepare_ood_data.py - Classifier training → Dataset splits and loading: loads splits
src/train.py - Classifier training → Disease classifier: trains model
src/train.py - Classifier training → Project configuration: reads settings
src/train.py - Gatekeeper training → Dataset splits and loading: loads splits
src/train_gatekeeper.py - Gatekeeper training → Disease classifier: trains model
src/train_gatekeeper.py - Gatekeeper training → Classifier training: reuses training utilities
src/train_gatekeeper.py - Test evaluation and Grad-CAM → Dataset splits and loading: loads test data
src/evaluate.py - Test evaluation and Grad-CAM → Disease classifier: evaluates model
src/evaluate.py - Test evaluation and Grad-CAM → Fundus preprocessing: uses preprocessing
src/evaluate.py - Model comparison → Test evaluation and Grad-CAM: uses evaluation
src/compare_models.py - Model comparison → Dataset splits and loading: loads data
src/compare_models.py