Skip to content

[UIUC CS598 LHO/DL4H, fanz6] ISIC2018 + PH2 + Diffusion + Training + Eval#928

Open
ffanzhang wants to merge 22 commits intosunlabuiuc:masterfrom
ffanzhang:fanz6_ISIC2018
Open

[UIUC CS598 LHO/DL4H, fanz6] ISIC2018 + PH2 + Diffusion + Training + Eval#928
ffanzhang wants to merge 22 commits intosunlabuiuc:masterfrom
ffanzhang:fanz6_ISIC2018

Conversation

@ffanzhang
Copy link
Copy Markdown

@ffanzhang ffanzhang commented Apr 1, 2026

Name: Fan Zhang
NetID: fanz6
Email: fanz6@illinois.edu
Type of contribution: Dataset + Task
Paper: https://proceedings.mlr.press/v287/jin25b.html

Implementation:

Datasets

Files of Interest

examples/isic2018_train_resnet50.py
  • Trains a ResNet-50 melanoma classifier on ISIC 2018 with 5-fold cross-validation
  • Supports multiple image modes (whole, lesion, background, bbox) and frequency filtering (high/low)
  • Saves per-fold checkpoints used by downstream evaluation scripts
examples/isic2018_artifacts_train_lora_sd15.py
  • Trains a DreamBooth+LoRA model (SD 1.5) per artifact type on ISIC 2018 artifact-labeled images
  • Matches paper §3.3: rank-64 LoRA on UNet + CLIP text encoder, rare token per artifact, prior preservation
  • Artifacts: dark_corner, hair, gel_bubble, ruler, ink, patches
  • Saves LoRA adapters to ~/lora_checkpoints/{artifact}/
examples/ph2_train_resnet50.py
  • Trains a ResNet-50 melanoma classifier on PH2 with 5-fold cross-validation
  • Used as the PH2-trained baseline in Table 4 evaluation
examples/ph2_diffusion_sd.py
  • Generates artifact-augmented PH2 images using SD inpainting + trained LoRA adapters
  • Programmatic seeds (hair strands, ink marks, ruler strips, etc.) guide SD inpainting per artifact
  • Outputs ~/ph2_augmented/{artifact}/{image_id}.jpg and augmented_metadata.csv
examples/ph2_artifacts_test_resnet50.py
  • Replicates Table 4 from Jin et al. (CHIL 2025): evaluates ResNet-50 classifiers (trained on PH2 or ISIC) on diffusion-augmented PH2 images
  • Reports AUROC per artifact condition across 5 folds for both classifier sources

@ffanzhang ffanzhang changed the title ISIC2018 Dataset (UIUC CS598 LHO/DL4H, fanz6) [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset Apr 1, 2026
@ffanzhang ffanzhang changed the title [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset + ISCS2018 Artifacts Dataset Apr 2, 2026
@ffanzhang ffanzhang changed the title [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset + ISCS2018 Artifacts Dataset [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset + ISCS2018 Artifacts Dataset + Classification Training Example Apr 12, 2026
@ffanzhang ffanzhang changed the title [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset + ISCS2018 Artifacts Dataset + Classification Training Example [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset + ISCS2018 Artifacts Dataset + Training Example Apr 12, 2026
@ffanzhang ffanzhang changed the title [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 Dataset + ISCS2018 Artifacts Dataset + Training Example [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 + PH2 + Training + Eval + Diffusion Apr 16, 2026
@ffanzhang ffanzhang changed the title [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 + PH2 + Training + Eval + Diffusion [UIUC CS598 LHO/DL4H, fanz6] ISIC2018 + PH2 + Diffusion + Training + Eval Apr 16, 2026
@ffanzhang ffanzhang marked this pull request as ready for review April 21, 2026 01:47
Copy link
Copy Markdown
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the examples here use your pyhealth loaders.

--test Smoke-test mode: 3 images, 1 epoch, 10 prior images
"""

import argparse
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing PyHealth related here.

Copy link
Copy Markdown
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tldr; The PyHealth loaders/tasks look pretty good. But, it seems none of the examples here use it to do anything/training. For reference SampleDataset is effectively the same thing as a PyTorchDataset class but with precached tensors.

@ffanzhang
Copy link
Copy Markdown
Author

None of the examples here use your pyhealth loaders.

I will refactor to use pyhealth loaders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants