Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/api/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ Available Datasets
datasets/pyhealth.datasets.BMDHSDataset
datasets/pyhealth.datasets.COVID19CXRDataset
datasets/pyhealth.datasets.ChestXray14Dataset
datasets/pyhealth.datasets.ISIC2018Dataset
datasets/pyhealth.datasets.ISIC2018ArtifactsDataset
datasets/pyhealth.datasets.PH2Dataset
datasets/pyhealth.datasets.TUABDataset
datasets/pyhealth.datasets.TUEVDataset
datasets/pyhealth.datasets.ClinVarDataset
Expand Down
34 changes: 34 additions & 0 deletions docs/api/datasets/pyhealth.datasets.ISIC2018ArtifactsDataset.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pyhealth.datasets.ISIC2018ArtifactsDataset
======================================

A dataset class for dermoscopy images paired with per-image artifact
annotations. The default annotation file is ``isic_bias.csv`` from
Bissoto et al. (2020), but any CSV following the same column format can be
supplied via the ``annotations_csv`` parameter.

**Default data sources (Bissoto et al. 2020)**

Using ``ISIC2018ArtifactsDataset`` with the default annotation CSV requires
**two separate downloads**:

1. **Artifact annotations** (``isic_bias.csv``):
https://github.com/alceubissoto/debiasing-skin

See ``artefacts-annotation/`` in that repository for the annotation files.

Reference:
Bissoto et al. "Debiasing Skin Lesion Datasets and Models? Not So Fast",
ISIC Skin Image Analysis Workshop @ CVPR 2020.

2. **ISIC 2018 Task 1/2 images & masks** (~8 GB):
https://challenge.isic-archive.com/data/#2018

* Training images: ``ISIC2018_Task1-2_Training_Input.zip``
* Segmentation masks: ``ISIC2018_Task1_Training_GroundTruth.zip``

Both can be fetched automatically by passing ``download=True``.

.. autoclass:: pyhealth.datasets.ISIC2018ArtifactsDataset
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/api/datasets/pyhealth.datasets.ISIC2018Dataset.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pyhealth.datasets.ISIC2018Dataset
===================================

Unified dataset class for the ISIC 2018 challenge, supporting both
**Task 1/2** (lesion segmentation & attribute detection) and **Task 3**
(7-class skin lesion classification) via the ``task`` argument.

For more information see `the ISIC 2018 challenge page <https://challenge.isic-archive.com/data/#2018>`_.

.. note::
**Licenses differ by task:**

* ``task="task1_2"`` — `CC-0 (Public Domain) <https://creativecommons.org/share-your-work/public-domain/cc0/>`_.
No attribution required.
* ``task="task3"`` — `CC-BY-NC 4.0 <https://creativecommons.org/licenses/by-nc/4.0/>`_.
Attribution is required; commercial use is not permitted.

.. autoclass:: pyhealth.datasets.ISIC2018Dataset
:members:
:undoc-members:
:show-inheritance:
47 changes: 47 additions & 0 deletions docs/api/datasets/pyhealth.datasets.PH2Dataset.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pyhealth.datasets.PH2Dataset
============================

A dataset class for the **PH2 dermoscopy database** — 200 dermoscopic
images of melanocytic lesions labelled as Common Nevus (80), Atypical
Nevus (80), or Melanoma (40).

Two source formats are supported automatically:

* **Mirror format** (recommended for quick start): flat JPEG images and a
``PH2_simple_dataset.csv`` from the community mirror
`vikaschouhan/PH2-dataset <https://github.com/vikaschouhan/PH2-dataset>`_.
Pass ``download=True`` to fetch this automatically.

* **Original format**: nested BMP images and expert annotations from the
`official ADDI project release <https://www.fc.up.pt/addi/ph2%20database.html>`_
(requires registration). Place the extracted ``PH2_Dataset_images/``
directory inside *root* and the dataset will use it automatically.

**Data source**

Teresa Mendonça, Pedro M. Ferreira, Jorge Marques, Andre R.S. Marcal,
Jorge Rozeira. "PH² - A dermoscopic image database for research and
benchmarking", 35th International Conference on Engineering in Medicine
and Biology Society, EMBC'13, pp. 5437-5440, IEEE, 2013.

License: free for non-commercial research purposes. See the
`ADDI project page <https://www.fc.up.pt/addi/ph2%20database.html>`_ for
full terms.

**Quick start**

.. code-block:: python

from pyhealth.datasets import PH2Dataset
from pyhealth.tasks import PH2MelanomaClassification

# Download mirror automatically
dataset = PH2Dataset(root="~/ph2", download=True)

# Apply 3-class melanoma classification task
samples = dataset.set_task(PH2MelanomaClassification())

.. autoclass:: pyhealth.datasets.PH2Dataset
:members:
:undoc-members:
:show-inheritance:
3 changes: 3 additions & 0 deletions docs/api/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ Available Tasks
Benchmark EHRShot <tasks/pyhealth.tasks.benchmark_ehrshot>
ChestX-ray14 Binary Classification <tasks/pyhealth.tasks.ChestXray14BinaryClassification>
ChestX-ray14 Multilabel Classification <tasks/pyhealth.tasks.ChestXray14MultilabelClassification>
ISIC 2018 Skin Lesion Classification <tasks/pyhealth.tasks.ISIC2018Classification>
ISIC 2018 Dermoscopic Artifacts Classification <tasks/pyhealth.tasks.ISIC2018ArtifactsBinaryClassification>
PH2 Melanoma Classification <tasks/pyhealth.tasks.PH2MelanomaClassification>
Variant Classification (ClinVar) <tasks/pyhealth.tasks.VariantClassificationClinVar>
Mutation Pathogenicity (COSMIC) <tasks/pyhealth.tasks.MutationPathogenicityPrediction>
Cancer Survival Prediction (TCGA) <tasks/pyhealth.tasks.CancerSurvivalPrediction>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyhealth.tasks.ISIC2018ArtifactsBinaryClassification
=====================================================

.. autoclass:: pyhealth.tasks.ISIC2018ArtifactsBinaryClassification
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/tasks/pyhealth.tasks.ISIC2018Classification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyhealth.tasks.ISIC2018Classification
=======================================

.. autoclass:: pyhealth.tasks.ISIC2018Classification
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/tasks/pyhealth.tasks.PH2MelanomaClassification.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pyhealth.tasks.PH2MelanomaClassification
=========================================

.. autoclass:: pyhealth.tasks.PH2MelanomaClassification
:members:
:undoc-members:
:show-inheritance:
Loading