Skip to content

This is the official repository of the paper "Artifact-based Domain Generalization of Skin Lesion Models", accepted at the ISIC Workshop @ ECCV 2022.

Notifications You must be signed in to change notification settings

alceubissoto/artifact-generalization-skin

Repository files navigation

Artifact-based Domain Generalization of Skin Lesion Models

This is the official repository of the paper "Artifact-based Domain Generalization of Skin Lesion Models", accepted at the ISIC Workshop @ ECCV 2022.

Reproducing our results:

Data

The training/validation/test data is passed through two specific parameters:

{train|val|test}_csv : is a csv containing the list of samples on the set. On folder trap_sets, we include all the csvs used in the work, which are based on ISIC 2019.

root_dir: is the directory where samples can be found. Alternatively, it is possible to include the full path on the csvs mentioned above.

The confounder annotation is at the file, which is referenced in the code at

self.attrs_df = pd.read_csv('/artifact-generalization-skin/isic_inferred_wocarcinoma.csv')

For running the out-of-distribution evaluation, include images on the folder datasets. They are loaded at

test_ds_atlas_clin = CSVDataset('/artifact-generalization-skin/datasets/edraAtlas', '/artifact-generalization-skin/datasets/edraAtlas/atlas-clinical-all.csv', 'image', 'label', transform=get_transform_skin(False), add_extension='.jpg')
test_ds_atlas_derm = CSVDataset('/artifact-generalization-skin/datasets/edraAtlas', '/artifact-generalization-skin/datasets/edraAtlas/atlas-dermato-all.csv', 'image', 'label',transform=get_transform_skin(False), add_extension='.jpg')
test_ds_ph2 = CSVDataset('/artifact-generalization-skin/datasets/ph2images/', '/artifact-generalization-skin/datasets/ph2images/ph2.csv', 'image', 'label',transform=get_transform_skin(False), add_extension='.jpg')
test_ds_padufes = CSVDataset('/artifact-generalization-skin/datasets/pad-ufes/', '/artifact-generalization-skin/datasets/pad-ufes/padufes-test-wocarc.csv', 'img_id', 'label',transform=get_transform_skin(False), add_extension=None)

General

  • The code is fully prepared to use wandb, but it is disabled by default.
  • We make use of the sacred library, allowing the organization of the results by folder, according to the name passed in the parameter exp_name.
  • We make available the script to run all trainings and evaluations.

About

This is the official repository of the paper "Artifact-based Domain Generalization of Skin Lesion Models", accepted at the ISIC Workshop @ ECCV 2022.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published