shrinkhalContact

Two medical-imaging projects, end to end

Every number here is quoted from the project’s README.

Lung nodule detection

Research prototype, not a medical device. Labels are radiologist consensus, not biopsy.

Scope
Research prototype
Dataset
LIDC-IDRI
897 scans, 1,192 nodules
Architecture
LoG blob detector + 3D CNN, 5-seed ensemble
Evaluation
CPM 0.823
95% CI 0.767–0.868
Artifacts
predict.py
Gradio demo
Built with
Claude (code)
Design, evaluation: mine

Problem

Find lung nodules in a full chest CT scan: the ones that at least 3 of 4 radiologists marked and that are 3 mm or larger. The system says nothing about cancer.

Data

  • LIDC-IDRI: 1,010 patients and 1,018 CT scans, with up to 4 radiologists per scan.
  • Slices of 2.5 mm or thinner; a nodule is ≥ 3 mm and marked by ≥ 3 of 4 readers. That gives 897 scans and 1,192 nodules.
  • Split by patient, 70/15/15: train 628 scans, validation 134 scans (147 nodules), test 135 scans (225 nodules). The test set was opened once.

Method

  1. Fetch LIDC-IDRI scans and the radiologists’ marks.
  2. Isolate the lungs: Hounsfield units, 1 mm voxels, a lung mask.
  3. Nominate candidates with a Laplacian-of-Gaussian blob detector at 7 sizes (high recall, no training).
  4. Discard false candidates with a 3D CNN on 32 mm cubes, using HU, blobness and vesselness channels, as a 5-seed ensemble.
  5. Explain each finding with occlusion maps, checked against random weights.
  6. Rate with FROC, CPM and bootstrap confidence intervals.
  7. Ship as predict.py and a Gradio demo.

Each model change had to beat the one before it by more than the seed-to-seed spread. Bundling several tricks at once made results worse (0.717 vs 0.778 on validation), so changes were tested one at a time.

Results

Test set, 135 scans / 225 nodules. CPM is the mean sensitivity at 1/8 to 8 false alarms per scan; the interval is a 95% bootstrap CI over scans.
ModelCPM95% CIFound at 1 false alarm / scan
No learning (blob strength only)0.0580.031–0.0945.3%
3D CNN, 5 seeds0.7970.725–0.84783.1%
Shipped model (shape channels), 5 seeds0.8230.767–0.86883.6%

At 4 false alarms per scan the shipped model finds 90.2% of nodules. Its gain over the plain 3D CNN (+0.026) is small and only weakly supported.

FROC curve on the test set: share of nodules found against false alarms per scan for three models. The shipped model reaches CPM 0.823, the plain 3D CNN 0.797 and the no-learning baseline 0.058.
FROC on the test set (135 scans, 225 nodules, opened once). The dashed line marks one false alarm per scan.
Test CPM with 95% bootstrap confidence intervals: no learning 0.058, 3D CNN 0.797, shipped model 0.823. The two learned models overlap heavily.
The two learned models overlap: the shipped model is ahead by +0.026, with a 95% CI of +0.001 to +0.078.
Bar chart on a log scale: about 20,860 blob-detector peaks per scan, 2,643 kept, and about 1 shown at one false alarm per scan, with 83.6% of test nodules found.
From about 20,000 candidates per scan to about one, while keeping 83.6% of test nodules.
Three test nodules the model found, each shown as a CT slice, its occlusion map and a random-weights control map.
Found: CT slice, occlusion map, and the same map from random weights as a control.
Three test nodules the model missed, each shown as a CT slice, its occlusion map and a random-weights control map.
Missed: three test nodules the model did not find.

Figures exported from the project repository. CT images: LIDC-IDRI, The Cancer Imaging Archive, CC BY 3.0.

Where it fails

Known failure modes

  • Small nodules (3–6 mm): 63% found at one false alarm per scan.
  • 7 of 225 test nodules are never proposed by the blob detector, so no later stage can find them.
  • One dataset only, no external hospital; the test set is small (CI width about ±0.05 CPM).
Bar chart of nodules found by size: 3 to 6 mm 0.63, 6 to 10 mm 0.85, 10 to 20 mm 0.90, 20 to 30 mm 0.89, over 30 mm 0.60 from only 5 cases.
Small nodules are the weak spot: 3–6 mm nodules are found 63% of the time at one false alarm per scan (n = 27).

Reproduce

pip install -r requirements.txt
gh release download v1.0 -p "lungdet-v1.0-hush-r5-weights.zip" && unzip lungdet-v1.0-hush-r5-weights.zip -d models
python predict.py /path/to/dicom_folder --fp-per-scan 1 --out out/

Read the code and full results on GitHub

Hybrid explainable AI for nodule malignancy

Research prototype, not a medical device. Labels are radiologists’ malignancy ratings, not biopsy results.

Scope
Research prototype
Dataset
LIDC-IDRI patches
151 held-out nodules
Architecture
3D ResNet-18 + tabular MLP, learned gate
Evaluation
AUC ≈ 0.90 image-only
5 seeds
Artifacts
Streamlit app
occlusion maps
Built with
Claude (code)
Design, evaluation: mine

Problem

Given a 3D CT patch around a lung nodule, predict whether radiologists rated it malignant, and test whether adding tabular features to the image helps.

Data

  • LIDC-IDRI nodules as 3D patches resampled to 1 mm voxels, with a patient-disjoint split.
  • Held-out test set of 151 nodules; every model trained with 5 seeds.
  • 15 tabular features, of which 3 are radiologist ratings given by the same readers who gave the label.

Method

  • A: Random Forest, 150 trees.
  • B: 3D ResNet-18 on the CT patch alone.
  • C: Hybrid — the same image encoder plus a tabular MLP, joined by a learned gate.
  • An ablation gives the Random Forest and the Hybrid only the 12 features computed from the CT image.

Results

Test AUC, mean over 5 seeds. With all 15 features the radiologist ratings leak the label, so the image-only row is the honest one.
ModelAll 15 features12 image features only
A: Random Forest0.9420.666
B: 3D ResNet-180.8970.901
C: Hybrid0.9090.901

From the CT image alone the models reach about 0.90 AUC. The Hybrid is no better than the image-only ResNet: the gate passes almost nothing from the table. Without the ratings the Random Forest collapses, because it was mostly reading the answer key. Among the explainers, occlusion maps localise the nodule best and are the default.

ROC curves on the 151 held-out test nodules using image features only, seed 42: Random Forest AUC 0.667, 3D ResNet-18 0.889, Hybrid 0.901.
One seed (42), image features only: without the radiologist ratings the Random Forest drops to 0.667 AUC, while the CNNs stay near 0.90.
Grid of four test nodules, each with the CT slice and five explanation maps: Grad-CAM at three layers and an 8 mm occlusion map.
Where each method says the evidence is. Occlusion lands on the nodule more often; Grad-CAM at the last layer spreads over the whole patch.

Figures exported from the project repository. CT images: LIDC-IDRI, The Cancer Imaging Archive, CC BY 3.0.

Where it fails

Known failure modes

  • Classification, not detection: patches are centred on annotated nodules.
  • Explanations localise the nodule only about half the time.
  • Probabilities are not calibrated, and there is no external validation.

Reproduce

pip install -r requirements.txt
python -m pytest tests/ -q
NODULE_RESULTS_DIR=results/phase7_R/all/seed_42 streamlit run app/streamlit_app.py

Read the code and full results on GitHub

Also built

Small browser tools: ML lab developer utilities.

Contact

I’m looking for early-career roles in machine learning and computer vision, and I take on research and project work.

Based in Karnataka. From Dehradun.