From cddf829b3b71783e097a07afa7042721edfaa7e5 Mon Sep 17 00:00:00 2001 From: ioangatop Date: Fri, 1 Mar 2024 12:56:58 +0100 Subject: [PATCH] Rename `CRC-HE` to `CRC` (#189) --- README.md | 2 +- .../offline/{crc_he_nonorm.yaml => crc.yaml} | 10 +++---- .../offline/{crc_he.yaml => crc_nonorm.yaml} | 8 +++--- .../online/{crc_he.yaml => crc.yaml} | 8 +++--- .../{crc_he_nonorm.yaml => crc_nonorm.yaml} | 8 +++--- docs/datasets/{crc_he.md => crc.md} | 27 ++++++++++++------- docs/datasets/index.md | 12 ++++----- src/eva/vision/data/datasets/__init__.py | 8 +++--- .../data/datasets/classification/__init__.py | 12 ++++++--- .../classification/{crc_he.py => crc.py} | 6 ++--- .../{crc_he_nonorm.py => crc_nonorm.py} | 6 ++--- .../CRC-VAL-HE-7K/ADI/ADI-SIHVHHPH.tif | 0 .../CRC-VAL-HE-7K/ADI/ADI-SIHWWQMY.tif | 0 .../CRC-VAL-HE-7K/BACK/BACK-YYYHKNMK.tif | 0 .../CRC-VAL-HE-7K/BACK/BACK-YYYMDTNW.tif | 0 .../CRC-VAL-HE-7K/DEB/DEB-YYYRSHLP.tif | 0 .../CRC-VAL-HE-7K/DEB/DEB-YYYTCTDR.tif | 0 .../CRC-VAL-HE-7K/LYM/LYM-YYWRPGDD.tif | 0 .../CRC-VAL-HE-7K/LYM/LYM-YYYTKMWW.tif | 0 .../CRC-VAL-HE-7K/MUC/MUC-YYYNWSAM.tif | 0 .../CRC-VAL-HE-7K/MUC/MUC-YYYRQDLW.tif | 0 .../CRC-VAL-HE-7K/MUS/MUS-YYYNVQVQ.tif | 0 .../CRC-VAL-HE-7K/MUS/MUS-YYYRWWNH.tif | 0 .../CRC-VAL-HE-7K/NORM/NORM-YYTTIRVD.tif | 0 .../CRC-VAL-HE-7K/NORM/NORM-YYVAFTKA.tif | 0 .../CRC-VAL-HE-7K/STR/STR-YYYHNSSM.tif | 0 .../CRC-VAL-HE-7K/STR/STR-YYYWVWFG.tif | 0 .../CRC-VAL-HE-7K/TUM/TUM-YYYSGWYW.tif | 0 .../CRC-VAL-HE-7K/TUM/TUM-YYYYQFVN.tif | 0 .../ADI/ADI-SIHVHHPH.tif | 0 .../ADI/ADI-SIHWWQMY.tif | 0 .../BACK/BACK-YYYHKNMK.tif | 0 .../BACK/BACK-YYYMDTNW.tif | 0 .../DEB/DEB-YYYRSHLP.tif | 0 .../DEB/DEB-YYYTCTDR.tif | 0 .../LYM/LYM-YYWRPGDD.tif | 0 .../LYM/LYM-YYYTKMWW.tif | 0 .../MUC/MUC-YYYNWSAM.tif | 0 .../MUC/MUC-YYYRQDLW.tif | 0 .../MUS/MUS-YYYNVQVQ.tif | 0 .../MUS/MUS-YYYRWWNH.tif | 0 .../NORM/NORM-YYTTIRVD.tif | 0 .../NORM/NORM-YYVAFTKA.tif | 0 .../STR/STR-YYYHNSSM.tif | 0 .../STR/STR-YYYWVWFG.tif | 0 .../TUM/TUM-YYYSGWYW.tif | 0 .../TUM/TUM-YYYYQFVN.tif | 0 .../NCT-CRC-HE-100K/ADI/ADI-SIHVHHPH.tif | 0 .../NCT-CRC-HE-100K/ADI/ADI-SIHWWQMY.tif | 0 .../NCT-CRC-HE-100K/BACK/BACK-YYYHKNMK.tif | 0 .../NCT-CRC-HE-100K/BACK/BACK-YYYMDTNW.tif | 0 .../NCT-CRC-HE-100K/DEB/DEB-YYYRSHLP.tif | 0 .../NCT-CRC-HE-100K/DEB/DEB-YYYTCTDR.tif | 0 .../NCT-CRC-HE-100K/LYM/LYM-YYWRPGDD.tif | 0 .../NCT-CRC-HE-100K/LYM/LYM-YYYTKMWW.tif | 0 .../NCT-CRC-HE-100K/MUC/MUC-YYYNWSAM.tif | 0 .../NCT-CRC-HE-100K/MUC/MUC-YYYRQDLW.tif | 0 .../NCT-CRC-HE-100K/MUS/MUS-YYYNVQVQ.tif | 0 .../NCT-CRC-HE-100K/MUS/MUS-YYYRWWNH.tif | 0 .../NCT-CRC-HE-100K/NORM/NORM-YYTTIRVD.tif | 0 .../NCT-CRC-HE-100K/NORM/NORM-YYVAFTKA.tif | 0 .../NCT-CRC-HE-100K/STR/STR-YYYHNSSM.tif | 0 .../NCT-CRC-HE-100K/STR/STR-YYYWVWFG.tif | 0 .../NCT-CRC-HE-100K/TUM/TUM-YYYSGWYW.tif | 0 .../NCT-CRC-HE-100K/TUM/TUM-YYYYQFVN.tif | 0 .../{test_crc_he.py => test_crc.py} | 14 +++++----- ...st_crc_he_nonorm.py => test_crc_nonorm.py} | 14 +++++----- 67 files changed, 74 insertions(+), 61 deletions(-) rename configs/vision/dino_vits16/offline/{crc_he_nonorm.yaml => crc.yaml} (93%) rename configs/vision/dino_vits16/offline/{crc_he.yaml => crc_nonorm.yaml} (95%) rename configs/vision/dino_vits16/online/{crc_he.yaml => crc.yaml} (93%) rename configs/vision/dino_vits16/online/{crc_he_nonorm.yaml => crc_nonorm.yaml} (93%) rename docs/datasets/{crc_he.md => crc.md} (75%) rename src/eva/vision/data/datasets/classification/{crc_he.py => crc.py} (97%) rename src/eva/vision/data/datasets/classification/{crc_he_nonorm.py => crc_nonorm.py} (97%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/ADI/ADI-SIHVHHPH.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/ADI/ADI-SIHWWQMY.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/BACK/BACK-YYYHKNMK.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/BACK/BACK-YYYMDTNW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/DEB/DEB-YYYRSHLP.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/DEB/DEB-YYYTCTDR.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/LYM/LYM-YYWRPGDD.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/LYM/LYM-YYYTKMWW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/MUC/MUC-YYYNWSAM.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/MUC/MUC-YYYRQDLW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/MUS/MUS-YYYNVQVQ.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/MUS/MUS-YYYRWWNH.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/NORM/NORM-YYTTIRVD.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/NORM/NORM-YYVAFTKA.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/STR/STR-YYYHNSSM.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/STR/STR-YYYWVWFG.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/TUM/TUM-YYYSGWYW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/CRC-VAL-HE-7K/TUM/TUM-YYYYQFVN.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHVHHPH.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHWWQMY.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYHKNMK.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYMDTNW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYRSHLP.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYTCTDR.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYWRPGDD.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYYTKMWW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYNWSAM.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYRQDLW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYNVQVQ.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYRWWNH.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYTTIRVD.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYVAFTKA.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/STR/STR-YYYHNSSM.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/STR/STR-YYYWVWFG.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYSGWYW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYYQFVN.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/ADI/ADI-SIHVHHPH.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/ADI/ADI-SIHWWQMY.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/BACK/BACK-YYYHKNMK.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/BACK/BACK-YYYMDTNW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/DEB/DEB-YYYRSHLP.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/DEB/DEB-YYYTCTDR.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/LYM/LYM-YYWRPGDD.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/LYM/LYM-YYYTKMWW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/MUC/MUC-YYYNWSAM.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/MUC/MUC-YYYRQDLW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/MUS/MUS-YYYNVQVQ.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/MUS/MUS-YYYRWWNH.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/NORM/NORM-YYTTIRVD.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/NORM/NORM-YYVAFTKA.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/STR/STR-YYYHNSSM.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/STR/STR-YYYWVWFG.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/TUM/TUM-YYYSGWYW.tif (100%) rename tests/eva/assets/vision/datasets/{crc_he => crc}/NCT-CRC-HE-100K/TUM/TUM-YYYYQFVN.tif (100%) rename tests/eva/vision/data/datasets/classification/{test_crc_he.py => test_crc.py} (74%) rename tests/eva/vision/data/datasets/classification/{test_crc_he_nonorm.py => test_crc_nonorm.py} (73%) diff --git a/README.md b/README.md index a7a3f407..5766a931 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The following datasets are supported ### Vision - [BACH](./docs/datasets/bach.md) -- [CRC-HE](./docs/datasets/crc_he.md) +- [CRC](./docs/datasets/crc.md) - [PatchCamelyon](./docs/datasets/patch_camelyon.md) - [TotalSegmentator](./docs/datasets/total_segmentator.md) diff --git a/configs/vision/dino_vits16/offline/crc_he_nonorm.yaml b/configs/vision/dino_vits16/offline/crc.yaml similarity index 93% rename from configs/vision/dino_vits16/offline/crc_he_nonorm.yaml rename to configs/vision/dino_vits16/offline/crc.yaml index 9b1b3032..74717f20 100644 --- a/configs/vision/dino_vits16/offline/crc_he_nonorm.yaml +++ b/configs/vision/dino_vits16/offline/crc.yaml @@ -2,7 +2,7 @@ trainer: class_path: eva.Trainer init_args: - default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/offline/crc_he_nonorm} + default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/dino_vits16/offline/crc} max_steps: &MAX_STEPS 12500 callbacks: - class_path: pytorch_lightning.callbacks.LearningRateMonitor @@ -23,7 +23,7 @@ trainer: mode: *MONITOR_METRIC_MODE - class_path: eva.callbacks.EmbeddingsWriter init_args: - output_dir: &EMBEDDINGS_DIR ${oc.env:EMBEDDINGS_ROOT, ./data/embeddings}/crc_he_nonorm + output_dir: &EMBEDDINGS_DIR ${oc.env:EMBEDDINGS_ROOT, ./data/embeddings}/crc dataloader_idx_map: 0: train 1: val @@ -83,9 +83,9 @@ data: <<: *DATASET_ARGS split: val predict: - - class_path: eva.vision.datasets.CRC_HE_NONORM + - class_path: eva.vision.datasets.CRC init_args: &PREDICT_DATASET_ARGS - root: ${oc.env:DATA_ROOT, ./data}/crc_he + root: ${oc.env:DATA_ROOT, ./data}/crc split: train download: ${oc.env:DOWNLOAD_DATA, true} image_transforms: @@ -93,7 +93,7 @@ data: init_args: mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] - - class_path: eva.vision.datasets.CRC_HE_NONORM + - class_path: eva.vision.datasets.CRC init_args: <<: *PREDICT_DATASET_ARGS split: val diff --git a/configs/vision/dino_vits16/offline/crc_he.yaml b/configs/vision/dino_vits16/offline/crc_nonorm.yaml similarity index 95% rename from configs/vision/dino_vits16/offline/crc_he.yaml rename to configs/vision/dino_vits16/offline/crc_nonorm.yaml index 166efca4..5d4809b8 100644 --- a/configs/vision/dino_vits16/offline/crc_he.yaml +++ b/configs/vision/dino_vits16/offline/crc_nonorm.yaml @@ -2,7 +2,7 @@ trainer: class_path: eva.Trainer init_args: - default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/offline/crc_he} + default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/dino_vits16/offline/crc_nonorm} max_steps: &MAX_STEPS 12500 callbacks: - class_path: pytorch_lightning.callbacks.LearningRateMonitor @@ -23,7 +23,7 @@ trainer: mode: *MONITOR_METRIC_MODE - class_path: eva.callbacks.EmbeddingsWriter init_args: - output_dir: &EMBEDDINGS_DIR ${oc.env:EMBEDDINGS_ROOT, ./data/embeddings}/crc_he + output_dir: &EMBEDDINGS_DIR ${oc.env:EMBEDDINGS_ROOT, ./data/embeddings}/crc_nonorm dataloader_idx_map: 0: train 1: val @@ -83,7 +83,7 @@ data: <<: *DATASET_ARGS split: val predict: - - class_path: eva.vision.datasets.CRC_HE + - class_path: eva.vision.datasets.CRC_NONORM init_args: &PREDICT_DATASET_ARGS root: ${oc.env:DATA_ROOT, ./data}/crc_he split: train @@ -93,7 +93,7 @@ data: init_args: mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] - - class_path: eva.vision.datasets.CRC_HE + - class_path: eva.vision.datasets.CRC_NONORM init_args: <<: *PREDICT_DATASET_ARGS split: val diff --git a/configs/vision/dino_vits16/online/crc_he.yaml b/configs/vision/dino_vits16/online/crc.yaml similarity index 93% rename from configs/vision/dino_vits16/online/crc_he.yaml rename to configs/vision/dino_vits16/online/crc.yaml index 1ee5533d..90107577 100644 --- a/configs/vision/dino_vits16/online/crc_he.yaml +++ b/configs/vision/dino_vits16/online/crc.yaml @@ -2,7 +2,7 @@ trainer: class_path: eva.Trainer init_args: - default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/online/crc_he} + default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/dino_vits16/online/crc} max_steps: &MAX_STEPS 12500 callbacks: - class_path: pytorch_lightning.callbacks.LearningRateMonitor @@ -65,9 +65,9 @@ data: init_args: datasets: train: - class_path: eva.vision.datasets.CRC_HE + class_path: eva.vision.datasets.CRC init_args: &DATASET_ARGS - root: ${oc.env:DATA_ROOT, ./data}/crc_he + root: ${oc.env:DATA_ROOT, ./data}/crc split: train download: ${oc.env:DOWNLOAD_DATA, true} image_transforms: @@ -76,7 +76,7 @@ data: mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] val: - class_path: eva.vision.datasets.CRC_HE + class_path: eva.vision.datasets.CRC init_args: <<: *DATASET_ARGS split: val diff --git a/configs/vision/dino_vits16/online/crc_he_nonorm.yaml b/configs/vision/dino_vits16/online/crc_nonorm.yaml similarity index 93% rename from configs/vision/dino_vits16/online/crc_he_nonorm.yaml rename to configs/vision/dino_vits16/online/crc_nonorm.yaml index 68d3e808..2ddc3890 100644 --- a/configs/vision/dino_vits16/online/crc_he_nonorm.yaml +++ b/configs/vision/dino_vits16/online/crc_nonorm.yaml @@ -2,7 +2,7 @@ trainer: class_path: eva.Trainer init_args: - default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/offline/crc_he} + default_root_dir: &LIGHTNING_ROOT ${oc.env:LIGHTNING_ROOT, logs/dino_vits16/online/crc_nonorm} max_steps: &MAX_STEPS 12500 callbacks: - class_path: pytorch_lightning.callbacks.LearningRateMonitor @@ -65,9 +65,9 @@ data: init_args: datasets: train: - class_path: eva.vision.datasets.CRC_HE_NONORM + class_path: eva.vision.datasets.CRC_NONORM init_args: &DATASET_ARGS - root: ${oc.env:DATA_ROOT, ./data}/crc_he + root: ${oc.env:DATA_ROOT, ./data}/crc split: train download: ${oc.env:DOWNLOAD_DATA, true} image_transforms: @@ -76,7 +76,7 @@ data: mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] val: - class_path: eva.vision.datasets.CRC_HE_NONORM + class_path: eva.vision.datasets.CRC_NONORM init_args: <<: *DATASET_ARGS split: val diff --git a/docs/datasets/crc_he.md b/docs/datasets/crc.md similarity index 75% rename from docs/datasets/crc_he.md rename to docs/datasets/crc.md index 1f1af63d..bbc4b2b9 100644 --- a/docs/datasets/crc_he.md +++ b/docs/datasets/crc.md @@ -1,4 +1,4 @@ -# CRC-HE +# CRC The CRC-HE dataset consists of labelled patches (9 classes) from colorectal cancer (CRC) and normal tissue. We use the `NCT-CRC-HE-100K` dataset for training and validation and the `CRC-VAL-HE-7K for testing`. @@ -19,19 +19,19 @@ The tissue classes are: Adipose (ADI), background (BACK), debris (DEB), lymphocy | **Image dimension** | 224 x 224 x 3 | | **FoV (μm/px)** | 20x (0.5) | | **Files format** | `.tif` images | -| **Number of images** | 107,180 (100k train, 7.2k val) | -| **Splits in use** | NCT-CRC-HE-100K-NONORM (train), CRC-VAL-HE-7K (val) | +| **Number of images** | 107,180 (100k train, 7.2k val) | +| **Splits in use** | NCT-CRC-HE-100K (train), CRC-VAL-HE-7K (val) | ### Splits We use the splits according to the data sources: - - Train split: `NCT-CRC-HE-100K-NONORM` + - Train split: `NCT-CRC-HE-100K` - Validation split: `CRC-VAL-HE-7K` -| Splits | Train | Validation | -|---|-----------------|--------------| +| Splits | Train | Validation | +|----------|-----------------|--------------| | #Samples | 100,000 (93.3%) | 7,180 (6.7%) | A test split is not provided. Because the patient information for the training data is not available, dividing the @@ -40,9 +40,18 @@ __eva__ therefore reports evaluation results for CRC HE on the validation split. ### Organization -The data `NCT-CRC-HE-100K-NONORM.zip` and `CRC-VAL-HE-7K.zip` from [zenodo](https://zenodo.org/records/1214456) are organized as follows: +The data `NCT-CRC-HE-100K.zip`, `NCT-CRC-HE-100K-NONORM.zip` and `CRC-VAL-HE-7K.zip` +from [zenodo](https://zenodo.org/records/1214456) are organized as follows: ``` +NCT-CRC-HE-100K # All images used for training +├── ADI # All labelled patches belonging to the 1st class +│ ├── ADI-AAAFLCLY.tif +│ ├── ... +├── BACK # All labelled patches belonging to the 2nd class +│ ├── ... +└── ... + NCT-CRC-HE-100K-NONORM # All images used for training ├── ADI # All labelled patches belonging to the 1st class │ ├── ADI-AAAFLCLY.tif @@ -58,12 +67,12 @@ CRC-VAL-HE-7K # All images used for validation ## Download and preprocessing -The `CRC_HE` dataset class supports download the data no runtime with the initialized argument +The `CRC` dataset class supports download the data no runtime with the initialized argument `download: bool = True`. ## Relevant links -* [CRC-HE datasets on zenodo](https://zenodo.org/records/1214456) +* [CRC datasets on zenodo](https://zenodo.org/records/1214456) * [Reference API Vision dataset classes](../reference/vision/data/datasets.md) diff --git a/docs/datasets/index.md b/docs/datasets/index.md index 8b051d0c..3131c327 100644 --- a/docs/datasets/index.md +++ b/docs/datasets/index.md @@ -1,16 +1,16 @@ # Datasets -**eva** provides out-of-the-box support for several public datasets. When possible, the corresponding dataset classes facilitate automatic download to disk, if not possible, this documentation provides download instructions. +**eva** provides native support for several public datasets. When possible, the corresponding dataset classes facilitate automatic download to disk, if not possible, this documentation provides download instructions. ## Vision Datasets Overview ### Whole Slide (WSI) and microscopy image datasets -| Dataset | #Patches | Patch Size | FoV (μm/px) | Task | Cancer Type | Download provided -|------------------------------------|----------|------------|---|----------------------------|-------------| ---| -| [BACH](bach.md) | 400 | 2048x1536 | 20x (0.5) | Classification (4 classes) | Breast | Yes | -| [CRC HE](crc_he.md) | 107,180 | 224x224 | 20x (0.5) | Classification (9 classes) | Colorectal | Yes | -| [PatchCamelyon](patch_camelyon.md) | 327,680 | 96x96 | 10x (1.0) \* | Classification (2 classes) | Breast | Yes | +| Dataset | #Patches | Patch Size | FoV (μm/px) | Task | Cancer Type | +|------------------------------------|----------|------------|--------------|----------------------------|-------------| +| [BACH](bach.md) | 400 | 2048x1536 | 20x (0.5) | Classification (4 classes) | Breast | +| [CRC](crc.md) | 107,180 | 224x224 | 20x (0.5) | Classification (9 classes) | Colorectal | +| [PatchCamelyon](patch_camelyon.md) | 327,680 | 96x96 | 10x (1.0) \* | Classification (2 classes) | Breast | \* The slides were acquired and digitized at 2 different centres using a 40x objective but under-sampled to 10x to increase the field of view. Some papers do categorize it as 10x. diff --git a/src/eva/vision/data/datasets/__init__.py b/src/eva/vision/data/datasets/__init__.py index 8541cadd..86601366 100644 --- a/src/eva/vision/data/datasets/__init__.py +++ b/src/eva/vision/data/datasets/__init__.py @@ -2,8 +2,8 @@ from eva.vision.data.datasets.classification import ( BACH, - CRC_HE, - CRC_HE_NONORM, + CRC, + CRC_NONORM, PatchCamelyon, TotalSegmentatorClassification, ) @@ -13,8 +13,8 @@ __all__ = [ "BACH", - "CRC_HE", - "CRC_HE_NONORM", + "CRC", + "CRC_NONORM", "PatchEmbeddingDataset", "ImageSegmentation", "SlideEmbeddingDataset", diff --git a/src/eva/vision/data/datasets/classification/__init__.py b/src/eva/vision/data/datasets/classification/__init__.py index 77bb4ecb..127ddf51 100644 --- a/src/eva/vision/data/datasets/classification/__init__.py +++ b/src/eva/vision/data/datasets/classification/__init__.py @@ -1,9 +1,15 @@ """Image classification datasets API.""" from eva.vision.data.datasets.classification.bach import BACH -from eva.vision.data.datasets.classification.crc_he import CRC_HE -from eva.vision.data.datasets.classification.crc_he_nonorm import CRC_HE_NONORM +from eva.vision.data.datasets.classification.crc import CRC +from eva.vision.data.datasets.classification.crc_nonorm import CRC_NONORM from eva.vision.data.datasets.classification.patch_camelyon import PatchCamelyon from eva.vision.data.datasets.classification.total_segmentator import TotalSegmentatorClassification -__all__ = ["BACH", "CRC_HE", "CRC_HE_NONORM", "PatchCamelyon", "TotalSegmentatorClassification"] +__all__ = [ + "BACH", + "CRC", + "CRC_NONORM", + "PatchCamelyon", + "TotalSegmentatorClassification", +] diff --git a/src/eva/vision/data/datasets/classification/crc_he.py b/src/eva/vision/data/datasets/classification/crc.py similarity index 97% rename from src/eva/vision/data/datasets/classification/crc_he.py rename to src/eva/vision/data/datasets/classification/crc.py index 1d15d716..4a4ac4de 100644 --- a/src/eva/vision/data/datasets/classification/crc_he.py +++ b/src/eva/vision/data/datasets/classification/crc.py @@ -1,4 +1,4 @@ -"""CRC-HE dataset class.""" +"""CRC dataset class.""" import os from typing import Callable, Dict, List, Literal, Tuple @@ -12,8 +12,8 @@ from eva.vision.utils import io -class CRC_HE(base.ImageClassification): - """Dataset class for CRC-HE images and corresponding targets.""" +class CRC(base.ImageClassification): + """Dataset class for CRC images and corresponding targets.""" _train_resource: structs.DownloadResource = structs.DownloadResource( filename="NCT-CRC-HE-100K.zip", diff --git a/src/eva/vision/data/datasets/classification/crc_he_nonorm.py b/src/eva/vision/data/datasets/classification/crc_nonorm.py similarity index 97% rename from src/eva/vision/data/datasets/classification/crc_he_nonorm.py rename to src/eva/vision/data/datasets/classification/crc_nonorm.py index 6050b1d5..14345e5a 100644 --- a/src/eva/vision/data/datasets/classification/crc_he_nonorm.py +++ b/src/eva/vision/data/datasets/classification/crc_nonorm.py @@ -1,4 +1,4 @@ -"""CRC-HE-NONORM dataset class.""" +"""CRC-NONORM dataset class.""" import os from typing import Callable, Dict, List, Literal, Tuple @@ -12,8 +12,8 @@ from eva.vision.utils import io -class CRC_HE_NONORM(base.ImageClassification): - """Dataset class for CRC-HE-NONORM images and corresponding targets.""" +class CRC_NONORM(base.ImageClassification): + """Dataset class for CRC-NONORM images and corresponding targets.""" _train_resource: structs.DownloadResource = structs.DownloadResource( filename="NCT-CRC-HE-100K-NONORM.zip", diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/ADI/ADI-SIHVHHPH.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/ADI/ADI-SIHVHHPH.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/ADI/ADI-SIHVHHPH.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/ADI/ADI-SIHVHHPH.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/ADI/ADI-SIHWWQMY.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/ADI/ADI-SIHWWQMY.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/ADI/ADI-SIHWWQMY.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/ADI/ADI-SIHWWQMY.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/BACK/BACK-YYYHKNMK.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/BACK/BACK-YYYHKNMK.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/BACK/BACK-YYYHKNMK.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/BACK/BACK-YYYHKNMK.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/BACK/BACK-YYYMDTNW.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/BACK/BACK-YYYMDTNW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/BACK/BACK-YYYMDTNW.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/BACK/BACK-YYYMDTNW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/DEB/DEB-YYYRSHLP.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/DEB/DEB-YYYRSHLP.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/DEB/DEB-YYYRSHLP.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/DEB/DEB-YYYRSHLP.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/DEB/DEB-YYYTCTDR.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/DEB/DEB-YYYTCTDR.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/DEB/DEB-YYYTCTDR.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/DEB/DEB-YYYTCTDR.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/LYM/LYM-YYWRPGDD.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/LYM/LYM-YYWRPGDD.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/LYM/LYM-YYWRPGDD.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/LYM/LYM-YYWRPGDD.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/LYM/LYM-YYYTKMWW.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/LYM/LYM-YYYTKMWW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/LYM/LYM-YYYTKMWW.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/LYM/LYM-YYYTKMWW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUC/MUC-YYYNWSAM.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUC/MUC-YYYNWSAM.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUC/MUC-YYYNWSAM.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUC/MUC-YYYNWSAM.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUC/MUC-YYYRQDLW.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUC/MUC-YYYRQDLW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUC/MUC-YYYRQDLW.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUC/MUC-YYYRQDLW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUS/MUS-YYYNVQVQ.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUS/MUS-YYYNVQVQ.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUS/MUS-YYYNVQVQ.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUS/MUS-YYYNVQVQ.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUS/MUS-YYYRWWNH.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUS/MUS-YYYRWWNH.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/MUS/MUS-YYYRWWNH.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/MUS/MUS-YYYRWWNH.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/NORM/NORM-YYTTIRVD.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/NORM/NORM-YYTTIRVD.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/NORM/NORM-YYTTIRVD.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/NORM/NORM-YYTTIRVD.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/NORM/NORM-YYVAFTKA.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/NORM/NORM-YYVAFTKA.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/NORM/NORM-YYVAFTKA.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/NORM/NORM-YYVAFTKA.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/STR/STR-YYYHNSSM.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/STR/STR-YYYHNSSM.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/STR/STR-YYYHNSSM.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/STR/STR-YYYHNSSM.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/STR/STR-YYYWVWFG.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/STR/STR-YYYWVWFG.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/STR/STR-YYYWVWFG.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/STR/STR-YYYWVWFG.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/TUM/TUM-YYYSGWYW.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/TUM/TUM-YYYSGWYW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/TUM/TUM-YYYSGWYW.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/TUM/TUM-YYYSGWYW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/TUM/TUM-YYYYQFVN.tif b/tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/TUM/TUM-YYYYQFVN.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/CRC-VAL-HE-7K/TUM/TUM-YYYYQFVN.tif rename to tests/eva/assets/vision/datasets/crc/CRC-VAL-HE-7K/TUM/TUM-YYYYQFVN.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHVHHPH.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHVHHPH.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHVHHPH.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHVHHPH.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHWWQMY.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHWWQMY.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHWWQMY.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/ADI/ADI-SIHWWQMY.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYHKNMK.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYHKNMK.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYHKNMK.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYHKNMK.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYMDTNW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYMDTNW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYMDTNW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/BACK/BACK-YYYMDTNW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYRSHLP.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYRSHLP.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYRSHLP.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYRSHLP.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYTCTDR.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYTCTDR.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYTCTDR.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/DEB/DEB-YYYTCTDR.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYWRPGDD.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYWRPGDD.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYWRPGDD.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYWRPGDD.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYYTKMWW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYYTKMWW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYYTKMWW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/LYM/LYM-YYYTKMWW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYNWSAM.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYNWSAM.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYNWSAM.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYNWSAM.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYRQDLW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYRQDLW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYRQDLW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUC/MUC-YYYRQDLW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYNVQVQ.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYNVQVQ.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYNVQVQ.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYNVQVQ.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYRWWNH.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYRWWNH.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYRWWNH.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/MUS/MUS-YYYRWWNH.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYTTIRVD.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYTTIRVD.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYTTIRVD.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYTTIRVD.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYVAFTKA.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYVAFTKA.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYVAFTKA.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/NORM/NORM-YYVAFTKA.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/STR/STR-YYYHNSSM.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/STR/STR-YYYHNSSM.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/STR/STR-YYYHNSSM.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/STR/STR-YYYHNSSM.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/STR/STR-YYYWVWFG.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/STR/STR-YYYWVWFG.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/STR/STR-YYYWVWFG.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/STR/STR-YYYWVWFG.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYSGWYW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYSGWYW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYSGWYW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYSGWYW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYYQFVN.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYYQFVN.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYYQFVN.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K-NONORM/TUM/TUM-YYYYQFVN.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/ADI/ADI-SIHVHHPH.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/ADI/ADI-SIHVHHPH.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/ADI/ADI-SIHVHHPH.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/ADI/ADI-SIHVHHPH.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/ADI/ADI-SIHWWQMY.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/ADI/ADI-SIHWWQMY.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/ADI/ADI-SIHWWQMY.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/ADI/ADI-SIHWWQMY.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/BACK/BACK-YYYHKNMK.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/BACK/BACK-YYYHKNMK.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/BACK/BACK-YYYHKNMK.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/BACK/BACK-YYYHKNMK.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/BACK/BACK-YYYMDTNW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/BACK/BACK-YYYMDTNW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/BACK/BACK-YYYMDTNW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/BACK/BACK-YYYMDTNW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/DEB/DEB-YYYRSHLP.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/DEB/DEB-YYYRSHLP.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/DEB/DEB-YYYRSHLP.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/DEB/DEB-YYYRSHLP.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/DEB/DEB-YYYTCTDR.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/DEB/DEB-YYYTCTDR.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/DEB/DEB-YYYTCTDR.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/DEB/DEB-YYYTCTDR.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/LYM/LYM-YYWRPGDD.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/LYM/LYM-YYWRPGDD.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/LYM/LYM-YYWRPGDD.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/LYM/LYM-YYWRPGDD.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/LYM/LYM-YYYTKMWW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/LYM/LYM-YYYTKMWW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/LYM/LYM-YYYTKMWW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/LYM/LYM-YYYTKMWW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUC/MUC-YYYNWSAM.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUC/MUC-YYYNWSAM.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUC/MUC-YYYNWSAM.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUC/MUC-YYYNWSAM.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUC/MUC-YYYRQDLW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUC/MUC-YYYRQDLW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUC/MUC-YYYRQDLW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUC/MUC-YYYRQDLW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUS/MUS-YYYNVQVQ.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUS/MUS-YYYNVQVQ.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUS/MUS-YYYNVQVQ.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUS/MUS-YYYNVQVQ.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUS/MUS-YYYRWWNH.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUS/MUS-YYYRWWNH.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/MUS/MUS-YYYRWWNH.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/MUS/MUS-YYYRWWNH.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/NORM/NORM-YYTTIRVD.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/NORM/NORM-YYTTIRVD.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/NORM/NORM-YYTTIRVD.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/NORM/NORM-YYTTIRVD.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/NORM/NORM-YYVAFTKA.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/NORM/NORM-YYVAFTKA.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/NORM/NORM-YYVAFTKA.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/NORM/NORM-YYVAFTKA.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/STR/STR-YYYHNSSM.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/STR/STR-YYYHNSSM.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/STR/STR-YYYHNSSM.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/STR/STR-YYYHNSSM.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/STR/STR-YYYWVWFG.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/STR/STR-YYYWVWFG.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/STR/STR-YYYWVWFG.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/STR/STR-YYYWVWFG.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/TUM/TUM-YYYSGWYW.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/TUM/TUM-YYYSGWYW.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/TUM/TUM-YYYSGWYW.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/TUM/TUM-YYYSGWYW.tif diff --git a/tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/TUM/TUM-YYYYQFVN.tif b/tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/TUM/TUM-YYYYQFVN.tif similarity index 100% rename from tests/eva/assets/vision/datasets/crc_he/NCT-CRC-HE-100K/TUM/TUM-YYYYQFVN.tif rename to tests/eva/assets/vision/datasets/crc/NCT-CRC-HE-100K/TUM/TUM-YYYYQFVN.tif diff --git a/tests/eva/vision/data/datasets/classification/test_crc_he.py b/tests/eva/vision/data/datasets/classification/test_crc.py similarity index 74% rename from tests/eva/vision/data/datasets/classification/test_crc_he.py rename to tests/eva/vision/data/datasets/classification/test_crc.py index 33a8b17f..be2bb402 100644 --- a/tests/eva/vision/data/datasets/classification/test_crc_he.py +++ b/tests/eva/vision/data/datasets/classification/test_crc.py @@ -1,4 +1,4 @@ -"""CRC_HE dataset tests.""" +"""CRC dataset tests.""" import os from typing import Literal @@ -18,10 +18,10 @@ ("val", 2), ], ) -def test_sample(crc_he_dataset: datasets.CRC_HE, index: int) -> None: +def test_sample(crc_dataset: datasets.CRC, index: int) -> None: """Tests the format of a dataset sample.""" # assert data sample is a tuple - sample = crc_he_dataset[index] + sample = crc_dataset[index] assert isinstance(sample, tuple) assert len(sample) == 2 # assert the format of the `image` and `target` @@ -33,10 +33,10 @@ def test_sample(crc_he_dataset: datasets.CRC_HE, index: int) -> None: @pytest.fixture(scope="function") -def crc_he_dataset(split: Literal["train", "val"], assets_path: str) -> datasets.CRC_HE: - """CRC_HE dataset fixture.""" - dataset = datasets.CRC_HE( - root=os.path.join(assets_path, "vision", "datasets", "crc_he"), +def crc_dataset(split: Literal["train", "val"], assets_path: str) -> datasets.CRC: + """CRC dataset fixture.""" + dataset = datasets.CRC( + root=os.path.join(assets_path, "vision", "datasets", "crc"), split=split, ) dataset.prepare_data() diff --git a/tests/eva/vision/data/datasets/classification/test_crc_he_nonorm.py b/tests/eva/vision/data/datasets/classification/test_crc_nonorm.py similarity index 73% rename from tests/eva/vision/data/datasets/classification/test_crc_he_nonorm.py rename to tests/eva/vision/data/datasets/classification/test_crc_nonorm.py index 68d02436..9f585388 100644 --- a/tests/eva/vision/data/datasets/classification/test_crc_he_nonorm.py +++ b/tests/eva/vision/data/datasets/classification/test_crc_nonorm.py @@ -1,4 +1,4 @@ -"""CRC_HE_NONORM dataset tests.""" +"""CRC_NONORM dataset tests.""" import os from typing import Literal @@ -18,10 +18,10 @@ ("val", 2), ], ) -def test_sample(crc_he_nonorm_dataset: datasets.CRC_HE_NONORM, index: int) -> None: +def test_sample(crc_nonorm_dataset: datasets.CRC_NONORM, index: int) -> None: """Tests the format of a dataset sample.""" # assert data sample is a tuple - sample = crc_he_nonorm_dataset[index] + sample = crc_nonorm_dataset[index] assert isinstance(sample, tuple) assert len(sample) == 2 # assert the format of the `image` and `target` @@ -33,12 +33,10 @@ def test_sample(crc_he_nonorm_dataset: datasets.CRC_HE_NONORM, index: int) -> No @pytest.fixture(scope="function") -def crc_he_nonorm_dataset( - split: Literal["train", "val"], assets_path: str -) -> datasets.CRC_HE_NONORM: +def crc_nonorm_dataset(split: Literal["train", "val"], assets_path: str) -> datasets.CRC_NONORM: """CRC_HE_NONORM dataset fixture.""" - dataset = datasets.CRC_HE_NONORM( - root=os.path.join(assets_path, "vision", "datasets", "crc_he"), + dataset = datasets.CRC_NONORM( + root=os.path.join(assets_path, "vision", "datasets", "crc"), split=split, ) dataset.prepare_data()