| --- |
| license: cc-by-nc-nd-4.0 |
| language: |
| - en |
| tags: |
| - ensemble |
| - medical-imaging |
| - ipf |
| - survival-prediction |
| - ct-scan |
| --- |
| |
| # ORACLE-IPF: CT-based IPF Survival Prediction |
|
|
| This repository hosts an ensemble of 5 models trained for idiopathic pulmonary fibrosis (IPF) survival analysis using chest CT scans. |
|
|
| ## Repository Structure |
|
|
| ``` |
| ORACLE-IPF/ |
| βββ README.md # Model card (this file) |
| βββ inference/ # Inference pipeline |
| β βββ README.md # Inference documentation |
| β βββ checkpoints/ # Pre-trained model weights |
| β β βββ weight1.ckpt # Ensemble model 1 |
| β β βββ weight2.ckpt # Ensemble model 2 |
| β β βββ weight3.ckpt # Ensemble model 3 |
| β β βββ weight4.ckpt # Ensemble model 4 |
| β β βββ weight5.ckpt # Ensemble model 5 |
| β βββ config/ |
| β β βββ checkpoints.yaml # Checkpoint configuration |
| β β βββ patients.yaml # Sample patient configuration |
| β βββ requirements.txt # Python dependencies |
| β βββ run_inference.sh # Shell script to run inference |
| β βββ src/ |
| β β βββ __init__.py |
| β β βββ ensemble.py # Ensemble prediction logic |
| β β βββ inference.py # Main inference script |
| β βββ tests/ |
| β βββ __init__.py |
| β βββ test_results.py # Result validation tests |
| β |
| βββ training/ # Training pipeline |
| βββ README.md # Training documentation |
| βββ .gitignore # Git ignore rules |
| βββ .huggingfaceignore # HuggingFace ignore rules |
| βββ config/ |
| β βββ train_config.yaml # Training hyperparameters |
| βββ scripts/ |
| β βββ prepare_data.sh # Data preparation script |
| β βββ train.sh # Training launch script |
| βββ training_data_sample/ # Sample training data (de-identified) |
| β βββ ct{1,2,3}/ # Sample CT cases |
| β βββ ct.npy # CT volume (D, H, W) |
| β βββ meta.json # DICOM metadata |
| β βββ LungTexture.Obj.Honeycomb.npy # Honeycomb pattern mask |
| β βββ LungTexture.Obj.Reticular.npy # Reticular pattern mask |
| β βββ LungTexture.Obj.Normal.npy # Normal lung mask |
| βββ src/ |
| βββ __init__.py |
| βββ config.py # Model configuration (ModelArgs) |
| βββ dataset.py # PyTorch dataset for IPF data |
| βββ prepare_masks.py # IPF mask preparation script |
| βββ train.py # Main training script |
| βββ models/ |
| βββ __init__.py |
| βββ oracle.py # ORACLE model architecture |
| βββ cumulative_probability_layer.py # Survival probability layer |
| βββ pooling_layer.py # Feature pooling layer |
| βββ regressor.py # Regression head |
| ``` |
|
|
| ## Model Architecture |
|
|
| - **Architecture**: ORACLE / ORACLEDoubleDensity |
| - **Backbone**: R3D-18 (pretrained on Kinetics-400) |
| - **Input**: CT volume (B, 3, 200, 256, 256) with clinical features (sex, age) |
| - **Output**: The model outputs cumulative survival probabilities at annual horizons from 1 to 5 years, plus one additional probability for the subsequent time interval beyond 5 years (B, 6) |
|
|
| ## Data Format |
|
|
| ### Input Data |
| - CT volume: 3D numpy array (D, H, W) in Hounsfield Units |
| - Lung texture masks (for training only): Binary masks for Honeycomb, Reticular, and Normal patterns (obtained from AVIEW, Coreline, Seoul, Korea) |
| - Metadata: Patient demographics (sex, age at CT scan) |
|
|
| ### Processed Data |
| - IPF mask (i.e., fibrosis mask): Union of Honeycomb and Reticular patterns |
| - Fibrosis density: Ratio computed from Fibrosis (Honeycomb or Reticular) and Normal masks |
|
|
| --- |
|
|
| ## Access and Usage Conditions |
|
|
| The distribution of these model weights is subject to the following conditions. |
| By requesting and receiving access, you agree that: |
|
|
| - The weights are provided **solely for non-commercial research and educational purposes**. |
| - Any attempt to use the model for commercial applications, product development, or deployment beyond academic research requires **separate written permission from the authors**. |
| - Users must respect privacy standards and **must not attempt to identify or re-identify any individual from the model outputs**. |
| - Any use of the model in academic work must include a **formal citation of the associated publication**: |
| > [TBU: DOI] |
| - The model has been **developed for academic and research purposes** and has not undergone regulatory validation for clinical deployment. |
| - The authors and affiliated institution retain **all intellectual property rights** and disclaim any responsibility for misuse. |
|
|
| --- |
|
|
| ## License |
|
|
| This work is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License](https://creativecommons.org/licenses/by-nc-nd/4.0/). |
|
|