PyHealth icon indicating copy to clipboard operation
PyHealth copied to clipboard

Add PH2 Dataset + Task

Open plpratyusha opened this issue 1 month ago • 0 comments

Type: Dataset, Task Contribution Name: Pratyusha Pogaru Net ID: ppogaru2 Paper: A Study of Artifacts on Melanoma Classification under Diffusion-Based Perturbations Paper Link: https://proceedings.mlr.press/v287/jin25b.html Dataset Referenced by paper: https://www.kaggle.com/datasets/spacesurfer/ph2-dataset

Description: This PR adds support for the PH2 dermoscopic image dataset in PyHealth, including:

  • PH2Dataset class for loading images and processing metadata
  • PH2MelanomaClassification task for classifying lesions into common nevus, atypical nevus, or melanoma
  • YAML configuration file for the dataset (ph2.yaml)
  • Unit tests for dataset loading and task sample generation (test_ph2.py)
  • Updates to init.py files in the datasets and tasks folders to include the new classes

This enables users to easily load PH2 images, access their labels, and integrate them into PyHealth workflows.

Files added: pyhealth/datasets/ph2.py pyhealth/datasets/configs/ph2.yaml pyhealth/tasks/ph2_task.py tests/todo/test_datasets/test_ph2.py

Files changed: pyhealth/datasets/init.py pyhealth/tasks/init.py

plpratyusha avatar Dec 06 '25 19:12 plpratyusha