From 0ad73ba6a2f5c6b575523279fdf311f37603e040 Mon Sep 17 00:00:00 2001
From: Tim Laibacher <tim.laibacher@idiap.ch>
Date: Wed, 19 Jun 2019 14:52:56 +0200
Subject: [PATCH] Add more configs

---
 .../datasets/drivestareiostarhrf960.py        | 10 ++++++++
 bob/ip/binseg/configs/datasets/hrf960.py      | 24 +++++++++++++++++++
 setup.py                                      |  2 ++
 3 files changed, 36 insertions(+)
 create mode 100644 bob/ip/binseg/configs/datasets/drivestareiostarhrf960.py
 create mode 100644 bob/ip/binseg/configs/datasets/hrf960.py

diff --git a/bob/ip/binseg/configs/datasets/drivestareiostarhrf960.py b/bob/ip/binseg/configs/datasets/drivestareiostarhrf960.py
new file mode 100644
index 00000000..911a718d
--- /dev/null
+++ b/bob/ip/binseg/configs/datasets/drivestareiostarhrf960.py
@@ -0,0 +1,10 @@
+from bob.ip.binseg.configs.datasets.drive960 import dataset as drive
+from bob.ip.binseg.configs.datasets.stare960 import dataset as stare
+from bob.ip.binseg.configs.datasets.hrf960 import dataset as hrf
+from bob.ip.binseg.configs.datasets.iostarvessel960 import dataset as iostar
+import torch
+
+#### Config ####
+
+# PyTorch dataset
+dataset = torch.utils.data.ConcatDataset([drive,stare,hrf,iostar])
\ No newline at end of file
diff --git a/bob/ip/binseg/configs/datasets/hrf960.py b/bob/ip/binseg/configs/datasets/hrf960.py
new file mode 100644
index 00000000..94412e70
--- /dev/null
+++ b/bob/ip/binseg/configs/datasets/hrf960.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from bob.db.hrf import Database as HRF
+from bob.ip.binseg.data.transforms import *
+from bob.ip.binseg.data.binsegdataset import BinSegDataset
+
+#### Config ####
+
+transforms = Compose([  
+                        Pad((0,584,0,584))                    
+                        ,Resize((960))
+                        ,RandomRotation()
+                        ,RandomHFlip()
+                        ,RandomVFlip()
+                        ,ColorJitter()
+                        ,ToTensor()
+                    ])
+
+# bob.db.dataset init
+bobdb = HRF(protocol = 'default')
+
+# PyTorch dataset
+dataset = BinSegDataset(bobdb, split='train', transform=transforms)
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 1f45161c..20671d7f 100644
--- a/setup.py
+++ b/setup.py
@@ -79,7 +79,9 @@ setup(
           'DRIVE1168 = bob.ip.binseg.configs.datasets.drive1168',
           'DRIVETEST = bob.ip.binseg.configs.datasets.drivetest',
           'DRIVESTARECHASEDB1IOSTAR1168 = bob.ip.binseg.configs.datasets.drivestarechasedb1iostar1168',
+          'DRIVESTAREIOSTARHRF960 = bob.ip.binseg.configs.datasets.drivestareiostarhrf960',
           'HRF = bob.ip.binseg.configs.datasets.hrf',
+          'HRF960 = bob.ip.binseg.configs.datasets.hrf960',
           'HRF1168 = bob.ip.binseg.configs.datasets.hrf1168',
           'HRFTEST = bob.ip.binseg.configs.datasets.hrftest',
           'IOSTAROD = bob.ip.binseg.configs.datasets.iostarod',
-- 
GitLab