diff --git a/cell_cycle/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_inference.py b/cell_cycle/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..1b4d5afef51491f9cb4907ab3c6f7a2eebf301b4 --- /dev/null +++ b/cell_cycle/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_full_circle_augs_2560_crop_inference import ( + dataset, +) + +dataset = replace( + dataset, path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset_full_circle_augmented" +) diff --git a/cell_cycle/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..c03ee29545d35168424e0d9541358fd77f66791f --- /dev/null +++ b/cell_cycle/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered_inference.py @@ -0,0 +1,15 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_inference import dataset +from GaussianProxy.utils.data import ContinuousTimeImageDataset + +assert dataset.dataset_params is not None +updated_ds_params = replace(dataset.dataset_params, dataset_class=ContinuousTimeImageDataset) + +dataset = replace( + dataset, + fully_ordered=True, + path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset/train", + path_to_single_parquet="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset/diabetic_retinopathy__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=updated_ds_params, +) diff --git a/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context.yaml b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4301cfd2c648085445c33cb570d1a0941930efa0 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context.yaml @@ -0,0 +1,16 @@ +name: ependymal_context +path: /projects/static2dynamic/datasets/ependymal/prepared_dataset_context +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_avg_t_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_avg_t_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..83ce32546f7aa4e097ca079b7ae975bbaec9c701 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_avg_t_fully_ordered_inference.py @@ -0,0 +1,31 @@ +from dataclasses import replace +from pathlib import Path + +from GaussianProxy.conf.dataset.ependymal_context.ependymal_context_fully_ordered_inference import dataset +from GaussianProxy.conf.training_conf import DatasetParams +from GaussianProxy.utils.data import ContinuousTimeImageDataset + + +# separate gt needs a workaround for sorting_func +def sorting_func(subdir: Path): + if subdir.name == "all_imgs": + return 0 + else: + raise ValueError(f"unexpected subdir: {subdir}") + + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=sorting_func, + dataset_class=ContinuousTimeImageDataset, +) + +dataset = replace( + dataset, + name="ependymal_context_avg_t_separate_gt_fully_ordered", + path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_context_avg_pt_from_01_noised_facebook_dinov2-with-registers-giant/all_imgs", + path_to_single_parquet="/projects/static2dynamic/datasets/ependymal/prepared_dataset_context_avg_pt_from_01_noised_facebook_dinov2-with-registers-giant/ependymal_context__continuous_time_predictions__avg_t_preds.parquet", + dataset_params=ds_params, + separate_gt_starting_class_path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_context/0" +) diff --git a/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..b62649854264f1653da9f1d727421730615f77b1 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_fully_ordered_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ependymal_context.ependymal_context_fully_ordered_inference import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_context", + path_to_single_parquet="/projects/static2dynamic/datasets/ependymal/ependymal_context__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", +) diff --git a/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_inference.py b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..f9514fb17a5910cb32bfd7692534a4fefe2ee78d --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_context/ependymal_context_inference.py @@ -0,0 +1,32 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 256 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="ependymal_context", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_context", + selected_dists=["0", "3", "5", "7", "9", "16", "30"], # ignore .REMOVED_IMAGES/16 (imaging artifacts) +) diff --git a/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml new file mode 100644 index 0000000000000000000000000000000000000000..67fc08a415914501a2d04527a3555ddc498f32f4 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml @@ -0,0 +1,17 @@ +name: ependymal_cutout +path: /projects/static2dynamic/datasets/ependymal/prepared_dataset_crop +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: [ 1, 2, 3, 4, 5, 6 ] # 0 is the trash class! diff --git a/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_separate_gt_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_separate_gt_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..78831c83cf12fa8195f69374c62e062891df20d1 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_separate_gt_fully_ordered_inference.py @@ -0,0 +1,19 @@ +from dataclasses import replace + +from GaussianProxy.utils.data import ContinuousTimeImageDataset +from my_conf.dataset.ependymal_cutout.ependymal_cutout_01_noised_separate_gt_inference import dataset + +assert dataset.dataset_params is not None +dataset_params = replace( + dataset.dataset_params, + dataset_class=ContinuousTimeImageDataset, +) + +dataset = replace( + dataset, + fully_ordered=True, + path_to_single_parquet="/projects/static2dynamic/datasets/ependymal/ependymal_cutout_01_noised__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=dataset_params, + selected_dists=["all_imgs"], + separate_gt_starting_class_path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_noised_0.1_crop/ground_truths/1", +) diff --git a/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_separate_gt_inference.py b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_separate_gt_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..1488a0a561caa8c1bec58486911ed82232b08293 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_separate_gt_inference.py @@ -0,0 +1,18 @@ +from dataclasses import replace +from pathlib import Path + +from GaussianProxy.conf.dataset.ependymal_cutout.ependymal_cutout_inference import dataset + +# note the data organization is special with separate ground truth folder +assert dataset.dataset_params is not None +dataset_params = replace( + dataset.dataset_params, + sorting_func=lambda subdir: str(subdir.name) if isinstance(subdir, Path) else str(subdir), +) # subdirs are "ground_truth" and "all_imgs" now... + +dataset = replace( + dataset, + name="ependymal_cutout_01_noised", + path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_noised_0.1_crop/", + dataset_params=dataset_params, +) diff --git a/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_03_noised_separate_gt_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_03_noised_separate_gt_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..8bb472a18a32dcd77e1ed040a15feee06df769b9 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_03_noised_separate_gt_fully_ordered_inference.py @@ -0,0 +1,19 @@ +from dataclasses import replace + +from GaussianProxy.utils.data import ContinuousTimeImageDataset +from my_conf.dataset.ependymal_cutout.ependymal_cutout_03_noised_separate_gt_inference import dataset + +assert dataset.dataset_params is not None +dataset_params = replace( + dataset.dataset_params, + dataset_class=ContinuousTimeImageDataset, +) + +dataset = replace( + dataset, + fully_ordered=True, + path_to_single_parquet="/projects/static2dynamic/datasets/ependymal/ependymal_cutout_03_noised__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=dataset_params, + selected_dists=["all_imgs"], + separate_gt_starting_class_path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_noised_0.3_crop/ground_truths/1", +) diff --git a/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_white_bg_separate_gt_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_white_bg_separate_gt_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..1fd379f5de2accb4ff47bc112191f2e7232ea35d --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_white_bg_separate_gt_fully_ordered_inference.py @@ -0,0 +1,19 @@ +from dataclasses import replace + +from GaussianProxy.utils.data import ContinuousTimeImageDataset +from my_conf.dataset.ependymal_cutout.ependymal_cutout_white_bg_separate_gt_inference import dataset + +assert dataset.dataset_params is not None +dataset_params = replace( + dataset.dataset_params, + dataset_class=ContinuousTimeImageDataset, +) + +dataset = replace( + dataset, + fully_ordered=True, + path_to_single_parquet="/projects/static2dynamic/datasets/ependymal/ependymal_cutout_white_bg__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=dataset_params, + selected_dists=["all_imgs"], + separate_gt_starting_class_path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_white_bg_crop/ground_truths/1", +) diff --git a/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_white_bg_separate_gt_inference.py b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_white_bg_separate_gt_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..807c4c6bcee124ac2b3c3ac0cb8a7251e60d71e6 --- /dev/null +++ b/cell_cycle/my_conf/dataset/ependymal_cutout/ependymal_cutout_white_bg_separate_gt_inference.py @@ -0,0 +1,16 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ependymal_cutout.ependymal_cutout_inference import dataset + +# note the data organization is special with separate ground truth folder +assert dataset.dataset_params is not None +dataset_params = replace( + dataset.dataset_params, sorting_func=lambda subdir: str(subdir.name) +) # subdirs are "ground_truth" and "all_imgs" now... + +dataset = replace( + dataset, + name="ependymal_cutout_white_bg", + path="/projects/static2dynamic/datasets/ependymal/prepared_dataset_white_bg_crop/", + dataset_params=dataset_params, +) diff --git a/cell_cycle/my_conf/dataset/human_embryo/human_embryo_fully_ordered_inference.py b/cell_cycle/my_conf/dataset/human_embryo/human_embryo_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..2c721acb02a7a6aed59823cea62ba861992f8bd0 --- /dev/null +++ b/cell_cycle/my_conf/dataset/human_embryo/human_embryo_fully_ordered_inference.py @@ -0,0 +1,15 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.human_embryo.human_embryo_inference import dataset +from GaussianProxy.utils.data import ContinuousTimeImageDataset1D + +assert dataset.dataset_params is not None +ds_params = replace(dataset.dataset_params, dataset_class=ContinuousTimeImageDataset1D) + +dataset = replace( + dataset, + path="/projects/imagesets3/2022_Gomez/reformated_phases/phases", + fully_ordered=True, + path_to_single_parquet="/projects/imagesets3/2022_Gomez/reformated_phases/human_embryo__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=ds_params, +) diff --git a/cell_cycle/my_conf/dataset/human_embryo/human_embryo_inference.py b/cell_cycle/my_conf/dataset/human_embryo/human_embryo_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..8358a86aab489a3ff63dabce6f0095df11dcac98 --- /dev/null +++ b/cell_cycle/my_conf/dataset/human_embryo/human_embryo_inference.py @@ -0,0 +1,5 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.human_embryo.human_embryo_inference import dataset + +dataset = replace(dataset, path="/projects/imagesets3/2022_Gomez/reformated_phases/phases") diff --git a/docetaxel/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml b/docetaxel/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e5dbdc51d99f08dcc6456a96021ab17b5dcf70bd --- /dev/null +++ b/docetaxel/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: BBBC021_196_docetaxel_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_docetaxel__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 196, 196] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py b/docetaxel/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..64963aa48595e8d34affd33eeac1c61577f9180d --- /dev/null +++ b/docetaxel/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.BBBC021_196_hard_aug_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel_hard_augmented" +dataset.name += "_docetaxel" diff --git a/docetaxel/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml b/docetaxel/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ef3ad70671ccf58068e081ef2494d86bfce86ee --- /dev/null +++ b/docetaxel/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_3ch_png_patches_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/docetaxel/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml b/docetaxel/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml new file mode 100644 index 0000000000000000000000000000000000000000..62683e675a34283a0abe73fbda931f6c34a65dd1 --- /dev/null +++ b/docetaxel/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_4ch_tif_patches_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 4, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 65536 ] +expected_dtype: torch.uint16 +selected_dists: [ 'time_1', 'time_3', 'time_5', 'time_7', 'time_9', 'time_11', 'time_13' ] diff --git a/docetaxel/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py b/docetaxel/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..d458f5bd6629995bfe66556c11b44d6162ef32ea --- /dev/null +++ b/docetaxel/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py @@ -0,0 +1,33 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize, Resize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 128 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + Resize(DEFINITION), + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name.split("_")[1]), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="chromaLive6h_3ch_png_patches_380px_hard_aug", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, # not used + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_hard_augmented", +) diff --git a/docetaxel/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py b/docetaxel/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..186980265e1f3f16e37371ad19289a9a4f3c2ffb --- /dev/null +++ b/docetaxel/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py @@ -0,0 +1,33 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize, Resize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 128 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + Resize(DEFINITION), + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name.split("_")[1]), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="chromaLive6h_3ch_png_patches_380px", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, # not used + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches", +) diff --git a/docetaxel/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml b/docetaxel/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e3481fc1eb7ea793bafcace11a4fa1e73a546d7 --- /dev/null +++ b/docetaxel/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml @@ -0,0 +1,19 @@ +name: chromalive_tl_24h_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20230920ChromaLiveTL_24hr4ch/ch_4_3_1___norm_whole_ds_per_channel_per_zslice_0_99perc___patches_380 +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] # move to [-1:1] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: ['time_1', 'time_7', 'time_13', 'time_19', 'time_25', 'time_31', 'time_37', 'time_43', 'time_49', 'time_55', 'time_61', 'time_67', 'time_73', 'time_79', 'time_85', 'time_91', 'time_97', 'time_103', 'time_109', 'time_115', 'time_121', 'time_127', 'time_133', 'time_139', 'time_145'] diff --git a/docetaxel/my_conf/dataset/Jurkat/Jurkat.yaml b/docetaxel/my_conf/dataset/Jurkat/Jurkat.yaml new file mode 100644 index 0000000000000000000000000000000000000000..368e450b3ecebb42b3ac841777b62490f58da62f --- /dev/null +++ b/docetaxel/my_conf/dataset/Jurkat/Jurkat.yaml @@ -0,0 +1,16 @@ +name: Jurkat +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml b/docetaxel/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..593c89330d33ad7fb34415c1c32ec8b000782151 --- /dev/null +++ b/docetaxel/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: Jurkat_fully_ordered_dinov2_regs_giant_ds_preproc +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/Jurkat__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py b/docetaxel/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py new file mode 100644 index 0000000000000000000000000000000000000000..52ecd6ca5f22d5c85cf023d4c6267d0b82ea0868 --- /dev/null +++ b/docetaxel/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.Jurkat_inference import Jurkat_inference as dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles_hard_augmented" diff --git a/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml b/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..790a00b0e4eeafd72803a1d0d09c4ce7f38b0d72 --- /dev/null +++ b/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml @@ -0,0 +1,24 @@ +name: NASH_fibrosis +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/fibrosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered.yaml b/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9474dcf3c5335e05cdf8207eb4423adcffd99820 --- /dev/null +++ b/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered.yaml @@ -0,0 +1,26 @@ +name: NASH_fibrosis_fully_ordered_dinov2_regs_giant_ds_preproc +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/fibrosis +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/NASH_fibrosis__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py b/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..beaa73768127015587be2b2e3cb370bf9ebea96b --- /dev/null +++ b/docetaxel/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.NASH_fibrosis_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/fibrosis" diff --git a/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml b/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c4ba0a5653d4793a9819c242a253cf1df4354e45 --- /dev/null +++ b/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml @@ -0,0 +1,24 @@ +name: NASH_steatosis +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/steatosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis_fully_ordered.yaml b/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ae97d5fc908ae875341f041200f043b1d9d7bbe9 --- /dev/null +++ b/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis_fully_ordered.yaml @@ -0,0 +1,26 @@ +name: NASH_steatosis_fully_ordered_dinov2_regs_giant_ds_preproc +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/steatosis +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/NASH_steatosis__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis_inference.py b/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..3e207e12dc770568032eb1992d143e7eb564b44e --- /dev/null +++ b/docetaxel/my_conf/dataset/NASH_steatosis/NASH_steatosis_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.NASH_steatosis_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/steatosis" diff --git a/docetaxel/my_conf/dataset/biotine/biotine_png_128.yaml b/docetaxel/my_conf/dataset/biotine/biotine_png_128.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f51f8d81d9da0d79cfb73e3acbe35e33cdf0b353 --- /dev/null +++ b/docetaxel/my_conf/dataset/biotine/biotine_png_128.yaml @@ -0,0 +1,19 @@ +name: biotine_png +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml b/docetaxel/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bbd84e2dde4866013cc8cdd8515270628d0f86a2 --- /dev/null +++ b/docetaxel/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml @@ -0,0 +1,16 @@ +name: biotine_png_hard_aug +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255_hard_augmented +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py b/docetaxel/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..d546786791e75b12658ccdb804f9e32b2352c308 --- /dev/null +++ b/docetaxel/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.biotine_png_128_hard_aug_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255_hard_augmented" diff --git a/docetaxel/my_conf/dataset/biotine/biotine_png_128_inference.py b/docetaxel/my_conf/dataset/biotine/biotine_png_128_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..0e75f3876aa2a2ed9cda852482564d283a0940a1 --- /dev/null +++ b/docetaxel/my_conf/dataset/biotine/biotine_png_128_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.biotine_png_128_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255" diff --git a/docetaxel/my_conf/dataset/biotine/biotine_png_256.yaml b/docetaxel/my_conf/dataset/biotine/biotine_png_256.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6f4a50b0c6d4cf04c9f56b70027b2bcfae4799f8 --- /dev/null +++ b/docetaxel/my_conf/dataset/biotine/biotine_png_256.yaml @@ -0,0 +1,18 @@ +name: biotine_png +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.transforms.Resize + size: 256 + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: [ 1, 5, 10, 15, 19 ] +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy.yaml b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bc0af15563d1c82d07a6862117a22c1a7552e637 --- /dev/null +++ b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy.yaml @@ -0,0 +1,18 @@ +name: diabetic_retinopathy +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset/train +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 # single int => image resized to (size * aspect_ratio, size) or (size, size * aspect_ratio) with aspect_ratio >= 1 preserved + - _target_: torchvision.transforms.v2.CenterCrop + size: 256 # square centered crop + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered.yaml b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ead459e5c57fd1acd7aa610bde54943fb3f0928f --- /dev/null +++ b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered.yaml @@ -0,0 +1,20 @@ +name: diabetic_retinopathy_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/train +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/diabetic_retinopathy__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 # single int => image resized to (size * aspect_ratio, size) or (size, size * aspect_ratio) with aspect_ratio >= 1 preserved + - _target_: torchvision.transforms.v2.CenterCrop + size: 256 # square centered crop + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..feccbd2a0c9d9cd63a1610630d257c288e5aa3b0 --- /dev/null +++ b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.diabetic_retinopathy_inference import diabetic_retinopathy_inference as dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset/train_hard_augmented" +dataset.name = "diabetic_retinopathy_inference_hard_augmented" diff --git a/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..a39977d35a03d0d0fd108ca5ac1e6efe512f4a17 --- /dev/null +++ b/docetaxel/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.diabetic_retinopathy_inference import diabetic_retinopathy_inference + +diabetic_retinopathy_inference.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset/train" diff --git a/docetaxel/my_conf/dataset/ependymal_context/ependymal_context.yaml b/docetaxel/my_conf/dataset/ependymal_context/ependymal_context.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ca5e76ee1556c3fe2462995128d8466c5502790 --- /dev/null +++ b/docetaxel/my_conf/dataset/ependymal_context/ependymal_context.yaml @@ -0,0 +1,16 @@ +name: ependymal_context +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_context +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel/my_conf/dataset/ependymal_context/ependymal_context_fully_ordered.yaml b/docetaxel/my_conf/dataset/ependymal_context/ependymal_context_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cdcbd3f1f65f4ff02acd2771ec18202a326be4f1 --- /dev/null +++ b/docetaxel/my_conf/dataset/ependymal_context/ependymal_context_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: ependymal_context_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_context +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/ependymal_context__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/ependymal_context/ependymal_context_inference.py b/docetaxel/my_conf/dataset/ependymal_context/ependymal_context_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..bae2a302edf9621fe2722910f0baee57e5f61057 --- /dev/null +++ b/docetaxel/my_conf/dataset/ependymal_context/ependymal_context_inference.py @@ -0,0 +1,32 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 256 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="ependymal_context", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_context", +) diff --git a/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml b/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bb478c18035d0f740c82a8958cf7a62cee5116cd --- /dev/null +++ b/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml @@ -0,0 +1,17 @@ +name: ependymal_cutout +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_crop +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: [ 1, 2, 3, 4, 5, 6 ] # 0 is the trash class! diff --git a/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout_fully_ordered.yaml b/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..861a69e71721d0c84d6dc90a7011c75cfac060e7 --- /dev/null +++ b/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout_fully_ordered.yaml @@ -0,0 +1,19 @@ +name: ependymal_cutout_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_crop +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/ependymal_cutout__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: [ 1, 2, 3, 4, 5, 6 ] # 0 is the trash class! +fully_ordered: true diff --git a/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout_inference.py b/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..79ed41ec4ed87d4fb3e8cb8b828f3c780e29e56a --- /dev/null +++ b/docetaxel/my_conf/dataset/ependymal_cutout/ependymal_cutout_inference.py @@ -0,0 +1,32 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 256 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="ependymal_cutout", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=[1, 2, 3, 4, 5, 6], # 0 is the trash class! + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_crop", +) diff --git a/docetaxel/my_conf/net/net_256_3_20M.py b/docetaxel/my_conf/net/net_256_3_20M.py new file mode 100644 index 0000000000000000000000000000000000000000..af270af831f48c45847a38cb3714d32033855957 --- /dev/null +++ b/docetaxel/my_conf/net/net_256_3_20M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 128, 224), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json b/docetaxel/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad012575a06c66b4dfe590012c318cf4712f09f --- /dev/null +++ b/docetaxel/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.32.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": false, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "leading", + "trained_betas": null +} \ No newline at end of file diff --git a/docetaxel_skip_half_doses/dynamic/scheduler_config.json b/docetaxel_skip_half_doses/dynamic/scheduler_config.json new file mode 100644 index 0000000000000000000000000000000000000000..13ba576441b70aaf967ceb76f1383c9f4ec1c7da --- /dev/null +++ b/docetaxel_skip_half_doses/dynamic/scheduler_config.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.35.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": false, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "leading", + "trained_betas": null +} diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel.yaml b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fdf54a75447f6740bbab9730af5a70e345193f01 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel.yaml @@ -0,0 +1,16 @@ +name: BBBC021_196_docetaxel +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +data_shape: [3, 196, 196] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..008f4cab1ed807a1eee263aa55265185c2ba060a --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml @@ -0,0 +1,23 @@ +name: BBBC021_196_docetaxel_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_docetaxel__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 196, 196] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..64963aa48595e8d34affd33eeac1c61577f9180d --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.BBBC021_196_hard_aug_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel_hard_augmented" +dataset.name += "_docetaxel" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..95ff8768553ef62ad5d542799cd8d340a1b6d1c0 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.BBBC021_196_inference import BBBC021_196_inference as BBBC021_196_docetaxel_inference + +BBBC021_196_docetaxel_inference.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel" +BBBC021_196_docetaxel_inference.name += "_docetaxel" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_skip_half_doses_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_skip_half_doses_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..519df22d6a7e964326f255006e83c6ff9fe4c8b3 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_skip_half_doses_fully_ordered.yaml @@ -0,0 +1,24 @@ +name: BBBC021_196_docetaxel_fully_ordered_skip_half_doses + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_docetaxel_skip_half_doses__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 196, 196] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: ["0.0003", "0.003", "0.03", "0.3"] + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_skip_many_doses_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_skip_many_doses_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b3fa0e3340f5560e26b1923dac609421bb599d6d --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_skip_many_doses_fully_ordered.yaml @@ -0,0 +1,24 @@ +name: BBBC021_196_docetaxel_fully_ordered_skip_many_doses + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_docetaxel_skip_many_doses__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 196, 196] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: ["0.0003", "0.001", "1.0"] + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_nocodazole_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_nocodazole_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..863dea28cd618aa2ecdf15943413c376e9874798 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/BBBC021/BBBC021_196_nocodazole_fully_ordered.yaml @@ -0,0 +1,23 @@ +name: BBBC021_196_nocodazole_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/nocodazole +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_nocodazole__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 196, 196] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ef3ad70671ccf58068e081ef2494d86bfce86ee --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_3ch_png_patches_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..192b16ccd121227f6cc53ab2a5b8d68726ced00f --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_fully_ordered.yaml @@ -0,0 +1,21 @@ +name: chromaLive6h_3ch_png_patches_380px_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ChromaLive_6hr_4ch/MIP_normalized/patches_380px +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ChromaLive_6hr_4ch/MIP_normalized/chromaLive6h_3ch_png_patches_380px__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml new file mode 100644 index 0000000000000000000000000000000000000000..71515cb3816237a88fe5140ee9434a33dd780638 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml @@ -0,0 +1,16 @@ +name: chromaLive6h_3ch_png_patches_380px_hard_aug +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_380px_hard_augmented +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml new file mode 100644 index 0000000000000000000000000000000000000000..62683e675a34283a0abe73fbda931f6c34a65dd1 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_4ch_tif_patches_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 4, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 65536 ] +expected_dtype: torch.uint16 +selected_dists: [ 'time_1', 'time_3', 'time_5', 'time_7', 'time_9', 'time_11', 'time_13' ] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..d458f5bd6629995bfe66556c11b44d6162ef32ea --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py @@ -0,0 +1,33 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize, Resize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 128 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + Resize(DEFINITION), + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name.split("_")[1]), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="chromaLive6h_3ch_png_patches_380px_hard_aug", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, # not used + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_hard_augmented", +) diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..186980265e1f3f16e37371ad19289a9a4f3c2ffb --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py @@ -0,0 +1,33 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize, Resize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 128 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + Resize(DEFINITION), + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name.split("_")[1]), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="chromaLive6h_3ch_png_patches_380px", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, # not used + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches", +) diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e3481fc1eb7ea793bafcace11a4fa1e73a546d7 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml @@ -0,0 +1,19 @@ +name: chromalive_tl_24h_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20230920ChromaLiveTL_24hr4ch/ch_4_3_1___norm_whole_ds_per_channel_per_zslice_0_99perc___patches_380 +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] # move to [-1:1] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: ['time_1', 'time_7', 'time_13', 'time_19', 'time_25', 'time_31', 'time_37', 'time_43', 'time_49', 'time_55', 'time_61', 'time_67', 'time_73', 'time_79', 'time_85', 'time_91', 'time_97', 'time_103', 'time_109', 'time_115', 'time_121', 'time_127', 'time_133', 'time_139', 'time_145'] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..778d76cd8a32c2a364386b9c5b52307e8bfa1c3c --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_fully_ordered.yaml @@ -0,0 +1,19 @@ +name: deepcycle_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/128x128 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/deepcycle_brightfield_to_3D__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [4, 128, 128] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_markers_crop_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_markers_crop_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..756279f94ac70c5a6db27c33bda5f5a0dd77c086 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_markers_crop_fully_ordered.yaml @@ -0,0 +1,21 @@ +name: deepcycle_markers_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/128x128 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/deepcycle_markers__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [4, 64, 64] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + - _target_: torchvision.transforms.CenterCrop + size: 64 +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_markers_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_markers_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c9e8fd9da2d3c19c7c74c2159329f79484e530ca --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/DeepCycle/deepcycle_markers_fully_ordered.yaml @@ -0,0 +1,19 @@ +name: deepcycle_markers_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/128x128 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/deepcycle_markers__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [4, 128, 128] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat.yaml b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat.yaml new file mode 100644 index 0000000000000000000000000000000000000000..368e450b3ecebb42b3ac841777b62490f58da62f --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat.yaml @@ -0,0 +1,16 @@ +name: Jurkat +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..02ec7af18cd19705804c3eb3104126fab60bbf99 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: Jurkat_brightfield_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/brightfield_reprocessed +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/Jurkat_brightfield__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 1, 66, 66 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5 ] + std: [ 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..593c89330d33ad7fb34415c1c32ec8b000782151 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: Jurkat_fully_ordered_dinov2_regs_giant_ds_preproc +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/Jurkat__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..19eeca252f8c5ada8889f0c325667ccb41f9d904 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.Jurkat_inference import Jurkat_inference + +Jurkat_inference.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py new file mode 100644 index 0000000000000000000000000000000000000000..52ecd6ca5f22d5c85cf023d4c6267d0b82ea0868 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.Jurkat_inference import Jurkat_inference as dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles_hard_augmented" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml b/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..790a00b0e4eeafd72803a1d0d09c4ce7f38b0d72 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml @@ -0,0 +1,24 @@ +name: NASH_fibrosis +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/fibrosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9474dcf3c5335e05cdf8207eb4423adcffd99820 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered.yaml @@ -0,0 +1,26 @@ +name: NASH_fibrosis_fully_ordered_dinov2_regs_giant_ds_preproc +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/fibrosis +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/NASH_fibrosis__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..beaa73768127015587be2b2e3cb370bf9ebea96b --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.NASH_fibrosis_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/fibrosis" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml b/docetaxel_skip_half_doses/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c4ba0a5653d4793a9819c242a253cf1df4354e45 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml @@ -0,0 +1,24 @@ +name: NASH_steatosis +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/steatosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/NASH_steatosis/NASH_steatosis_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/NASH_steatosis/NASH_steatosis_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..3e207e12dc770568032eb1992d143e7eb564b44e --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/NASH_steatosis/NASH_steatosis_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.NASH_steatosis_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/steatosis" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128.yaml b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f51f8d81d9da0d79cfb73e3acbe35e33cdf0b353 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128.yaml @@ -0,0 +1,19 @@ +name: biotine_png +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..718cd8109756d420db2f68a260456b6e8b6ca212 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_fully_ordered.yaml @@ -0,0 +1,21 @@ +name: biotine_png_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/biotine_png__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bbd84e2dde4866013cc8cdd8515270628d0f86a2 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml @@ -0,0 +1,16 @@ +name: biotine_png_hard_aug +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255_hard_augmented +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..d546786791e75b12658ccdb804f9e32b2352c308 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.biotine_png_128_hard_aug_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255_hard_augmented" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..0e75f3876aa2a2ed9cda852482564d283a0940a1 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_128_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.biotine_png_128_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_256.yaml b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_256.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6f4a50b0c6d4cf04c9f56b70027b2bcfae4799f8 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/biotine/biotine_png_256.yaml @@ -0,0 +1,18 @@ +name: biotine_png +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.transforms.Resize + size: 256 + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: [ 1, 5, 10, 15, 19 ] +expected_initial_data_range: [ 0, 255 ] diff --git a/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy.yaml b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bc0af15563d1c82d07a6862117a22c1a7552e637 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy.yaml @@ -0,0 +1,18 @@ +name: diabetic_retinopathy +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset/train +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 # single int => image resized to (size * aspect_ratio, size) or (size, size * aspect_ratio) with aspect_ratio >= 1 preserved + - _target_: torchvision.transforms.v2.CenterCrop + size: 256 # square centered crop + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_crop_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_crop_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..37876ed9796f7c528808fa4fdfac66d440b004b0 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_crop_fully_ordered.yaml @@ -0,0 +1,25 @@ +name: diabetic_retinopathy_2048_crop_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset_full_circle_augmented +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/balanced_classes__diabetic_retinopathy_2048_crop__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 256, 256] + +transforms: + _target_: torchvision.transforms.v2.Compose + transforms: + - _target_: torchvision.transforms.v2.CenterCrop + size: 2048 + - _target_: torchvision.transforms.v2.Resize + size: 256 + - _target_: torchvision.transforms.v2.ToDtype + dtype: ${torch_dtype:float32} + scale: true + - _target_: torchvision.transforms.v2.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3ad2095a74de111db5cb53fb5fa6bddb2aa7a87c --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_fully_ordered.yaml @@ -0,0 +1,25 @@ +name: diabetic_retinopathy_2560_crop_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset_full_circle_augmented +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/balanced_classes__diabetic_retinopathy_2560_crop__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 256, 256] + +transforms: + _target_: torchvision.transforms.v2.Compose + transforms: + - _target_: torchvision.transforms.v2.CenterCrop + size: 2560 + - _target_: torchvision.transforms.v2.Resize + size: 256 + - _target_: torchvision.transforms.v2.ToDtype + dtype: ${torch_dtype:float32} + scale: true + - _target_: torchvision.transforms.v2.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..225480bc8253662b31a2cc4afed18bd968ceaf46 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered.yaml @@ -0,0 +1,25 @@ +name: diabetic_retinopathy_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/train +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/diabetic_retinopathy__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 256, 256] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 # single int => image resized to (size * aspect_ratio, size) or (size, size * aspect_ratio) with aspect_ratio >= 1 preserved + - _target_: torchvision.transforms.v2.CenterCrop + size: 256 # square centered crop + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..feccbd2a0c9d9cd63a1610630d257c288e5aa3b0 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.diabetic_retinopathy_inference import diabetic_retinopathy_inference as dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset/train_hard_augmented" +dataset.name = "diabetic_retinopathy_inference_hard_augmented" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..a39977d35a03d0d0fd108ca5ac1e6efe512f4a17 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.diabetic_retinopathy_inference import diabetic_retinopathy_inference + +diabetic_retinopathy_inference.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DiabeticRetinopathy/prepared_dataset/train" diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ependymal_context/ependymal_context.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_context/ependymal_context.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ca5e76ee1556c3fe2462995128d8466c5502790 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_context/ependymal_context.yaml @@ -0,0 +1,16 @@ +name: ependymal_context +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_context +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ependymal_context/ependymal_context_inference.py b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_context/ependymal_context_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..bae2a302edf9621fe2722910f0baee57e5f61057 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_context/ependymal_context_inference.py @@ -0,0 +1,32 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 256 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="ependymal_context", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_context", +) diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bb478c18035d0f740c82a8958cf7a62cee5116cd --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout.yaml @@ -0,0 +1,17 @@ +name: ependymal_cutout +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_crop +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: [ 1, 2, 3, 4, 5, 6 ] # 0 is the trash class! diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..15a60823206138f8997ae091ac5ab12c1ef59a10 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered.yaml @@ -0,0 +1,23 @@ +name: ependymal_cutout_01_noised_full_circle_augs_separate_gt_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_noised_0.1_crop_full_circle_augmented/all_imgs +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/ependymal_cutout_01_noised_full_circle_augs__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +separate_gt_starting_class_path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_noised_0.1_crop_full_circle_augmented/ground_truths/1 + +data_shape: [3, 256, 256] + +transforms: + _target_: torchvision.transforms.v2.Compose + transforms: + - _target_: torchvision.transforms.v2.ToDtype + dtype: ${torch_dtype:float32} + scale: true + - _target_: torchvision.transforms.v2.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomVerticalFlip + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout_fully_ordered.yaml b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..861a69e71721d0c84d6dc90a7011c75cfac060e7 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/dataset/ependymal_cutout/ependymal_cutout_fully_ordered.yaml @@ -0,0 +1,19 @@ +name: ependymal_cutout_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_crop +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/ependymal_cutout__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 256, 256 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: [ 1, 2, 3, 4, 5, 6 ] # 0 is the trash class! +fully_ordered: true diff --git a/docetaxel_skip_half_doses/my_conf/hydra/job_logging/custom.yaml b/docetaxel_skip_half_doses/my_conf/hydra/job_logging/custom.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b9e2c72c4ffc16496213000cbc9870eef22ac167 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/hydra/job_logging/custom.yaml @@ -0,0 +1,37 @@ +version: 1 +formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + colorlog: + (): colorlog.ColoredFormatter + format: '[%(cyan)s%(asctime)s%(reset)s][%(blue)s%(name)s%(reset)s][%(log_color)s%(levelname)s%(reset)s] - %(message)s' + log_colors: + DEBUG: purple + INFO: green + WARNING: yellow + ERROR: red + CRITICAL: red +handlers: + console: + class: logging.StreamHandler + formatter: colorlog + stream: ext://sys.stdout + level: INFO + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra:run.dir}/logs.log # unify logs from launcher and script + level: DEBUG +root: + level: DEBUG + handlers: + - console + - file +logger: + matplotlib: + level: INFO + PIL.PngImagePlugin: + level: WARNING + PIL: + level: WARNING +disable_existing_loggers: true diff --git a/docetaxel_skip_half_doses/my_conf/my_inference_conf.py b/docetaxel_skip_half_doses/my_conf/my_inference_conf.py new file mode 100644 index 0000000000000000000000000000000000000000..06f1ca29e40ad1326ab41846d3d64831e4d5d9de --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/my_inference_conf.py @@ -0,0 +1,94 @@ +# ruff: noqa: F401 + +from datetime import datetime +from pathlib import Path + +from torch import bfloat16, float16, float32 + +from GaussianProxy.conf.inference_conf import InferenceConfig, ProfileConfig +from GaussianProxy.conf.training_conf import ( + EvaluationStrategy, + ForwardNoising, + ForwardNoisingLinearScaling, + InversionRegenerationOnly, + InvertedRegeneration, + IterativeInvertedRegeneration, + MetricsComputation, + SimilarityWithTrainData, + SimpleGeneration, + VideoGenerationFromNoise, +) + +# -------------------------------------------- Dataset -------------------------------------------- +from my_conf.dataset.ependymal_cutout.ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered_inference import dataset + +# --------------------------------------------- Model --------------------------------------------- +root_experiments_path = Path("/lustre/fsn1/projects/rech/icr/ufc43hj/experiments") +project_name = "GaussianProxy" +run_name = "biotine_all_paired_new_jz" + +# ------------------------------------------ Evaluations ------------------------------------------ +eval_strats = [ + # InvertedRegeneration( + # nb_diffusion_timesteps=100, + # name="InvertedRegeneration_100_diffsteps_no_SNR_leading_f32_J_14_fld_2", + # nb_generated_samples=64, + # plate_name_to_simulate="J_14_fld_2", + # nb_video_times_in_parallel=3, + # nb_video_timesteps=19, + # n_rows_displayed=8, + # ), + # MetricsComputation( + # nb_samples_to_gen_per_time="adapt aug", + # batch_size=512 + 32, + # nb_diffusion_timesteps=100, + # selected_times=[1, 5, 10, 15, 19], + # name="MetricsComputation_100_diffsteps_no_SNR_leading_f32_adapt_aug", + # regen_images=False, + # ), + # InversionRegenerationOnly( + # nb_diffusion_timesteps=100, + # name="InversionRegenerationOnly_100_diffsteps_no_SNR_leading_f32", + # nb_generated_samples=64, + # plate_name_to_simulate="M_13_fld_3", + # n_rows_displayed=8, + # ) +] + + +# ------------------------------------------ Profiling -------------------------------------------- +# fmt: off +profile_conf = ProfileConfig( + enabled = False, + record_shapes = False, + profile_memory = True, + with_stack = True, + with_flops = False, + export_chrome_trace = False, +) + + +# ------------------------------------------ Final Config ----------------------------------------- +inference_conf = InferenceConfig( + # Choose the experiment (trained model weights) + root_experiments_path = root_experiments_path, + project_name = project_name, + run_name = run_name, + # Choose a custom scheduler + # scheduler_config = Path("my_conf", "scheduler", "DDIM_3k_vpred_tresh_leading.json"), + # Output directory (where to put the generated images / tensors) + output_dir = Path(root_experiments_path, project_name, run_name, "inferences"), + # Device + device = "cuda:2", + # Optimizations + compile = True, + dtype = float32, + # Data + dataset = dataset, + # Evaluations + evaluation_strategies = eval_strats, # pyright: ignore[reportArgumentType] + # Profiling + profiling = profile_conf, + # Temp Dir + tmpdir_location = "/tmp", +) diff --git a/docetaxel_skip_half_doses/my_conf/my_training_conf.py b/docetaxel_skip_half_doses/my_conf/my_training_conf.py new file mode 100644 index 0000000000000000000000000000000000000000..db749634c2e4971d9f47edb03e47bf2ece424117 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/my_training_conf.py @@ -0,0 +1,204 @@ +from datetime import datetime + +from omegaconf import MISSING + +################################################################################################### +############################################ Base conf ############################################ +################################################################################################### +# These are generic classes that need full instantiation +# pylint: disable=unused-import +from GaussianProxy.conf.training_conf import ( + Accelerate, + AccelerateLaunchArgs, + Checkpointing, + Config, + DataLoader, + DDIMSchedulerConfig, + Evaluation, + ForwardNoising, # noqa: F401 + InvertedRegeneration, # noqa: F401 + IterativeInvertedRegeneration, # noqa: F401 + LinearLRConfig, # noqa: F401 + MetricsComputation, # noqa: F401 + OneCycleLRConfig, # noqa: F401 + SimilarityWithTrainData, # noqa: F401 + SimpleGeneration, # noqa: F401 + Slurm, + Training, +) + +# pylint: enable=unused-import + +################################################################################################### +########################################## Defaults conf ########################################## +################################################################################################### +defaults = [ + {"dataset": "BBBC021/BBBC021_196_docetaxel_skip_half_doses_fully_ordered"}, + "hydra/job_logging/custom", + "_self_", +] + +# fmt: off + +# ------------------------------------------- Job launch ------------------------------------------ +now = datetime.now().strftime("%Y-%m-%d--%H-%M-%S") +slurm = Slurm( + enabled = True, + monitor = False, + account = "icr@h100", + partition = None, + constraint = "h100", + qos = "t3", + nodes = 1, + num_gpus = 4, + max_num_requeue = 3, + total_job_time = 20 * 60, + output_folder = "${hydra:run.dir}" + f"/{now}_%j", + email = "tboyer@bio.ens.psl.eu", +) + +accelerate_launch_args = AccelerateLaunchArgs( + machine_rank = 0, + num_machines = 1, + gpu_ids = "all", + rdzv_backend = "static", + same_network = "true", + mixed_precision = "bf16", + num_processes = slurm.num_gpus, + main_process_port = 29503, + dynamo_backend = "inductor", + dynamo_plugin = None, +) + +accelerate = Accelerate( + launch_args = accelerate_launch_args, + offline = True, +) + +# ---------------------------------------------- Data --------------------------------------------- +data_loader = DataLoader( + num_workers = 4, + train_prefetch_factor = 4, + pin_memory = True, + persistent_workers = True, +) + +# -------------------------------------------- Training ------------------------------------------- +training = Training( + gradient_accumulation_steps = 1, + train_batch_size = 32, + max_grad_norm = 1, + nb_time_samplings = 500_000, + unpaired_data = False, + reweight_sampling = False, +) + +checkpointing = Checkpointing( + checkpoints_total_limit = 5, + resume_from_checkpoint = True, + checkpoint_every_n_steps = 5000, + chckpt_base_path = MISSING, +) + +lr_scheduler = OneCycleLRConfig( + max_lr = 1e-4, +) + +# ------------------------------------------- Evaluation ------------------------------------------ +# naming convention is lowercase + underscore; has to be respected for debug args modification +metrics_compute = MetricsComputation( + nb_samples_to_gen_per_time = "adapt half aug", + batch_size = 512 - 64, + nb_diffusion_timesteps = 50, + selected_times = ["0.0003", "0.003", "0.03", "0.3"], + augmentations_for_metrics_comp = ["RandomHorizontalFlip", "RandomVerticalFlip", "RandomRotationSquareSymmetry"], +) + +simple_generation = SimpleGeneration( + nb_diffusion_timesteps = 50, + n_rows_displayed = 4, # TODO: merge training & evaluation configs + nb_generated_samples = 16, # TODO: merge training & evaluation configs +) + +inverted_regeneration = InvertedRegeneration( + nb_diffusion_timesteps = 50, + nb_inversion_diffusion_timesteps = 100, + n_rows_displayed = 8, # TODO: not used in training! + nb_generated_samples = 16, + nb_video_times_in_parallel = 8, # TODO: not used in training! + nb_video_timesteps = 50, + gen_times_type = ("evenly_spaced_from_inversion", 0.9), +) + +sim_with_train = SimilarityWithTrainData( # must be put after metrics_compute! + nb_generated_samples = -1, # TODO: not used + batch_size = 2048, + nb_batches_shown = -1, # TODO: not used + n_rows_displayed = -1, # TODO: not used + nb_diffusion_timesteps = -1, # TODO: not used +) + +evaluation = Evaluation( + every_n_opt_steps = 25_000, + batch_size = 16, # TODO: remove this and use config from above + nb_video_timesteps = 50, # TODO: remove this and use config from above + strategies = [simple_generation, inverted_regeneration, metrics_compute, sim_with_train], +) + +# ------------------------------------------- Diffusion ------------------------------------------- +dynamic = DDIMSchedulerConfig( + num_train_timesteps = 3000, + clip_sample = False, + clip_sample_range = 1, + thresholding = True, + sample_max_value = 1, + prediction_type = "v_prediction", + rescale_betas_zero_snr = False, + timestep_spacing = "leading", +) + +# ---------------------------------------------- Model -------------------------------------------- +from my_conf.net.net_196_3_12M import net, time_encoder # noqa: E402 + +# ------------------------------------------ Final Config ----------------------------------------- +config = Config( + # defaults + defaults = defaults, + # model + dynamic = dynamic, + net = net, + time_encoder = time_encoder, + # script + launcher_script_parent_folder = "/linkhome/rech/genlxz01/ufc43hj/sources/GaussianProxy", + script = "train", + # experiment variables + exp_parent_folder = "/lustre/fsn1/projects/rech/icr/ufc43hj/experiments", + project = MISSING, + run_name = MISSING, + # hydra + hydra = {"run": {"dir": "${exp_parent_folder}/${project}/${run_name}"}}, + # slurm + slurm = slurm, + # accelerate + accelerate = accelerate, + # misc. + debug = False, + profile = False, + tmpdir_location = None, + # experiment tracker + logger = "wandb", + entity = "thomasboyer", + resume_method = "rewind", # "fork", "rewind", "new_run", "resume" + # checkpointing + checkpointing = checkpointing, + # dataset + dataset = MISSING, + # dataloaders + dataloaders = data_loader, + # training + training = training, + # evaluation + evaluation = evaluation, + # optimizer + lr_scheduler = lr_scheduler, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_128_3.py b/docetaxel_skip_half_doses/my_conf/net/net_128_3.py new file mode 100644 index 0000000000000000000000000000000000000000..994280ed4d0a7e6e1410e51f2b058157fb17c962 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_128_3.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=128, + in_channels=3, + out_channels=3, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(64, 128, 256), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_128_3_big.py b/docetaxel_skip_half_doses/my_conf/net/net_128_3_big.py new file mode 100644 index 0000000000000000000000000000000000000000..9a12e57ccfc47d7fd0a9ac9cf3647764361adac7 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_128_3_big.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=128, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(128, 256, 512), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_128_4.py b/docetaxel_skip_half_doses/my_conf/net/net_128_4.py new file mode 100644 index 0000000000000000000000000000000000000000..0dd136ffaff1c94858ad50bb075d780b7a49bc86 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_128_4.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=128, + in_channels=4, + out_channels=4, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(64, 128, 256), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_196_3_12M.py b/docetaxel_skip_half_doses/my_conf/net/net_196_3_12M.py new file mode 100644 index 0000000000000000000000000000000000000000..83fa0274707bdde54fd0e1141deec96f779b5393 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_196_3_12M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=196, + in_channels=3, + out_channels=3, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(96, 128, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_196_3_12M_no_xattn.py b/docetaxel_skip_half_doses/my_conf/net/net_196_3_12M_no_xattn.py new file mode 100644 index 0000000000000000000000000000000000000000..e13a50b93f46f33a9a15b3d39525646609e41cb2 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_196_3_12M_no_xattn.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=196, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(96, 128, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_256_1.py b/docetaxel_skip_half_doses/my_conf/net/net_256_1.py new file mode 100644 index 0000000000000000000000000000000000000000..f2139988f0a405c026dbdd29bbab2ba4d50d6cb2 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_256_1.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=1, + out_channels=1, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 128, 224), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_256_3_20M.py b/docetaxel_skip_half_doses/my_conf/net/net_256_3_20M.py new file mode 100644 index 0000000000000000000000000000000000000000..af270af831f48c45847a38cb3714d32033855957 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_256_3_20M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 128, 224), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_256_3_8M.py b/docetaxel_skip_half_doses/my_conf/net/net_256_3_8M.py new file mode 100644 index 0000000000000000000000000000000000000000..c4b1c361e525cafc7afd2f5fc6c99d4534edfd9c --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_256_3_8M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 96, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_64_4.py b/docetaxel_skip_half_doses/my_conf/net/net_64_4.py new file mode 100644 index 0000000000000000000000000000000000000000..3e9549e0228dac3d5d3c2280521d82644327244f --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_64_4.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 32 + +net = UNet2DConditionModelConfig( + sample_size=64, + in_channels=4, + out_channels=4, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(64, 96, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=64, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_66_1.py b/docetaxel_skip_half_doses/my_conf/net/net_66_1.py new file mode 100644 index 0000000000000000000000000000000000000000..ad088c92b841ccece1d8528cefe20c8cd083e98f --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_66_1.py @@ -0,0 +1,23 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 32 + +net = UNet2DConditionModelConfig( + sample_size=66, + in_channels=1, + out_channels=1, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(16, 32, 64), + norm_num_groups=8, + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=64, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/net/net_66_3_2M.py b/docetaxel_skip_half_doses/my_conf/net/net_66_3_2M.py new file mode 100644 index 0000000000000000000000000000000000000000..43f1f32ac81b719f3be41e19ea2d0e1eaeed5477 --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/net/net_66_3_2M.py @@ -0,0 +1,23 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=66, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(24, 40, 72), + norm_num_groups=8, + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/docetaxel_skip_half_doses/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json b/docetaxel_skip_half_doses/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad012575a06c66b4dfe590012c318cf4712f09f --- /dev/null +++ b/docetaxel_skip_half_doses/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.32.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": false, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "leading", + "trained_betas": null +} \ No newline at end of file diff --git a/docetaxel_skip_half_doses/net/config.json b/docetaxel_skip_half_doses/net/config.json new file mode 100644 index 0000000000000000000000000000000000000000..202de995244f243e1d591bf1bc6d5726e1152ab2 --- /dev/null +++ b/docetaxel_skip_half_doses/net/config.json @@ -0,0 +1,64 @@ +{ + "_class_name": "UNet2DConditionModel", + "_diffusers_version": "0.35.2", + "act_fn": "silu", + "addition_embed_type": null, + "addition_embed_type_num_heads": 64, + "addition_time_embed_dim": null, + "attention_head_dim": 8, + "attention_type": "default", + "block_out_channels": [ + 96, + 128, + 128 + ], + "center_input_sample": false, + "class_embed_type": null, + "class_embeddings_concat": false, + "conv_in_kernel": 3, + "conv_out_kernel": 3, + "cross_attention_dim": 64, + "cross_attention_norm": null, + "down_block_types": [ + "CrossAttnDownBlock2D", + "CrossAttnDownBlock2D", + "CrossAttnDownBlock2D" + ], + "downsample_padding": 1, + "dropout": 0.0, + "dual_cross_attention": false, + "encoder_hid_dim": null, + "encoder_hid_dim_type": null, + "flip_sin_to_cos": true, + "freq_shift": 0, + "in_channels": 3, + "layers_per_block": 2, + "mid_block_only_cross_attention": null, + "mid_block_scale_factor": 1, + "mid_block_type": "UNetMidBlock2DCrossAttn", + "norm_eps": 1e-05, + "norm_num_groups": 32, + "num_attention_heads": null, + "num_class_embeds": null, + "only_cross_attention": false, + "out_channels": 3, + "projection_class_embeddings_input_dim": null, + "resnet_out_scale_factor": 1.0, + "resnet_skip_time_act": false, + "resnet_time_scale_shift": "default", + "reverse_transformer_layers_per_block": null, + "sample_size": 196, + "time_cond_proj_dim": null, + "time_embedding_act_fn": null, + "time_embedding_dim": null, + "time_embedding_type": "positional", + "timestep_post_act": null, + "transformer_layers_per_block": 1, + "up_block_types": [ + "CrossAttnUpBlock2D", + "CrossAttnUpBlock2D", + "CrossAttnUpBlock2D" + ], + "upcast_attention": false, + "use_linear_projection": false +} diff --git a/docetaxel_skip_half_doses/video_time_encoder/config.json b/docetaxel_skip_half_doses/video_time_encoder/config.json new file mode 100644 index 0000000000000000000000000000000000000000..b910a40e475aaa21c0c9fb367ce4dcfab1ba4941 --- /dev/null +++ b/docetaxel_skip_half_doses/video_time_encoder/config.json @@ -0,0 +1,8 @@ +{ + "_class_name": "VideoTimeEncoding", + "_diffusers_version": "0.35.2", + "downscale_freq_shift": 1.0, + "encoding_dim": 128, + "flip_sin_to_cos": true, + "time_embed_dim": 64 +} diff --git a/ependymal/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py b/ependymal/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..9be4073e5a6906688538d23ece1bb9a85ebe3baf --- /dev/null +++ b/ependymal/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.BBBC021.BBBC021_196_inference import dataset + +dataset = replace( + dataset, + name=dataset.name + "_docetaxel", + path="/projects/static2dynamic/datasets/BBBC021/196x196/docetaxel", +) diff --git a/ependymal/my_conf/dataset/BBBC048/bbbc048.yaml b/ependymal/my_conf/dataset/BBBC048/bbbc048.yaml new file mode 100644 index 0000000000000000000000000000000000000000..10d8775e4a9a54bd5167de52272b15c4e3fc0d46 --- /dev/null +++ b/ependymal/my_conf/dataset/BBBC048/bbbc048.yaml @@ -0,0 +1,21 @@ +name: BBBC048_fully_ordered + +path: /projects/static2dynamic/datasets/Jurkat/brightfield_reprocessed_full_circle_augmented +path_to_single_parquet: /projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/BBBC048/BBBC048__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [ 1, 48, 48 ] + +transforms: + _target_: torchvision.transforms.v2.Compose + transforms: + - _target_: torchvision.transforms.v2.ToDtype + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + scale: true + - _target_: torchvision.transforms.v2.Normalize + mean: [ 0.5 ] + std: [ 0.5 ] + +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/ependymal/my_conf/dataset/BBBC048/bbbc048_inference.py b/ependymal/my_conf/dataset/BBBC048/bbbc048_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..502b4e3398627114cff7a979e77aad44259a0779 --- /dev/null +++ b/ependymal/my_conf/dataset/BBBC048/bbbc048_inference.py @@ -0,0 +1,7 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.BBBC048.bbbc048_inference import dataset + +dataset = replace( + dataset, path="/projects/static2dynamic/datasets/Jurkat/brightfield_reprocessed_full_circle_augmented" +) diff --git a/ependymal/my_conf/dataset/BBBC048/bbbc048_inference_fully_ordered.py b/ependymal/my_conf/dataset/BBBC048/bbbc048_inference_fully_ordered.py new file mode 100644 index 0000000000000000000000000000000000000000..ce50175d0bae05703b4e782f0b79fa33c9a33749 --- /dev/null +++ b/ependymal/my_conf/dataset/BBBC048/bbbc048_inference_fully_ordered.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.BBBC048.bbbc048_inference_fully_ordered import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/Jurkat/brightfield_reprocessed_full_circle_augmented", + path_to_single_parquet="/projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/BBBC048/BBBC048__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fa3f1f1a9e0047d8ae8803fe387ea029199b08a0 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_3ch_png_patches_380px +path: /projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml new file mode 100644 index 0000000000000000000000000000000000000000..426907c0883d4aac51c298f00f2e3f77fdda05e7 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml @@ -0,0 +1,16 @@ +name: chromaLive6h_3ch_png_patches_380px_hard_aug +path: /projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_hard_augmented +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_high_doses_fully_ordered.yaml b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_high_doses_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..095d088c10dbf722352ca184b9e348249897635d --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_high_doses_fully_ordered.yaml @@ -0,0 +1,27 @@ +name: chromaLive6h_3ch_png_patches_380px_doses_10_11_combined_fully_ordered + +path: /projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/patches_fc_many_augs +path_to_single_parquet: /projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/heldout_test_trajs_2_doses_10_11_combined__chromaLive6h_3ch_png_patches_380px_fc_many_augs/heldout_test_trajs_2_doses_10_11_combined__chromaLive6h_3ch_png_patches_380px_fc_many_augs__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [ 3, 128, 128 ] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 + +selected_dists: + +fully_ordered: true diff --git a/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml new file mode 100644 index 0000000000000000000000000000000000000000..694a2ba580d61c98606c8a5e60213ede4d0b5b5a --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_4ch_tif_patches_380px +path: /projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 4, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 65536 ] +expected_dtype: torch.uint16 +selected_dists: [ 'time_1', 'time_3', 'time_5', 'time_7', 'time_9', 'time_11', 'time_13' ] diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fc_augs_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fc_augs_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..7385ed328f08df9537b56822e47acdfe5b59c652 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fc_augs_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_inference import dataset + +dataset = replace( + dataset, + name="chromaLive6h_3ch_png_patches_380px_fc_augs", + path="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/patches_fc_augs", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fc_many_augs_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fc_many_augs_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..9df2b90a3d0d14c629f6cf74f3fc7897d7bad769 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fc_many_augs_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_inference import dataset + +dataset = replace( + dataset, + name="chromaLive6h_3ch_png_patches_380px_fc_many_augs", + path="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/patches_fc_many_augs", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fully_ordered_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..f8e0a27a92df21579a44138a19ee24915d466d69 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_fully_ordered_inference.py @@ -0,0 +1,9 @@ +from dataclass import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_fully_ordered_inference import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches", + path_to_single_parquet="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/chromaLive6h_3ch_png_patches_380px__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..c3c2703586c9673d9b7aa219bd55d103612cd61d --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_inference import dataset + +dataset = replace( + dataset, + name="chromaLive6h_3ch_png_patches_380px_hard_aug", + path="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_hard_augmented", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..a6365c4c355acf8d3920e660bc327b87dd553b27 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py @@ -0,0 +1,8 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_inference import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive_fully_ordered_with_fc_many_augs_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive_fully_ordered_with_fc_many_augs_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..a77f4e8d70edf088195c59f04c9df1853ca67523 --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive_fully_ordered_with_fc_many_augs_inference.py @@ -0,0 +1,15 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_fully_ordered_inference import dataset + +# This is the "classical" "patches" dataset (with all patches of the regular rectangular grid of field), +# but ordered with the pseudotime models (LDA + sppline) fitted on the "fc augs" version of the dataset (random augs!). +# The main use of this is for generating full fields on the high doses (note that high doses filetring needs to be additionally performed!), +# as the high dose training was done on fc augs versions + +dataset = replace( + dataset, + name="chromalive_high_doses_fully_ordered_with_fc_many_augs_inference", + path="/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/patches", + path_to_single_parquet="/projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/inference_on_base_non_augmented_data__chromaLive6h_3ch_png_patches_380px/inference_on_base_non_augmented_data__chromaLive6h_3ch_png_patches_380px__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", +) diff --git a/ependymal/my_conf/dataset/ChromaLive6h/chromalive_high_doses_fc_many_augs_fully_ordered_inference.py b/ependymal/my_conf/dataset/ChromaLive6h/chromalive_high_doses_fc_many_augs_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..21353a2c279317fa9a3086ff65278b5d0a69e83a --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLive6h/chromalive_high_doses_fc_many_augs_fully_ordered_inference.py @@ -0,0 +1,13 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.ChromaLive6h.chromalive6h_3ch_png_fully_ordered_inference import dataset + +path = "/projects/static2dynamic/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/patches_fc_many_augs" + +dataset = replace( + dataset, + name="chromaLive6h_3ch_png_patches_380px_fc_many_augs_fully_ordered", + path=path, + path_to_single_parquet="/projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/heldout_test_trajs_2_doses_10_11_combined__chromaLive6h_3ch_png_patches_380px_fc_many_augs/heldout_test_trajs_2_doses_10_11_combined__chromaLive6h_3ch_png_patches_380px_fc_many_augs__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + hard_aug_path=path, # fake hard_aug path +) diff --git a/ependymal/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml b/ependymal/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml new file mode 100644 index 0000000000000000000000000000000000000000..491c42c2bc5ecc036ec55de7ede90b8c1ed88a8b --- /dev/null +++ b/ependymal/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml @@ -0,0 +1,19 @@ +name: chromalive_tl_24h_380px +path: /projects/static2dynamic/datasets/20230920ChromaLiveTL_24hr4ch/ch_4_3_1___norm_whole_ds_per_channel_per_zslice_0_99perc___patches_380 +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] # move to [-1:1] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: ['time_1', 'time_7', 'time_13', 'time_19', 'time_25', 'time_31', 'time_37', 'time_43', 'time_49', 'time_55', 'time_61', 'time_67', 'time_73', 'time_79', 'time_85', 'time_91', 'time_97', 'time_103', 'time_109', 'time_115', 'time_121', 'time_127', 'time_133', 'time_139', 'time_145'] diff --git a/ependymal/my_conf/dataset/DeepCycle/deepcycle_brightfield_to_3D_inference.py b/ependymal/my_conf/dataset/DeepCycle/deepcycle_brightfield_to_3D_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..5d5c7af253559ce6fbec7561ff59e4a9f9c7e4e6 --- /dev/null +++ b/ependymal/my_conf/dataset/DeepCycle/deepcycle_brightfield_to_3D_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.DeepCycle.deepcycle_brightfield_to_3D_inference import dataset + +dataset.path = "/projects/imagesets2/DeepCycle/cells/128x128" diff --git a/ependymal/my_conf/dataset/DeepCycle/deepcycle_hoechst_brightfield_to_3D_inference.py b/ependymal/my_conf/dataset/DeepCycle/deepcycle_hoechst_brightfield_to_3D_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..4ffcf9696a44cd5652089f937d88e2b630002f32 --- /dev/null +++ b/ependymal/my_conf/dataset/DeepCycle/deepcycle_hoechst_brightfield_to_3D_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.DeepCycle.deepcycle_hoechst_brightfield_to_3D_inference import dataset + +dataset.path = "/projects/imagesets2/DeepCycle/cells/128x128" diff --git a/ependymal/my_conf/dataset/DeepCycle/deepcycle_inference.py b/ependymal/my_conf/dataset/DeepCycle/deepcycle_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..f4f7cd69d76b72676b9513a5e44dc91ccf130028 --- /dev/null +++ b/ependymal/my_conf/dataset/DeepCycle/deepcycle_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.DeepCycle.deepcycle_inference import dataset + +dataset.path = "/projects/imagesets2/DeepCycle/cells/128x128" diff --git a/ependymal/my_conf/dataset/DeepCycle/deepcycle_markers_inference.py b/ependymal/my_conf/dataset/DeepCycle/deepcycle_markers_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..129730fd4014e545f15100c50b4fd60481782e17 --- /dev/null +++ b/ependymal/my_conf/dataset/DeepCycle/deepcycle_markers_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.DeepCycle.deepcycle_markers_inference import dataset + +dataset.path = "/projects/imagesets2/DeepCycle/cells/128x128" diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat.yaml b/ependymal/my_conf/dataset/Jurkat/Jurkat.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6dae2eb460d55c87abf178bad5c7a2f4d43587cb --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat.yaml @@ -0,0 +1,16 @@ +name: Jurkat +path: /projects/static2dynamic/datasets/Jurkat/rgb_images_all_cell_cycles +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml b/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7c4133274ac9c90bb7ec8fde4fe2736a3724fa30 --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml @@ -0,0 +1,23 @@ +name: Jurkat_brightfield_fully_ordered + +path: /projects/static2dynamic/datasets/Jurkat/brightfield_reprocessed +path_to_single_parquet: /projects/static2dynamic/datasets/Jurkat/Jurkat_brightfield__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [ 1, 66, 66 ] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5 ] + std: [ 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered_inference.py b/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..b847a2ea0da14b9271d0561105275ead359de4c7 --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.Jurkat.Jurkat_brightfield_fully_ordered_inference import dataset + +dataset.path = "/projects/static2dynamic/datasets/Jurkat/brightfield_reprocessed" +dataset.path_to_single_parquet = "/projects/static2dynamic/datasets/Jurkat/Jurkat_brightfield__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet" diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_inference.py b/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..9d9cf49c06507bbebc2f57319f952ce9d5a3073b --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat_brightfield_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.Jurkat.Jurkat_brightfield_inference import dataset + +dataset.path = "/projects/static2dynamic/datasets/Jurkat/brightfield_reprocessed" diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml b/ependymal/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..24e6e21de17a84ad77fba0ddd54fa0f770ea3cdf --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: Jurkat_fully_ordered_dinov2_regs_giant_ds_preproc +path: /projects/static2dynamic/datasets/Jurkat/rgb_images_all_cell_cycles +path_to_single_parquet: /projects/static2dynamic/datasets/Jurkat/Jurkat__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 66, 66 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat_inference.py b/ependymal/my_conf/dataset/Jurkat/Jurkat_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..8f9c110d8ff54daa5c3671481b9580b407d01724 --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat_inference.py @@ -0,0 +1,8 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.Jurkat.Jurkat_inference import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/Jurkat/rgb_images_all_cell_cycles", +) diff --git a/ependymal/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py b/ependymal/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py new file mode 100644 index 0000000000000000000000000000000000000000..cc826ec44e040ea3bdf9931f7434e47f5345cb9c --- /dev/null +++ b/ependymal/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py @@ -0,0 +1,8 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.Jurkat.Jurkat_inference import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/Jurkat/rgb_images_all_cell_cycles_hard_augmented", +) diff --git a/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml b/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a53dc5ec231d267cb6fcdc50c7166e5a792c0d32 --- /dev/null +++ b/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml @@ -0,0 +1,24 @@ +name: NASH_fibrosis +path: /projects/static2dynamic/datasets/NASH/prepared_data/fibrosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered_inference.py b/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..58a1b0331176b90a44a2209db56dba19005ef998 --- /dev/null +++ b/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_fully_ordered_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.NASH_fibrosis.NASH_fibrosis_fully_ordered_inference import dataset + +dataset.path = "/projects/static2dynamic/datasets/NASH/prepared_data/fibrosis" +dataset.path_to_single_parquet = "/projects/static2dynamic/datasets/NASH/prepared_data/NASH_fibrosis__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet" diff --git a/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py b/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..c9e9e16f31c3c75bb780bc4832868bd0c6cebcce --- /dev/null +++ b/ependymal/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.NASH_fibrosis.NASH_fibrosis_inference import dataset + +dataset.path = "/projects/static2dynamic/datasets/NASH/prepared_data/fibrosis" diff --git a/ependymal/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml b/ependymal/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..663b957dadc1791cc3cefb75d269b3579204ea5c --- /dev/null +++ b/ependymal/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml @@ -0,0 +1,24 @@ +name: NASH_steatosis +path: /projects/static2dynamic/datasets/NASH/prepared_data/steatosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/ependymal/my_conf/dataset/NASH_steatosis/NASH_steatosis_fully_ordered.yaml b/ependymal/my_conf/dataset/NASH_steatosis/NASH_steatosis_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2ee2b473282b4c7882ddced978e0b4165481f237 --- /dev/null +++ b/ependymal/my_conf/dataset/NASH_steatosis/NASH_steatosis_fully_ordered.yaml @@ -0,0 +1,26 @@ +name: NASH_steatosis_fully_ordered_dinov2_regs_giant_ds_preproc +path: /projects/static2dynamic/datasets/NASH/prepared_data/steatosis +path_to_single_parquet: /projects/static2dynamic/datasets/NASH/prepared_data/NASH_steatosis__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] +fully_ordered: true diff --git a/ependymal/my_conf/dataset/biotine/biotine_png_128.yaml b/ependymal/my_conf/dataset/biotine/biotine_png_128.yaml new file mode 100644 index 0000000000000000000000000000000000000000..49ffb167b04d435655c47b359aa8df480319f587 --- /dev/null +++ b/ependymal/my_conf/dataset/biotine/biotine_png_128.yaml @@ -0,0 +1,19 @@ +name: biotine_png +path: /projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/ependymal/my_conf/dataset/biotine/biotine_png_128_fully_ordered.yaml b/ependymal/my_conf/dataset/biotine/biotine_png_128_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3cceb83582d9dff9cd838ae1c5f4ac34f99b2af2 --- /dev/null +++ b/ependymal/my_conf/dataset/biotine/biotine_png_128_fully_ordered.yaml @@ -0,0 +1,21 @@ +name: biotine_png_fully_ordered +path: /projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +path_to_single_parquet: /projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/biotine_png__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] +fully_ordered: true diff --git a/ependymal/my_conf/dataset/biotine/biotine_png_128_fully_ordered_inference.py b/ependymal/my_conf/dataset/biotine/biotine_png_128_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..c0ba77af280d7f14f8cf140a19b146664524c38b --- /dev/null +++ b/ependymal/my_conf/dataset/biotine/biotine_png_128_fully_ordered_inference.py @@ -0,0 +1,18 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.biotine.biotine_png_128_inference import dataset +from GaussianProxy.utils.data import ContinuousTimeImageDataset + +assert dataset.dataset_params is not None +updated_ds_params = replace( + dataset.dataset_params, + dataset_class=ContinuousTimeImageDataset, +) + +dataset = replace( + dataset, + fully_ordered=True, + path="/projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255", + path_to_single_parquet="/projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/biotine_png__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=updated_ds_params, +) diff --git a/ependymal/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml b/ependymal/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml new file mode 100644 index 0000000000000000000000000000000000000000..07044d90813fe3acadb1a0d996adc1277f60ccbe --- /dev/null +++ b/ependymal/my_conf/dataset/biotine/biotine_png_128_hard_aug.yaml @@ -0,0 +1,16 @@ +name: biotine_png_hard_aug +path: /projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255_hard_augmented +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/ependymal/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py b/ependymal/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..5fda38ec48345e97464fead2ea49563c1c484cc9 --- /dev/null +++ b/ependymal/my_conf/dataset/biotine/biotine_png_128_hard_aug_inference.py @@ -0,0 +1,8 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.biotine.biotine_png_128_hard_aug_inference import dataset + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255_hard_augmented", +) diff --git a/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_crop_fully_ordered.yaml b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_crop_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a485ac70368ed67577f3e43766139422a2315b58 --- /dev/null +++ b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_crop_fully_ordered.yaml @@ -0,0 +1,25 @@ +name: diabetic_retinopathy_2048_crop_fully_ordered + +path: /projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset_full_circle_augmented +path_to_single_parquet: /projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/balanced_classes__diabetic_retinopathy_2048_crop/balanced_classes__diabetic_retinopathy_2048_crop__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 256, 256] + +transforms: + _target_: torchvision.transforms.v2.Compose + transforms: + - _target_: torchvision.transforms.v2.CenterCrop + size: 2048 + - _target_: torchvision.transforms.v2.Resize + size: 256 + - _target_: torchvision.transforms.v2.ToDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} + scale: true + - _target_: torchvision.transforms.v2.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_precrop_fully_ordered_inference.py b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_precrop_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..4e3f3c6ec6fc7e00fdcb66dc52987ec5eb87b459 --- /dev/null +++ b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2048_precrop_fully_ordered_inference.py @@ -0,0 +1,18 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_full_circle_augs_2048_precrop_inference import ( + dataset, +) +from GaussianProxy.utils.data import ContinuousTimeImageDataset + +assert dataset.dataset_params is not None +ds_params = replace(dataset.dataset_params, dataset_class=ContinuousTimeImageDataset) + + +dataset = replace( + dataset, + path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset_full_circle_augmented_2048_crop", + path_to_single_parquet="/projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/diabetic_retinopathy_full_circle_augs_2048_precrop/diabetic_retinopathy_full_circle_augs_2048_precrop__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + fully_ordered=True, + dataset_params=ds_params, +) diff --git a/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_inference.py b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..1b4d5afef51491f9cb4907ab3c6f7a2eebf301b4 --- /dev/null +++ b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_full_circle_augs_2560_crop_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_full_circle_augs_2560_crop_inference import ( + dataset, +) + +dataset = replace( + dataset, path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset_full_circle_augmented" +) diff --git a/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered_inference.py b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..c03ee29545d35168424e0d9541358fd77f66791f --- /dev/null +++ b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_fully_ordered_inference.py @@ -0,0 +1,15 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_inference import dataset +from GaussianProxy.utils.data import ContinuousTimeImageDataset + +assert dataset.dataset_params is not None +updated_ds_params = replace(dataset.dataset_params, dataset_class=ContinuousTimeImageDataset) + +dataset = replace( + dataset, + fully_ordered=True, + path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset/train", + path_to_single_parquet="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset/diabetic_retinopathy__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + dataset_params=updated_ds_params, +) diff --git a/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..4f92904332804efa76648f229efa8d99331c7800 --- /dev/null +++ b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_hard_aug_inference.py @@ -0,0 +1,9 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_inference import dataset + +dataset = replace( + dataset, + name="diabetic_retinopathy_inference_hard_augmented", + path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset/train_hard_augmented", +) diff --git a/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..be31075247d1bb02e35ebcd777f233e0ecba9a55 --- /dev/null +++ b/ependymal/my_conf/dataset/diabetic_retinopathy/diabetic_retinopathy_inference.py @@ -0,0 +1,5 @@ +from dataclasses import replace + +from GaussianProxy.conf.dataset.diabetic_retinopathy.diabetic_retinopathy_inference import dataset + +dataset = replace(dataset, path="/projects/static2dynamic/datasets/DiabeticRetinopathy/prepared_dataset/train") diff --git a/ependymal/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered_inference.py b/ependymal/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..b216741f454716031f9c01fa984ce0da9a1d64d6 --- /dev/null +++ b/ependymal/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered_inference.py @@ -0,0 +1,18 @@ +from dataclasses import replace + +from GaussianProxy.utils.data import ContinuousTimeImageDataset +from my_conf.dataset.ependymal_cutout.ependymal_cutout_01_noised_fc_augs_sep_gt_inference import dataset + +assert dataset.dataset_params is not None +dataset_params = replace( + dataset.dataset_params, + dataset_class=ContinuousTimeImageDataset, +) + +dataset = replace( + dataset, + fully_ordered=True, + path_to_single_parquet="/projects/static2dynamic/Thomas/ordering_datasets/facebook_dinov2-with-registers-giant_dataset_preproc/ependymal_cutout_01_noised_full_circle_augs/ependymal_cutout_01_noised_full_circle_augs__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet", + selected_dists=["all_imgs"], + dataset_params=dataset_params, +) diff --git a/ependymal/my_conf/net/net_66_3_2M.py b/ependymal/my_conf/net/net_66_3_2M.py new file mode 100644 index 0000000000000000000000000000000000000000..43f1f32ac81b719f3be41e19ea2d0e1eaeed5477 --- /dev/null +++ b/ependymal/my_conf/net/net_66_3_2M.py @@ -0,0 +1,23 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=66, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(24, 40, 72), + norm_num_groups=8, + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/ependymal/my_conf/net/net_diabetic_retinopathy.py b/ependymal/my_conf/net/net_diabetic_retinopathy.py new file mode 100644 index 0000000000000000000000000000000000000000..deff587c95295fd429062a9ffd3e280a8530e92d --- /dev/null +++ b/ependymal/my_conf/net/net_diabetic_retinopathy.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 128, 256), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/ependymal/my_conf/scheduler/DDIM_3k_vpred_tresh_SNR_trailing.json b/ependymal/my_conf/scheduler/DDIM_3k_vpred_tresh_SNR_trailing.json new file mode 100644 index 0000000000000000000000000000000000000000..f7994596907c2a827c8d9941c86adb19ed8e43f2 --- /dev/null +++ b/ependymal/my_conf/scheduler/DDIM_3k_vpred_tresh_SNR_trailing.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.32.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": true, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "trailing", + "trained_betas": null +} \ No newline at end of file diff --git a/ependymal/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json b/ependymal/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad012575a06c66b4dfe590012c318cf4712f09f --- /dev/null +++ b/ependymal/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.32.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": false, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "leading", + "trained_betas": null +} \ No newline at end of file diff --git a/nocodazole/dynamic/scheduler_config.json b/nocodazole/dynamic/scheduler_config.json new file mode 100644 index 0000000000000000000000000000000000000000..13ba576441b70aaf967ceb76f1383c9f4ec1c7da --- /dev/null +++ b/nocodazole/dynamic/scheduler_config.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.35.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": false, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "leading", + "trained_betas": null +} diff --git a/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel.yaml b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fdf54a75447f6740bbab9730af5a70e345193f01 --- /dev/null +++ b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel.yaml @@ -0,0 +1,16 @@ +name: BBBC021_196_docetaxel +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +data_shape: [3, 196, 196] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e5dbdc51d99f08dcc6456a96021ab17b5dcf70bd --- /dev/null +++ b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: BBBC021_196_docetaxel_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_docetaxel__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 196, 196] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..64963aa48595e8d34affd33eeac1c61577f9180d --- /dev/null +++ b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_hard_aug_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.BBBC021_196_hard_aug_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel_hard_augmented" +dataset.name += "_docetaxel" diff --git a/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..95ff8768553ef62ad5d542799cd8d340a1b6d1c0 --- /dev/null +++ b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_docetaxel_inference.py @@ -0,0 +1,4 @@ +from GaussianProxy.conf.dataset.BBBC021_196_inference import BBBC021_196_inference as BBBC021_196_docetaxel_inference + +BBBC021_196_docetaxel_inference.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/docetaxel" +BBBC021_196_docetaxel_inference.name += "_docetaxel" diff --git a/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_nocodazole_fully_ordered.yaml b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_nocodazole_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..863dea28cd618aa2ecdf15943413c376e9874798 --- /dev/null +++ b/nocodazole/my_conf/dataset/BBBC021/BBBC021_196_nocodazole_fully_ordered.yaml @@ -0,0 +1,23 @@ +name: BBBC021_196_nocodazole_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/nocodazole +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/BBBC021/196x196/BBBC021_196_nocodazole__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet + +data_shape: [3, 196, 196] + +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ef3ad70671ccf58068e081ef2494d86bfce86ee --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_3ch_png_patches_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_fully_ordered.yaml b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..192b16ccd121227f6cc53ab2a5b8d68726ced00f --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_fully_ordered.yaml @@ -0,0 +1,21 @@ +name: chromaLive6h_3ch_png_patches_380px_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ChromaLive_6hr_4ch/MIP_normalized/patches_380px +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ChromaLive_6hr_4ch/MIP_normalized/chromaLive6h_3ch_png_patches_380px__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml new file mode 100644 index 0000000000000000000000000000000000000000..71515cb3816237a88fe5140ee9434a33dd780638 --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_3ch_png_hard_aug.yaml @@ -0,0 +1,16 @@ +name: chromaLive6h_3ch_png_patches_380px_hard_aug +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_380px_hard_augmented +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5 ] +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +selected_dists: diff --git a/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml new file mode 100644 index 0000000000000000000000000000000000000000..62683e675a34283a0abe73fbda931f6c34a65dd1 --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLive6h/ChromaLive6h_4ch_tif.yaml @@ -0,0 +1,19 @@ +name: chromaLive6h_4ch_tif_patches_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches +data_shape: [ 4, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5, 0.5 ] # move to [-1:1] + std: [ 0.5, 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 65536 ] +expected_dtype: torch.uint16 +selected_dists: [ 'time_1', 'time_3', 'time_5', 'time_7', 'time_9', 'time_11', 'time_13' ] diff --git a/nocodazole/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py b/nocodazole/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..d458f5bd6629995bfe66556c11b44d6162ef32ea --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_hard_aug_inference.py @@ -0,0 +1,33 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize, Resize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 128 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + Resize(DEFINITION), + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name.split("_")[1]), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="chromaLive6h_3ch_png_patches_380px_hard_aug", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, # not used + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches_hard_augmented", +) diff --git a/nocodazole/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py b/nocodazole/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..186980265e1f3f16e37371ad19289a9a4f3c2ffb --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLive6h/chromalive6h_3ch_png_inference.py @@ -0,0 +1,33 @@ +from torch import float32 +from torchvision.transforms import Compose, ConvertImageDtype, Normalize, Resize + +from GaussianProxy.conf.training_conf import DataSet, DatasetParams +from GaussianProxy.utils.data import ImageDataset + +DEFINITION = 128 +NUMBER_OF_CHANNELS = 3 + +transforms = Compose( + transforms=[ + Resize(DEFINITION), + ConvertImageDtype(float32), + Normalize(mean=[0.5] * NUMBER_OF_CHANNELS, std=[0.5] * NUMBER_OF_CHANNELS), + ] +) + +ds_params = DatasetParams( + file_extension="png", + key_transform=str, + sorting_func=lambda subdir: int(subdir.name.split("_")[1]), + dataset_class=ImageDataset, +) + +dataset = DataSet( + name="chromaLive6h_3ch_png_patches_380px", + data_shape=(NUMBER_OF_CHANNELS, DEFINITION, DEFINITION), + transforms=transforms, + selected_dists=None, # not used + expected_initial_data_range=(0, 255), + dataset_params=ds_params, + path="/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20231017ChromaLive_6hr_4ch/MIP_normalized/paired_dataset/patches", +) diff --git a/nocodazole/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml b/nocodazole/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4e3481fc1eb7ea793bafcace11a4fa1e73a546d7 --- /dev/null +++ b/nocodazole/my_conf/dataset/ChromaLiveTL24h/ChromaLiveTL24h.yaml @@ -0,0 +1,19 @@ +name: chromalive_tl_24h_380px +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/20230920ChromaLiveTL_24hr4ch/ch_4_3_1___norm_whole_ds_per_channel_per_zslice_0_99perc___patches_380 +data_shape: [3, 256, 256] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 256 + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] # move to [-1:1] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: ['time_1', 'time_7', 'time_13', 'time_19', 'time_25', 'time_31', 'time_37', 'time_43', 'time_49', 'time_55', 'time_61', 'time_67', 'time_73', 'time_79', 'time_85', 'time_91', 'time_97', 'time_103', 'time_109', 'time_115', 'time_121', 'time_127', 'time_133', 'time_139', 'time_145'] diff --git a/nocodazole/my_conf/dataset/DeepCycle/deepcycle_fully_ordered.yaml b/nocodazole/my_conf/dataset/DeepCycle/deepcycle_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..778d76cd8a32c2a364386b9c5b52307e8bfa1c3c --- /dev/null +++ b/nocodazole/my_conf/dataset/DeepCycle/deepcycle_fully_ordered.yaml @@ -0,0 +1,19 @@ +name: deepcycle_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/128x128 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/deepcycle_brightfield_to_3D__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [4, 128, 128] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/DeepCycle/deepcycle_markers_crop_fully_ordered.yaml b/nocodazole/my_conf/dataset/DeepCycle/deepcycle_markers_crop_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..756279f94ac70c5a6db27c33bda5f5a0dd77c086 --- /dev/null +++ b/nocodazole/my_conf/dataset/DeepCycle/deepcycle_markers_crop_fully_ordered.yaml @@ -0,0 +1,21 @@ +name: deepcycle_markers_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/128x128 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/deepcycle_markers__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [4, 64, 64] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry + - _target_: torchvision.transforms.CenterCrop + size: 64 +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/DeepCycle/deepcycle_markers_fully_ordered.yaml b/nocodazole/my_conf/dataset/DeepCycle/deepcycle_markers_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c9e8fd9da2d3c19c7c74c2159329f79484e530ca --- /dev/null +++ b/nocodazole/my_conf/dataset/DeepCycle/deepcycle_markers_fully_ordered.yaml @@ -0,0 +1,19 @@ +name: deepcycle_markers_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/128x128 +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/DeepCycle/deepcycle_markers__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [4, 128, 128] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +selected_dists: +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/Jurkat/Jurkat.yaml b/nocodazole/my_conf/dataset/Jurkat/Jurkat.yaml new file mode 100644 index 0000000000000000000000000000000000000000..368e450b3ecebb42b3ac841777b62490f58da62f --- /dev/null +++ b/nocodazole/my_conf/dataset/Jurkat/Jurkat.yaml @@ -0,0 +1,16 @@ +name: Jurkat +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 diff --git a/nocodazole/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml b/nocodazole/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..02ec7af18cd19705804c3eb3104126fab60bbf99 --- /dev/null +++ b/nocodazole/my_conf/dataset/Jurkat/Jurkat_brightfield_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: Jurkat_brightfield_fully_ordered +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/brightfield_reprocessed +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/Jurkat_brightfield__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [ 1, 66, 66 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [ 0.5 ] + std: [ 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [ 0, 255 ] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml b/nocodazole/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..593c89330d33ad7fb34415c1c32ec8b000782151 --- /dev/null +++ b/nocodazole/my_conf/dataset/Jurkat/Jurkat_fully_ordered.yaml @@ -0,0 +1,18 @@ +name: Jurkat_fully_ordered_dinov2_regs_giant_ds_preproc +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/Jurkat__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +data_shape: [3, 66, 66] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.ConvertImageDtype # this also scales to [0; 1] + dtype: ${torch_dtype:float32} # passed dtype must be accessible as a "torch" attribute + - _target_: torchvision.transforms.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 +fully_ordered: true diff --git a/nocodazole/my_conf/dataset/Jurkat/Jurkat_inference.py b/nocodazole/my_conf/dataset/Jurkat/Jurkat_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..19eeca252f8c5ada8889f0c325667ccb41f9d904 --- /dev/null +++ b/nocodazole/my_conf/dataset/Jurkat/Jurkat_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.Jurkat_inference import Jurkat_inference + +Jurkat_inference.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles" diff --git a/nocodazole/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py b/nocodazole/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py new file mode 100644 index 0000000000000000000000000000000000000000..52ecd6ca5f22d5c85cf023d4c6267d0b82ea0868 --- /dev/null +++ b/nocodazole/my_conf/dataset/Jurkat/Jurkat_inference_hard_aug.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.Jurkat_inference import Jurkat_inference as dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/Jurkat/rgb_images_all_cell_cycles_hard_augmented" diff --git a/nocodazole/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml b/nocodazole/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..790a00b0e4eeafd72803a1d0d09c4ce7f38b0d72 --- /dev/null +++ b/nocodazole/my_conf/dataset/NASH_fibrosis/NASH_fibrosis.yaml @@ -0,0 +1,24 @@ +name: NASH_fibrosis +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/fibrosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/nocodazole/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py b/nocodazole/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py new file mode 100644 index 0000000000000000000000000000000000000000..beaa73768127015587be2b2e3cb370bf9ebea96b --- /dev/null +++ b/nocodazole/my_conf/dataset/NASH_fibrosis/NASH_fibrosis_inference.py @@ -0,0 +1,3 @@ +from GaussianProxy.conf.dataset.NASH_fibrosis_inference import dataset + +dataset.path = "/lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/prepared_data/fibrosis" diff --git a/nocodazole/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml b/nocodazole/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c4ba0a5653d4793a9819c242a253cf1df4354e45 --- /dev/null +++ b/nocodazole/my_conf/dataset/NASH_steatosis/NASH_steatosis.yaml @@ -0,0 +1,24 @@ +name: NASH_steatosis +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/NASH/steatosis +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + # Convert to float32 (and normalize to [0, 1]) before resizing + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + # Random crop from 299x299 to 192x192, then resize to 128x128 + - _target_: torchvision.transforms.RandomCrop + size: 192 + - _target_: torchvision.transforms.Resize + size: 128 + # Normalize to [-1, 1] + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + # Random 8x square augmentations + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/nocodazole/my_conf/dataset/biotine/biotine_png_128.yaml b/nocodazole/my_conf/dataset/biotine/biotine_png_128.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f51f8d81d9da0d79cfb73e3acbe35e33cdf0b353 --- /dev/null +++ b/nocodazole/my_conf/dataset/biotine/biotine_png_128.yaml @@ -0,0 +1,19 @@ +name: biotine_png +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/biotine/3_channels_min_99_perc_normalized_rgb_stacks_png/patches_255 +data_shape: [ 3, 128, 128 ] +transforms: + _target_: torchvision.transforms.transforms.Compose + transforms: + - _target_: torchvision.transforms.transforms.Resize + size: 128 + # ConvertImageDtype also scales to [0; 1] (from the *implicit* expected range that depends on the incoming dtype...) + - _target_: torchvision.transforms.ConvertImageDtype + dtype: ${torch_dtype:float32} + - _target_: torchvision.transforms.Normalize + mean: [ 0.5, 0.5, 0.5 ] + std: [ 0.5, 0.5, 0.5 ] + - _target_: torchvision.transforms.RandomHorizontalFlip + - _target_: torchvision.transforms.RandomVerticalFlip + - _target_: GaussianProxy.utils.data.RandomRotationSquareSymmetry +selected_dists: +expected_initial_data_range: [ 0, 255 ] diff --git a/nocodazole/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered.yaml b/nocodazole/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered.yaml new file mode 100644 index 0000000000000000000000000000000000000000..15a60823206138f8997ae091ac5ab12c1ef59a10 --- /dev/null +++ b/nocodazole/my_conf/dataset/ependymal_cutout/ependymal_cutout_01_noised_fc_augs_sep_gt_fully_ordered.yaml @@ -0,0 +1,23 @@ +name: ependymal_cutout_01_noised_full_circle_augs_separate_gt_fully_ordered + +path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_noised_0.1_crop_full_circle_augmented/all_imgs +path_to_single_parquet: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/ependymal_cutout_01_noised_full_circle_augs__continuous_time_predictions__facebook_dinov2-with-registers-giant_dataset_preproc.parquet +separate_gt_starting_class_path: /lustre/fsn1/projects/rech/icr/ufc43hj/datasets/ependymal/prepared_dataset_noised_0.1_crop_full_circle_augmented/ground_truths/1 + +data_shape: [3, 256, 256] + +transforms: + _target_: torchvision.transforms.v2.Compose + transforms: + - _target_: torchvision.transforms.v2.ToDtype + dtype: ${torch_dtype:float32} + scale: true + - _target_: torchvision.transforms.v2.Normalize + mean: [0.5, 0.5, 0.5] + std: [0.5, 0.5, 0.5] + - _target_: torchvision.transforms.RandomVerticalFlip + +expected_initial_data_range: [0, 255] +expected_dtype: torch.uint8 + +fully_ordered: true diff --git a/nocodazole/my_conf/hydra/job_logging/custom.yaml b/nocodazole/my_conf/hydra/job_logging/custom.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b9e2c72c4ffc16496213000cbc9870eef22ac167 --- /dev/null +++ b/nocodazole/my_conf/hydra/job_logging/custom.yaml @@ -0,0 +1,37 @@ +version: 1 +formatters: + simple: + format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s' + colorlog: + (): colorlog.ColoredFormatter + format: '[%(cyan)s%(asctime)s%(reset)s][%(blue)s%(name)s%(reset)s][%(log_color)s%(levelname)s%(reset)s] - %(message)s' + log_colors: + DEBUG: purple + INFO: green + WARNING: yellow + ERROR: red + CRITICAL: red +handlers: + console: + class: logging.StreamHandler + formatter: colorlog + stream: ext://sys.stdout + level: INFO + file: + class: logging.FileHandler + formatter: simple + filename: ${hydra:run.dir}/logs.log # unify logs from launcher and script + level: DEBUG +root: + level: DEBUG + handlers: + - console + - file +logger: + matplotlib: + level: INFO + PIL.PngImagePlugin: + level: WARNING + PIL: + level: WARNING +disable_existing_loggers: true diff --git a/nocodazole/my_conf/my_inference_conf.py b/nocodazole/my_conf/my_inference_conf.py new file mode 100644 index 0000000000000000000000000000000000000000..0908b8bf6dcc24fc06aae2cd7cf43357589a88a7 --- /dev/null +++ b/nocodazole/my_conf/my_inference_conf.py @@ -0,0 +1,95 @@ +# ruff: noqa: F401 + +from datetime import datetime +from pathlib import Path + +from torch import bfloat16, float16, float32 + +from GaussianProxy.conf.inference_conf import InferenceConfig, ProfileConfig +from GaussianProxy.conf.training_conf import ( + Accelerate, + AccelerateLaunchArgs, + ForwardNoising, + ForwardNoisingLinearScaling, + InversionRegenerationOnly, + InvertedRegeneration, + IterativeInvertedRegeneration, + MetricsComputation, + SimilarityWithTrainData, + SimpleGeneration, + Slurm, +) + +# -------------------------------------------- Dataset -------------------------------------------- +from my_conf.dataset.biotine_png_128_inference import dataset + +# --------------------------------------------- Model --------------------------------------------- +root_experiments_path = Path("/lustre/fsn1/projects/rech/icr/ufc43hj/experiments") +project_name = "GaussianProxy" +run_name = "biotine_all_paired_new_jz" + +# ------------------------------------------ Evaluations ------------------------------------------ +eval_strats = [ + # InvertedRegeneration( + # nb_diffusion_timesteps=100, + # name="InvertedRegeneration_100_diffsteps_no_SNR_leading_f32_J_14_fld_2", + # nb_generated_samples=64, + # plate_name_to_simulate="J_14_fld_2", + # nb_video_times_in_parallel=3, + # nb_video_timesteps=19, + # n_rows_displayed=8, + # ), + # MetricsComputation( + # nb_samples_to_gen_per_time="adapt aug", + # batch_size=512 + 32, + # nb_diffusion_timesteps=100, + # selected_times=[1, 5, 10, 15, 19], + # name="MetricsComputation_100_diffsteps_no_SNR_leading_f32_adapt_aug", + # regen_images=False, + # ), + # InversionRegenerationOnly( + # nb_diffusion_timesteps=100, + # name="InversionRegenerationOnly_100_diffsteps_no_SNR_leading_f32", + # nb_generated_samples=64, + # plate_name_to_simulate="M_13_fld_3", + # n_rows_displayed=8, + # ) +] + + +# ------------------------------------------ Profiling -------------------------------------------- +# fmt: off +profile_conf = ProfileConfig( + enabled = False, + record_shapes = False, + profile_memory = True, + with_stack = True, + with_flops = False, + export_chrome_trace = False, +) + + +# ------------------------------------------ Final Config ----------------------------------------- +inference_conf = InferenceConfig( + # Choose the experiment (trained model weights) + root_experiments_path = root_experiments_path, + project_name = project_name, + run_name = run_name, + # Choose a custom scheduler + # scheduler_config = Path("my_conf", "scheduler", "DDIM_3k_vpred_tresh_leading.json"), + # Output directory (where to put the generated images / tensors) + output_dir = Path(root_experiments_path, project_name, run_name, "inferences"), + # Device + device = "cuda:2", + # Optimizations + compile = True, + dtype = float32, + # Data + dataset = dataset, + # Evaluations + evaluation_strategies = eval_strats, # pyright: ignore[reportArgumentType] + # Profiling + profiling = profile_conf, + # Temp Dir + tmpdir_location = "/tmp", +) diff --git a/nocodazole/my_conf/my_training_conf.py b/nocodazole/my_conf/my_training_conf.py new file mode 100644 index 0000000000000000000000000000000000000000..6cd4769c909326b1f2d69baa32a1ea3d05eb89fd --- /dev/null +++ b/nocodazole/my_conf/my_training_conf.py @@ -0,0 +1,203 @@ +from datetime import datetime + +from omegaconf import MISSING + +################################################################################################### +############################################ Base conf ############################################ +################################################################################################### +# These are generic classes that need full instantiation +# pylint: disable=unused-import +from GaussianProxy.conf.training_conf import ( + Accelerate, + AccelerateLaunchArgs, + Checkpointing, + Config, + DataLoader, + DDIMSchedulerConfig, + Evaluation, + ForwardNoising, # noqa: F401 + InvertedRegeneration, # noqa: F401 + IterativeInvertedRegeneration, # noqa: F401 + LinearLRConfig, # noqa: F401 + MetricsComputation, # noqa: F401 + OneCycleLRConfig, # noqa: F401 + SimilarityWithTrainData, # noqa: F401 + SimpleGeneration, # noqa: F401 + Slurm, + Training, +) + +# pylint: enable=unused-import + +################################################################################################### +########################################## Defaults conf ########################################## +################################################################################################### +defaults = [ + {"dataset": "BBBC021/BBBC021_196_nocodazole_fully_ordered"}, + "hydra/job_logging/custom", + "_self_", +] + +# fmt: off + +# ------------------------------------------- Job launch ------------------------------------------ +now = datetime.now().strftime("%Y-%m-%d--%H-%M-%S") +slurm = Slurm( + enabled = True, + monitor = False, + account = "icr@h100", + partition = None, + constraint = "h100", + qos = "t3", + nodes = 1, + num_gpus = 4, + max_num_requeue = 3, + total_job_time = 20 * 60, + output_folder = "${hydra:run.dir}" + f"/{now}_%j", + email = "tboyer@bio.ens.psl.eu", +) + +accelerate_launch_args = AccelerateLaunchArgs( + machine_rank = 0, + num_machines = 1, + gpu_ids = "all", + rdzv_backend = "static", + same_network = "true", + mixed_precision = "bf16", + num_processes = slurm.num_gpus, + main_process_port = 29503, + dynamo_backend = "no", + dynamo_plugin = None, +) + +accelerate = Accelerate( + launch_args = accelerate_launch_args, + offline = True, +) + +# ---------------------------------------------- Data --------------------------------------------- +data_loader = DataLoader( + num_workers = 4, + train_prefetch_factor = 4, + pin_memory = True, + persistent_workers = True, +) + +# -------------------------------------------- Training ------------------------------------------- +training = Training( + gradient_accumulation_steps = 1, + train_batch_size = 32, + max_grad_norm = 1, + nb_time_samplings = 500_000, + unpaired_data = False, + reweight_sampling = False, +) + +checkpointing = Checkpointing( + checkpoints_total_limit = 5, + resume_from_checkpoint = True, + checkpoint_every_n_steps = 5000, + chckpt_base_path = MISSING, +) + +lr_scheduler = OneCycleLRConfig( + max_lr = 1e-4, +) + +# ------------------------------------------- Evaluation ------------------------------------------ +# naming convention is lowercase + underscore; has to be respected for debug args modification +metrics_compute = MetricsComputation( + nb_samples_to_gen_per_time = "adapt aug", + batch_size = 128, + nb_diffusion_timesteps = 30, + selected_times = ["nocodazole_0.001", "nocodazole_0.01", "nocodazole_0.1", "nocodazole_1.0", "nocodazole_3.0"], + augmentations_for_metrics_comp = ["RandomHorizontalFlip", "RandomVerticalFlip", "RandomRotationSquareSymmetry"], +) + +simple_generation = SimpleGeneration( + nb_diffusion_timesteps = 50, + n_rows_displayed = 4, # TODO: merge training & evaluation configs + nb_generated_samples = 16, # TODO: merge training & evaluation configs +) + +inverted_regeneration = InvertedRegeneration( + nb_diffusion_timesteps = 50, + nb_inversion_diffusion_timesteps = 100, + n_rows_displayed = 8, # TODO: not used in training! + nb_generated_samples = 16, + nb_video_times_in_parallel = 8, # TODO: not used in training! + nb_video_timesteps = 50, + gen_times_type = ("evenly_spaced_from_inversion", 0.9), +) + +sim_with_train = SimilarityWithTrainData( # must be put after metrics_compute! + nb_generated_samples = -1, # TODO: not used + batch_size = 2048, + nb_batches_shown = -1, # TODO: not used + n_rows_displayed = -1, # TODO: not used + nb_diffusion_timesteps = -1, # TODO: not used +) + +evaluation = Evaluation( + every_n_opt_steps = 25_000, + batch_size = 16, # TODO: remove this and use config from above + nb_video_timesteps = 50, # TODO: remove this and use config from above + strategies = [simple_generation, inverted_regeneration, metrics_compute, sim_with_train], +) + +# ------------------------------------------- Diffusion ------------------------------------------- +dynamic = DDIMSchedulerConfig( + num_train_timesteps = 3000, + clip_sample = False, + clip_sample_range = 1, + thresholding = True, + sample_max_value = 1, + prediction_type = "v_prediction", + rescale_betas_zero_snr = False, + timestep_spacing = "leading", +) + +# ---------------------------------------------- Model -------------------------------------------- +from my_conf.net.net_196_3_12M_no_xattn import net, time_encoder # noqa: E402 + +# ------------------------------------------ Final Config ----------------------------------------- +config = Config( + # defaults + defaults = defaults, + # model + dynamic = dynamic, + net = net, + time_encoder = time_encoder, + # script + launcher_script_parent_folder = "/linkhome/rech/genlxz01/ufc43hj/sources/GaussianProxy", + script = "train", + # experiment variables + exp_parent_folder = "/lustre/fsn1/projects/rech/icr/ufc43hj/experiments", + project = MISSING, + run_name = MISSING, + # hydra + hydra = {"run": {"dir": "${exp_parent_folder}/${project}/${run_name}"}}, + # slurm + slurm = slurm, + # accelerate + accelerate = accelerate, + # misc. + debug = False, + profile = False, + tmpdir_location = None, + # experiment tracker + logger = "wandb", + entity = "thomasboyer", + # checkpointing + checkpointing = checkpointing, + # dataset + dataset = MISSING, + # dataloaders + dataloaders = data_loader, + # training + training = training, + # evaluation + evaluation = evaluation, + # optimizer + lr_scheduler = lr_scheduler, +) diff --git a/nocodazole/my_conf/net/net_128_3.py b/nocodazole/my_conf/net/net_128_3.py new file mode 100644 index 0000000000000000000000000000000000000000..994280ed4d0a7e6e1410e51f2b058157fb17c962 --- /dev/null +++ b/nocodazole/my_conf/net/net_128_3.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=128, + in_channels=3, + out_channels=3, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(64, 128, 256), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_128_3_big.py b/nocodazole/my_conf/net/net_128_3_big.py new file mode 100644 index 0000000000000000000000000000000000000000..9a12e57ccfc47d7fd0a9ac9cf3647764361adac7 --- /dev/null +++ b/nocodazole/my_conf/net/net_128_3_big.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=128, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(128, 256, 512), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_128_4.py b/nocodazole/my_conf/net/net_128_4.py new file mode 100644 index 0000000000000000000000000000000000000000..0dd136ffaff1c94858ad50bb075d780b7a49bc86 --- /dev/null +++ b/nocodazole/my_conf/net/net_128_4.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=128, + in_channels=4, + out_channels=4, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(64, 128, 256), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_196_3_12M.py b/nocodazole/my_conf/net/net_196_3_12M.py new file mode 100644 index 0000000000000000000000000000000000000000..83fa0274707bdde54fd0e1141deec96f779b5393 --- /dev/null +++ b/nocodazole/my_conf/net/net_196_3_12M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=196, + in_channels=3, + out_channels=3, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(96, 128, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_196_3_12M_no_xattn.py b/nocodazole/my_conf/net/net_196_3_12M_no_xattn.py new file mode 100644 index 0000000000000000000000000000000000000000..e13a50b93f46f33a9a15b3d39525646609e41cb2 --- /dev/null +++ b/nocodazole/my_conf/net/net_196_3_12M_no_xattn.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=196, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(96, 128, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_256_1.py b/nocodazole/my_conf/net/net_256_1.py new file mode 100644 index 0000000000000000000000000000000000000000..f2139988f0a405c026dbdd29bbab2ba4d50d6cb2 --- /dev/null +++ b/nocodazole/my_conf/net/net_256_1.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=1, + out_channels=1, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 128, 224), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_256_3_20M.py b/nocodazole/my_conf/net/net_256_3_20M.py new file mode 100644 index 0000000000000000000000000000000000000000..af270af831f48c45847a38cb3714d32033855957 --- /dev/null +++ b/nocodazole/my_conf/net/net_256_3_20M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 128, 224), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_256_3_8M.py b/nocodazole/my_conf/net/net_256_3_8M.py new file mode 100644 index 0000000000000000000000000000000000000000..c4b1c361e525cafc7afd2f5fc6c99d4534edfd9c --- /dev/null +++ b/nocodazole/my_conf/net/net_256_3_8M.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=256, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(64, 96, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_64_4.py b/nocodazole/my_conf/net/net_64_4.py new file mode 100644 index 0000000000000000000000000000000000000000..3e9549e0228dac3d5d3c2280521d82644327244f --- /dev/null +++ b/nocodazole/my_conf/net/net_64_4.py @@ -0,0 +1,22 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 32 + +net = UNet2DConditionModelConfig( + sample_size=64, + in_channels=4, + out_channels=4, + down_block_types=("CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D"), + block_out_channels=(64, 96, 128), + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=64, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_66_1.py b/nocodazole/my_conf/net/net_66_1.py new file mode 100644 index 0000000000000000000000000000000000000000..ad088c92b841ccece1d8528cefe20c8cd083e98f --- /dev/null +++ b/nocodazole/my_conf/net/net_66_1.py @@ -0,0 +1,23 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 32 + +net = UNet2DConditionModelConfig( + sample_size=66, + in_channels=1, + out_channels=1, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(16, 32, 64), + norm_num_groups=8, + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=64, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/net/net_66_3_2M.py b/nocodazole/my_conf/net/net_66_3_2M.py new file mode 100644 index 0000000000000000000000000000000000000000..43f1f32ac81b719f3be41e19ea2d0e1eaeed5477 --- /dev/null +++ b/nocodazole/my_conf/net/net_66_3_2M.py @@ -0,0 +1,23 @@ +from GaussianProxy.conf.training_conf import UNet2DConditionModelConfig, TimeEncoderConfig + +cross_attn_dim = 64 + +net = UNet2DConditionModelConfig( + sample_size=66, + in_channels=3, + out_channels=3, + down_block_types=("DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D"), + up_block_types=("CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "UpBlock2D"), + block_out_channels=(24, 40, 72), + norm_num_groups=8, + layers_per_block=2, + act_fn="silu", + cross_attention_dim=cross_attn_dim, +) + +time_encoder = TimeEncoderConfig( + encoding_dim=128, + time_embed_dim=cross_attn_dim, + flip_sin_to_cos=True, + downscale_freq_shift=1, +) diff --git a/nocodazole/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json b/nocodazole/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad012575a06c66b4dfe590012c318cf4712f09f --- /dev/null +++ b/nocodazole/my_conf/scheduler/DDIM_3k_vpred_tresh_leading.json @@ -0,0 +1,19 @@ +{ + "_class_name": "DDIMScheduler", + "_diffusers_version": "0.32.2", + "beta_end": 0.02, + "beta_schedule": "linear", + "beta_start": 0.0001, + "clip_sample": false, + "clip_sample_range": 1.0, + "dynamic_thresholding_ratio": 0.995, + "num_train_timesteps": 3000, + "prediction_type": "v_prediction", + "rescale_betas_zero_snr": false, + "sample_max_value": 1.0, + "set_alpha_to_one": true, + "steps_offset": 0, + "thresholding": true, + "timestep_spacing": "leading", + "trained_betas": null +} \ No newline at end of file diff --git a/nocodazole/net/config.json b/nocodazole/net/config.json new file mode 100644 index 0000000000000000000000000000000000000000..580ca66a133c478efe2cf0f023f4974f139863a6 --- /dev/null +++ b/nocodazole/net/config.json @@ -0,0 +1,64 @@ +{ + "_class_name": "UNet2DConditionModel", + "_diffusers_version": "0.35.2", + "act_fn": "silu", + "addition_embed_type": null, + "addition_embed_type_num_heads": 64, + "addition_time_embed_dim": null, + "attention_head_dim": 8, + "attention_type": "default", + "block_out_channels": [ + 96, + 128, + 128 + ], + "center_input_sample": false, + "class_embed_type": null, + "class_embeddings_concat": false, + "conv_in_kernel": 3, + "conv_out_kernel": 3, + "cross_attention_dim": 64, + "cross_attention_norm": null, + "down_block_types": [ + "DownBlock2D", + "CrossAttnDownBlock2D", + "CrossAttnDownBlock2D" + ], + "downsample_padding": 1, + "dropout": 0.0, + "dual_cross_attention": false, + "encoder_hid_dim": null, + "encoder_hid_dim_type": null, + "flip_sin_to_cos": true, + "freq_shift": 0, + "in_channels": 3, + "layers_per_block": 2, + "mid_block_only_cross_attention": null, + "mid_block_scale_factor": 1, + "mid_block_type": "UNetMidBlock2DCrossAttn", + "norm_eps": 1e-05, + "norm_num_groups": 32, + "num_attention_heads": null, + "num_class_embeds": null, + "only_cross_attention": false, + "out_channels": 3, + "projection_class_embeddings_input_dim": null, + "resnet_out_scale_factor": 1.0, + "resnet_skip_time_act": false, + "resnet_time_scale_shift": "default", + "reverse_transformer_layers_per_block": null, + "sample_size": 196, + "time_cond_proj_dim": null, + "time_embedding_act_fn": null, + "time_embedding_dim": null, + "time_embedding_type": "positional", + "timestep_post_act": null, + "transformer_layers_per_block": 1, + "up_block_types": [ + "CrossAttnUpBlock2D", + "CrossAttnUpBlock2D", + "UpBlock2D" + ], + "upcast_attention": false, + "use_linear_projection": false +} diff --git a/nocodazole/video_time_encoder/config.json b/nocodazole/video_time_encoder/config.json new file mode 100644 index 0000000000000000000000000000000000000000..b910a40e475aaa21c0c9fb367ce4dcfab1ba4941 --- /dev/null +++ b/nocodazole/video_time_encoder/config.json @@ -0,0 +1,8 @@ +{ + "_class_name": "VideoTimeEncoding", + "_diffusers_version": "0.35.2", + "downscale_freq_shift": 1.0, + "encoding_dim": 128, + "flip_sin_to_cos": true, + "time_embed_dim": 64 +}