Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1#!/usr/bin/env python 

2# coding=utf-8 

3 

4"""COVD-STARE for Vessel Segmentation 

5 

6* Configuration resolution: 704 x 608 

7 

8The dataset available in this file is composed of DRIVE, CHASE-DB1, IOSTAR 

9vessel and HRF (with annotated samples). 

10 

11For details on those datasets, consult: 

12 

13* See :py:mod:`bob.ip.binseg.data.drive` 

14* See :py:mod:`bob.ip.binseg.data.chasedb1` 

15* See :py:mod:`bob.ip.binseg.data.iostar` 

16* See :py:mod:`bob.ip.binseg.data.hrf` 

17""" 

18 

19from torch.utils.data import ConcatDataset 

20 

21from bob.ip.binseg.configs.datasets import augment_subset as _augment 

22from bob.ip.binseg.configs.datasets.stare.ah import dataset as _baseline 

23from bob.ip.binseg.configs.datasets.stare.ah import second_annotator 

24from bob.ip.binseg.configs.datasets.stare.mtest import dataset as _mtest 

25 

26dataset = dict(**_baseline) 

27dataset["__train__"] = ConcatDataset( 

28 [ 

29 _augment(_mtest["drive (train)"], rotation_before=True), 

30 _augment(_mtest["drive (test)"], rotation_before=True), 

31 _augment(_mtest["chasedb1 (train)"], rotation_before=True), 

32 _augment(_mtest["chasedb1 (test)"], rotation_before=True), 

33 _augment(_mtest["hrf (train)"], rotation_before=False), 

34 _augment(_mtest["hrf (test)"], rotation_before=False), 

35 _augment(_mtest["iostar (train)"], rotation_before=False), 

36 _augment(_mtest["iostar (test)"], rotation_before=False), 

37 ] 

38) 

39del second_annotator["train"] # mismatch with used train set 

40dataset["train"] = ConcatDataset( 

41 [ 

42 _mtest["drive (train)"], 

43 _mtest["drive (test)"], 

44 _mtest["chasedb1 (train)"], 

45 _mtest["chasedb1 (test)"], 

46 _mtest["hrf (train)"], 

47 _mtest["hrf (test)"], 

48 _mtest["iostar (train)"], 

49 _mtest["iostar (test)"], 

50 ] 

51) 

52dataset["__valid__"] = dataset["train"]