From 1fe1839337220f5b59370f4b79ca9cb5359cb4a0 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Tue, 12 May 2020 23:37:44 +0200 Subject: [PATCH] [configs.datasets.*.covd] Add test data from COVD-target datasets as training data --- .../binseg/configs/datasets/chasedb1/covd.py | 23 ++++++++++++++---- .../binseg/configs/datasets/chasedb1/mtest.py | 20 ++++++++++++---- .../binseg/configs/datasets/chasedb1/xtest.py | 12 ++++++---- bob/ip/binseg/configs/datasets/drive/covd.py | 23 ++++++++++++++---- bob/ip/binseg/configs/datasets/drive/mtest.py | 20 ++++++++++++---- bob/ip/binseg/configs/datasets/drive/xtest.py | 12 ++++++---- bob/ip/binseg/configs/datasets/hrf/covd.py | 23 ++++++++++++++---- bob/ip/binseg/configs/datasets/hrf/mtest.py | 22 +++++++++++++---- bob/ip/binseg/configs/datasets/hrf/xtest.py | 12 ++++++---- bob/ip/binseg/configs/datasets/iostar/covd.py | 23 ++++++++++++++---- .../configs/datasets/iostar/vessel_mtest.py | 24 +++++++++++++++---- .../configs/datasets/iostar/vessel_xtest.py | 12 ++++++---- bob/ip/binseg/configs/datasets/stare/covd.py | 23 ++++++++++++++---- bob/ip/binseg/configs/datasets/stare/mtest.py | 24 +++++++++++++++---- bob/ip/binseg/configs/datasets/stare/xtest.py | 12 ++++++---- 15 files changed, 220 insertions(+), 65 deletions(-) diff --git a/bob/ip/binseg/configs/datasets/chasedb1/covd.py b/bob/ip/binseg/configs/datasets/chasedb1/covd.py index 970caf2f..a2f92131 100644 --- a/bob/ip/binseg/configs/datasets/chasedb1/covd.py +++ b/bob/ip/binseg/configs/datasets/chasedb1/covd.py @@ -27,13 +27,26 @@ from bob.ip.binseg.configs.datasets.chasedb1.first_annotator import ( dataset = dict(**_baseline) dataset["__train__"] = ConcatDataset( [ - _augment(_mtest["drive"], rotation_before=True), - _augment(_mtest["stare"], rotation_before=True), - _augment(_mtest["hrf"], rotation_before=False), - _augment(_mtest["iostar"], rotation_before=False), + _augment(_mtest["drive (train)"], rotation_before=True), + _augment(_mtest["drive (test)"], rotation_before=True), + _augment(_mtest["stare (train)"], rotation_before=True), + _augment(_mtest["stare (test)"], rotation_before=True), + _augment(_mtest["hrf (train)"], rotation_before=False), + _augment(_mtest["hrf (test)"], rotation_before=False), + _augment(_mtest["iostar (train)"], rotation_before=False), + _augment(_mtest["iostar (test)"], rotation_before=False), ] ) dataset["train"] = ConcatDataset( - [_mtest["drive"], _mtest["stare"], _mtest["hrf"], _mtest["iostar"],] + [ + _mtest["drive (train)"], + _mtest["drive (test)"], + _mtest["stare (train)"], + _mtest["stare (test)"], + _mtest["hrf (train)"], + _mtest["hrf (test)"], + _mtest["iostar (train)"], + _mtest["iostar (test)"], + ] ) dataset["__valid__"] = dataset["train"] diff --git a/bob/ip/binseg/configs/datasets/chasedb1/mtest.py b/bob/ip/binseg/configs/datasets/chasedb1/mtest.py index fdee4479..20731847 100644 --- a/bob/ip/binseg/configs/datasets/chasedb1/mtest.py +++ b/bob/ip/binseg/configs/datasets/chasedb1/mtest.py @@ -15,10 +15,22 @@ from bob.ip.binseg.configs.datasets.chasedb1.xtest import ( dataset = { "train": _xt["train"], "test": _xt["test"], - "drive": _xt["drive"].copy([CenterCrop((544, 544)), Resize(960)]), - "stare": _xt["stare"].copy( + "drive (train)": _xt["drive (train)"].copy( + [CenterCrop((544, 544)), Resize(960)] + ), + "drive (test)": _xt["drive (test)"].copy( + [CenterCrop((544, 544)), Resize(960)] + ), + "stare (train)": _xt["stare (train)"].copy( [Pad((0, 32, 0, 32)), Resize(960), CenterCrop(960)] ), - "hrf": _xt["hrf"].copy([Pad((0, 584, 0, 584)), Resize(960)]), - "iostar": _xt["iostar"].copy([Resize(960)]), + "stare (test)": _xt["stare (test)"].copy( + [Pad((0, 32, 0, 32)), Resize(960), CenterCrop(960)] + ), + "hrf (train)": _xt["hrf (train)"].copy( + [Pad((0, 584, 0, 584)), Resize(960)] + ), + "hrf (test)": _xt["hrf (test)"].copy([Pad((0, 584, 0, 584)), Resize(960)]), + "iostar (train)": _xt["iostar (train)"].copy([Resize(960)]), + "iostar (test)": _xt["iostar (test)"].copy([Resize(960)]), } diff --git a/bob/ip/binseg/configs/datasets/chasedb1/xtest.py b/bob/ip/binseg/configs/datasets/chasedb1/xtest.py index baf44c1b..586b142c 100644 --- a/bob/ip/binseg/configs/datasets/chasedb1/xtest.py +++ b/bob/ip/binseg/configs/datasets/chasedb1/xtest.py @@ -16,8 +16,12 @@ from bob.ip.binseg.configs.datasets.iostar.vessel import dataset as _iostar dataset = { "train": _chase["train"], "test": _chase["test"], - "drive": _drive["test"], - "stare": _stare["test"], - "hrf": _hrf["test"], - "iostar": _iostar["test"], + "drive (train)": _drive["train"], + "drive (test)": _drive["test"], + "stare (train)": _stare["train"], + "stare (test)": _stare["test"], + "hrf (train)": _hrf["train"], + "hrf (test)": _hrf["test"], + "iostar (train)": _iostar["train"], + "iostar (test)": _iostar["test"], } diff --git a/bob/ip/binseg/configs/datasets/drive/covd.py b/bob/ip/binseg/configs/datasets/drive/covd.py index 5010b35d..c32be4f3 100644 --- a/bob/ip/binseg/configs/datasets/drive/covd.py +++ b/bob/ip/binseg/configs/datasets/drive/covd.py @@ -27,13 +27,26 @@ from bob.ip.binseg.configs.datasets.drive.default import ( dataset = dict(**_baseline) dataset["__train__"] = ConcatDataset( [ - _augment(_mtest["stare"], rotation_before=True), - _augment(_mtest["chasedb1"], rotation_before=False), - _augment(_mtest["hrf"], rotation_before=False), - _augment(_mtest["iostar"], rotation_before=False), + _augment(_mtest["stare (train)"], rotation_before=True), + _augment(_mtest["stare (test)"], rotation_before=True), + _augment(_mtest["chasedb1 (train)"], rotation_before=False), + _augment(_mtest["chasedb1 (test)"], rotation_before=False), + _augment(_mtest["hrf (train)"], rotation_before=False), + _augment(_mtest["hrf (test)"], rotation_before=False), + _augment(_mtest["iostar (train)"], rotation_before=False), + _augment(_mtest["iostar (test)"], rotation_before=False), ] ) dataset["train"] = ConcatDataset( - [_mtest["stare"], _mtest["chasedb1"], _mtest["hrf"], _mtest["iostar"],] + [ + _mtest["stare (train)"], + _mtest["stare (test)"], + _mtest["chasedb1 (train)"], + _mtest["chasedb1 (test)"], + _mtest["hrf (train)"], + _mtest["hrf (test)"], + _mtest["iostar (train)"], + _mtest["iostar (test)"], + ] ) dataset["__valid__"] = dataset["train"] diff --git a/bob/ip/binseg/configs/datasets/drive/mtest.py b/bob/ip/binseg/configs/datasets/drive/mtest.py index c6ef0eb5..624cfff8 100644 --- a/bob/ip/binseg/configs/datasets/drive/mtest.py +++ b/bob/ip/binseg/configs/datasets/drive/mtest.py @@ -15,8 +15,20 @@ from bob.ip.binseg.configs.datasets.drive.xtest import ( dataset = { "train": _xt["train"], "test": _xt["test"], - "stare": _xt["stare"].copy([Resize(471), Pad((0, 37, 0, 36))]), - "chasedb1": _xt["chasedb1"].copy([Resize(544), Crop(0, 12, 544, 544)]), - "hrf": _xt["hrf"].copy([Resize((363)), Pad((0, 90, 0, 91))]), - "iostar": _xt["iostar"].copy([Resize(544)]), + "stare (train)": _xt["stare (train)"].copy( + [Resize(471), Pad((0, 37, 0, 36))] + ), + "stare (test)": _xt["stare (test)"].copy( + [Resize(471), Pad((0, 37, 0, 36))] + ), + "chasedb1 (train)": _xt["chasedb1 (train)"].copy( + [Resize(544), Crop(0, 12, 544, 544)] + ), + "chasedb1 (test)": _xt["chasedb1 (test)"].copy( + [Resize(544), Crop(0, 12, 544, 544)] + ), + "hrf (train)": _xt["hrf (train)"].copy([Resize((363)), Pad((0, 90, 0, 91))]), + "hrf (test)": _xt["hrf (test)"].copy([Resize((363)), Pad((0, 90, 0, 91))]), + "iostar (train)": _xt["iostar (train)"].copy([Resize(544)]), + "iostar (test)": _xt["iostar (test)"].copy([Resize(544)]), } diff --git a/bob/ip/binseg/configs/datasets/drive/xtest.py b/bob/ip/binseg/configs/datasets/drive/xtest.py index b04e5232..ced90727 100644 --- a/bob/ip/binseg/configs/datasets/drive/xtest.py +++ b/bob/ip/binseg/configs/datasets/drive/xtest.py @@ -18,8 +18,12 @@ from bob.ip.binseg.configs.datasets.iostar.vessel import dataset as _iostar dataset = { "train": _drive["train"], "test": _drive["test"], - "stare": _stare["test"], - "chasedb1": _chase["test"], - "hrf": _hrf["test"], - "iostar": _iostar["test"], + "stare (train)": _stare["train"], + "stare (test)": _stare["test"], + "chasedb1 (train)": _chase["train"], + "chasedb1 (test)": _chase["test"], + "hrf (train)": _hrf["train"], + "hrf (test)": _hrf["test"], + "iostar (train)": _iostar["train"], + "iostar (test)": _iostar["test"], } diff --git a/bob/ip/binseg/configs/datasets/hrf/covd.py b/bob/ip/binseg/configs/datasets/hrf/covd.py index 4eeb7093..df7be258 100644 --- a/bob/ip/binseg/configs/datasets/hrf/covd.py +++ b/bob/ip/binseg/configs/datasets/hrf/covd.py @@ -24,13 +24,26 @@ from bob.ip.binseg.configs.datasets.hrf.default import dataset as _baseline dataset = dict(**_baseline) dataset["__train__"] = ConcatDataset( [ - _augment(_mtest["drive"], rotation_before=True), - _augment(_mtest["stare"], rotation_before=True), - _augment(_mtest["chasedb1"], rotation_before=True), - _augment(_mtest["iostar"], rotation_before=True), + _augment(_mtest["drive (train)"], rotation_before=True), + _augment(_mtest["drive (test)"], rotation_before=True), + _augment(_mtest["stare (train)"], rotation_before=True), + _augment(_mtest["stare (test)"], rotation_before=True), + _augment(_mtest["chasedb1 (train)"], rotation_before=True), + _augment(_mtest["chasedb1 (test)"], rotation_before=True), + _augment(_mtest["iostar (train)"], rotation_before=True), + _augment(_mtest["iostar (test)"], rotation_before=True), ] ) dataset["train"] = ConcatDataset( - [_mtest["drive"], _mtest["stare"], _mtest["chasedb1"], _mtest["iostar"],] + [ + _mtest["drive (train)"], + _mtest["drive (test)"], + _mtest["stare (train)"], + _mtest["stare (test)"], + _mtest["chasedb1 (train)"], + _mtest["chasedb1 (test)"], + _mtest["iostar (train)"], + _mtest["iostar (test)"], + ] ) dataset["__valid__"] = dataset["train"] diff --git a/bob/ip/binseg/configs/datasets/hrf/mtest.py b/bob/ip/binseg/configs/datasets/hrf/mtest.py index b5f8f646..b73e64b0 100644 --- a/bob/ip/binseg/configs/datasets/hrf/mtest.py +++ b/bob/ip/binseg/configs/datasets/hrf/mtest.py @@ -12,14 +12,28 @@ from bob.ip.binseg.configs.datasets.hrf.xtest import dataset as _xt dataset = { "train": _xt["train"], "test": _xt["test"], - "drive": _xt["drive"].copy( + "drive (train)": _xt["drive (train)"].copy( [Crop(75, 10, 416, 544), Pad((21, 0, 22, 0)), Resize(1168)] ), - "stare": _xt["stare"].copy( + "drive (test)": _xt["drive (test)"].copy( + [Crop(75, 10, 416, 544), Pad((21, 0, 22, 0)), Resize(1168)] + ), + "stare (train)": _xt["stare (train)"].copy( + [Crop(50, 0, 500, 705), Resize(1168), Pad((1, 0, 1, 0))] + ), + "stare (test)": _xt["stare (test)"].copy( [Crop(50, 0, 500, 705), Resize(1168), Pad((1, 0, 1, 0))] ), - "chasedb1": _xt["chasedb1"].copy([Crop(140, 18, 680, 960), Resize(1168)]), - "iostar": _xt["iostar"].copy( + "chasedb1 (train)": _xt["chasedb1 (train)"].copy( + [Crop(140, 18, 680, 960), Resize(1168)] + ), + "chasedb1 (test)": _xt["chasedb1 (test)"].copy( + [Crop(140, 18, 680, 960), Resize(1168)] + ), + "iostar (train)": _xt["iostar (train)"].copy( + [Crop(144, 0, 768, 1024), Pad((30, 0, 30, 0)), Resize(1168)] + ), + "iostar (test)": _xt["iostar (test)"].copy( [Crop(144, 0, 768, 1024), Pad((30, 0, 30, 0)), Resize(1168)] ), } diff --git a/bob/ip/binseg/configs/datasets/hrf/xtest.py b/bob/ip/binseg/configs/datasets/hrf/xtest.py index 6f96074f..277537a2 100644 --- a/bob/ip/binseg/configs/datasets/hrf/xtest.py +++ b/bob/ip/binseg/configs/datasets/hrf/xtest.py @@ -15,8 +15,12 @@ from bob.ip.binseg.configs.datasets.iostar.vessel import dataset as _iostar dataset = { "train": _hrf["train"], "test": _hrf["test"], - "drive": _drive["test"], - "stare": _stare["test"], - "chasedb1": _chase["test"], - "iostar": _iostar["test"], + "drive (train)": _drive["train"], + "drive (test)": _drive["test"], + "stare (train)": _stare["train"], + "stare (test)": _stare["test"], + "chasedb1 (train)": _chase["train"], + "chasedb1 (test)": _chase["test"], + "iostar (train)": _iostar["train"], + "iostar (test)": _iostar["test"], } diff --git a/bob/ip/binseg/configs/datasets/iostar/covd.py b/bob/ip/binseg/configs/datasets/iostar/covd.py index 9b253e3a..cc1802a8 100644 --- a/bob/ip/binseg/configs/datasets/iostar/covd.py +++ b/bob/ip/binseg/configs/datasets/iostar/covd.py @@ -24,13 +24,26 @@ from bob.ip.binseg.configs.datasets.iostar.vessel import dataset as _baseline dataset = dict(**_baseline) dataset["__train__"] = ConcatDataset( [ - _augment(_mtest["drive"], rotation_before=True), - _augment(_mtest["stare"], rotation_before=True), - _augment(_mtest["chasedb1"], rotation_before=True), - _augment(_mtest["hrf"], rotation_before=False), + _augment(_mtest["drive (train)"], rotation_before=True), + _augment(_mtest["drive (test)"], rotation_before=True), + _augment(_mtest["stare (train)"], rotation_before=True), + _augment(_mtest["stare (test)"], rotation_before=True), + _augment(_mtest["chasedb1 (train)"], rotation_before=True), + _augment(_mtest["chasedb1 (test)"], rotation_before=True), + _augment(_mtest["hrf (train)"], rotation_before=False), + _augment(_mtest["hrf (test)"], rotation_before=False), ] ) dataset["train"] = ConcatDataset( - [_mtest["drive"], _mtest["stare"], _mtest["chasedb1"], _mtest["hrf"],] + [ + _mtest["drive (train)"], + _mtest["drive (test)"], + _mtest["stare (train)"], + _mtest["stare (test)"], + _mtest["chasedb1 (train)"], + _mtest["chasedb1 (test)"], + _mtest["hrf (train)"], + _mtest["hrf (test)"], + ] ) dataset["__valid__"] = dataset["train"] diff --git a/bob/ip/binseg/configs/datasets/iostar/vessel_mtest.py b/bob/ip/binseg/configs/datasets/iostar/vessel_mtest.py index c89cf204..85c07e2e 100644 --- a/bob/ip/binseg/configs/datasets/iostar/vessel_mtest.py +++ b/bob/ip/binseg/configs/datasets/iostar/vessel_mtest.py @@ -12,10 +12,26 @@ from bob.ip.binseg.configs.datasets.iostar.vessel_xtest import dataset as _xt dataset = { "train": _xt["train"], "test": _xt["test"], - "drive": _xt["drive"].copy([CenterCrop((540, 540)), Resize(1024)]), - "stare": _xt["stare"].copy( + "drive (train)": _xt["drive (train)"].copy( + [CenterCrop((540, 540)), Resize(1024)] + ), + "drive (test)": _xt["drive (test)"].copy( + [CenterCrop((540, 540)), Resize(1024)] + ), + "stare (train)": _xt["stare (train)"].copy( + [Pad((0, 32, 0, 32)), Resize(1024), CenterCrop(1024)] + ), + "stare (test)": _xt["stare (test)"].copy( [Pad((0, 32, 0, 32)), Resize(1024), CenterCrop(1024)] ), - "chasedb1": _xt["chasedb1"].copy([Crop(0, 18, 960, 960), Resize(1024)]), - "hrf": _xt["hrf"].copy([Pad((0, 584, 0, 584)), Resize(1024)]), + "chasedb1 (train)": _xt["chasedb1 (train)"].copy( + [Crop(0, 18, 960, 960), Resize(1024)] + ), + "chasedb1 (test)": _xt["chasedb1 (test)"].copy( + [Crop(0, 18, 960, 960), Resize(1024)] + ), + "hrf (train)": _xt["hrf (train)"].copy( + [Pad((0, 584, 0, 584)), Resize(1024)] + ), + "hrf (test)": _xt["hrf (test)"].copy([Pad((0, 584, 0, 584)), Resize(1024)]), } diff --git a/bob/ip/binseg/configs/datasets/iostar/vessel_xtest.py b/bob/ip/binseg/configs/datasets/iostar/vessel_xtest.py index 0d627275..14541c79 100644 --- a/bob/ip/binseg/configs/datasets/iostar/vessel_xtest.py +++ b/bob/ip/binseg/configs/datasets/iostar/vessel_xtest.py @@ -15,8 +15,12 @@ from bob.ip.binseg.configs.datasets.iostar.vessel import dataset as _iostar dataset = { "train": _iostar["train"], "test": _iostar["test"], - "drive": _drive["test"], - "stare": _stare["test"], - "chasedb1": _chase["test"], - "hrf": _hrf["test"], + "drive (train)": _drive["train"], + "drive (test)": _drive["test"], + "stare (train)": _stare["train"], + "stare (test)": _stare["test"], + "chasedb1 (train)": _chase["train"], + "chasedb1 (test)": _chase["test"], + "hrf (train)": _hrf["train"], + "hrf (test)": _hrf["test"], } diff --git a/bob/ip/binseg/configs/datasets/stare/covd.py b/bob/ip/binseg/configs/datasets/stare/covd.py index ad1c2aa1..57000eae 100644 --- a/bob/ip/binseg/configs/datasets/stare/covd.py +++ b/bob/ip/binseg/configs/datasets/stare/covd.py @@ -27,13 +27,26 @@ from bob.ip.binseg.configs.datasets.stare.ah import ( dataset = dict(**_baseline) dataset["__train__"] = ConcatDataset( [ - _augment(_mtest["drive"], rotation_before=True), - _augment(_mtest["chasedb1"], rotation_before=True), - _augment(_mtest["hrf"], rotation_before=False), - _augment(_mtest["iostar"], rotation_before=False), + _augment(_mtest["drive (train)"], rotation_before=True), + _augment(_mtest["drive (test)"], rotation_before=True), + _augment(_mtest["chasedb1 (train)"], rotation_before=True), + _augment(_mtest["chasedb1 (test)"], rotation_before=True), + _augment(_mtest["hrf (train)"], rotation_before=False), + _augment(_mtest["hrf (test)"], rotation_before=False), + _augment(_mtest["iostar (train)"], rotation_before=False), + _augment(_mtest["iostar (test)"], rotation_before=False), ] ) dataset["train"] = ConcatDataset( - [_mtest["drive"], _mtest["chasedb1"], _mtest["hrf"], _mtest["iostar"],] + [ + _mtest["drive (train)"], + _mtest["drive (test)"], + _mtest["chasedb1 (train)"], + _mtest["chasedb1 (test)"], + _mtest["hrf (train)"], + _mtest["hrf (test)"], + _mtest["iostar (train)"], + _mtest["iostar (test)"], + ] ) dataset["__valid__"] = dataset["train"] diff --git a/bob/ip/binseg/configs/datasets/stare/mtest.py b/bob/ip/binseg/configs/datasets/stare/mtest.py index 4a914487..c8910f51 100644 --- a/bob/ip/binseg/configs/datasets/stare/mtest.py +++ b/bob/ip/binseg/configs/datasets/stare/mtest.py @@ -15,10 +15,26 @@ from bob.ip.binseg.configs.datasets.stare.xtest import ( dataset = { "train": _xt["train"], "test": _xt["test"], - "drive": _xt["drive"].copy( + "drive (train)": _xt["drive (train)"].copy( [CenterCrop((470, 544)), Pad((10, 9, 10, 8)), Resize(608)] ), - "chasedb1": _xt["chasedb1"].copy([CenterCrop((829, 960)), Resize(608)]), - "hrf": _xt["hrf"].copy([Pad((0, 345, 0, 345)), Resize(608)]), - "iostar": _xt["iostar"].copy([Pad((81, 0, 81, 0)), Resize(608)]), + "drive (test)": _xt["drive (test)"].copy( + [CenterCrop((470, 544)), Pad((10, 9, 10, 8)), Resize(608)] + ), + "chasedb1 (train)": _xt["chasedb1 (train)"].copy( + [CenterCrop((829, 960)), Resize(608)] + ), + "chasedb1 (test)": _xt["chasedb1 (test)"].copy( + [CenterCrop((829, 960)), Resize(608)] + ), + "hrf (train)": _xt["hrf (train)"].copy( + [Pad((0, 345, 0, 345)), Resize(608)] + ), + "hrf (test)": _xt["hrf (test)"].copy([Pad((0, 345, 0, 345)), Resize(608)]), + "iostar (train)": _xt["iostar (train)"].copy( + [Pad((81, 0, 81, 0)), Resize(608)] + ), + "iostar (test)": _xt["iostar (test)"].copy( + [Pad((81, 0, 81, 0)), Resize(608)] + ), } diff --git a/bob/ip/binseg/configs/datasets/stare/xtest.py b/bob/ip/binseg/configs/datasets/stare/xtest.py index a36495e2..6aef1f6c 100644 --- a/bob/ip/binseg/configs/datasets/stare/xtest.py +++ b/bob/ip/binseg/configs/datasets/stare/xtest.py @@ -18,8 +18,12 @@ from bob.ip.binseg.configs.datasets.iostar.vessel import dataset as _iostar dataset = { "train": _stare["train"], "test": _stare["test"], - "drive": _drive["test"], - "chasedb1": _chase["test"], - "hrf": _hrf["test"], - "iostar": _iostar["test"], + "drive (train)": _drive["train"], + "drive (test)": _drive["test"], + "chasedb1 (train)": _chase["train"], + "chasedb1 (test)": _chase["test"], + "hrf (train)": _hrf["train"], + "hrf (test)": _hrf["test"], + "iostar (train)": _iostar["train"], + "iostar (test)": _iostar["test"], } -- GitLab