Skip to content
Snippets Groups Projects
Commit 57194acc authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[config] Streamline more configuration files

parent fa26d033
No related branches found
No related tags found
1 merge request!12Streamlining
from bob.ip.binseg.configs.datasets.drive608 import dataset as drive
from bob.ip.binseg.configs.datasets.chasedb1608 import dataset as chase
from bob.ip.binseg.configs.datasets.iostarvessel608 import dataset as iostar
from bob.ip.binseg.configs.datasets.hrf608 import dataset as hrf
import torch
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#### Config ####
"""COVD-STARE (training set) for Vessel Segmentation
# PyTorch dataset
dataset = torch.utils.data.ConcatDataset([drive, chase, iostar, hrf])
* Configuration resolution: 704 x 608 (after padding)
The dataset available in this file is composed of DRIVE, CHASE-DB1, IOSTAR
vessel and HRF (with annotated samples).
"""
from bob.ip.binseg.configs.datasets.drive608 import dataset as _drive
from bob.ip.binseg.configs.datasets.chasedb1608 import dataset as _chase
from bob.ip.binseg.configs.datasets.iostarvessel608 import dataset as _iostar
from bob.ip.binseg.configs.datasets.hrf608 import dataset as _hrf
import torch.utils.data
dataset = torch.utils.data.ConcatDataset([_drive, _chase, _iostar, _hrf])
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""STARE (SSL training set) for Vessel Segmentation
"""COVD-STARE + SSL (training set) for Vessel Segmentation
A subset of the original STARE dataset contains 20 annotated eye fundus images
with a resolution of 605 x 700 (height x width). Two sets of ground-truth
vessel annotations are available. The first set by Adam Hoover is commonly used
for training and testing. The second set by Valentina Kouznetsova acts as a
“human” baseline.
* Reference: [STARE-2000]_
* Configuration resolution: 704 x 608 (after padding)
* Configuration resolution: 704 x 608
The dataset available in this file is composed of DRIVE, CHASE-DB1, IOSTAR
vessel and HRF (with annotated samples) and STARE without labels.
"""
# Labelled bits
import torch.utils.data
from bob.ip.binseg.configs.datasets.drive608 import dataset as _drive
from bob.ip.binseg.configs.datasets.chasedb1608 import dataset as _chase
from bob.ip.binseg.configs.datasets.iostarvessel608 import dataset as _iostar
from bob.ip.binseg.configs.datasets.hrf608 import dataset as _hrf
_labelled = torch.utils.data.ConcatDataset([_drive, _chase, _iostar, _hrf])
# Use STARE without labels in this setup
from bob.ip.binseg.configs.datasets.drivechasedb1iostarhrf608 import dataset as _labelled
from bob.ip.binseg.configs.datasets.stare import dataset as _unlabelled
from bob.ip.binseg.data.utils import SSLDataset
dataset = SSLDataset(_labelled, _unlabelled)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""HRF (SSL training set) for Vessel Segmentation
"""COVD-HRF + SSL (training set) for Vessel Segmentation
The database includes 15 images of each healthy, diabetic retinopathy (DR), and
glaucomatous eyes. It contains 45 eye fundus images with a resolution of 3504
x 2336. One set of ground-truth vessel annotations is available.
* Reference: [HRF-2013]_
* Configuration resolution: 1168 x 1648
The dataset available in this file is composed of STARE, CHASE-DB1, IOSTAR
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""CHASE-DB1 (SSL training set) for Vessel Segmentation
"""COVD-CHASE-DB1 + SSL (training set) for Vessel Segmentation
The CHASE_DB1 is a retinal vessel reference dataset acquired from multiethnic
school children. This database is a part of the Child Heart and Health Study in
England (CHASE), a cardiovascular health survey in 200 primary schools in
London, Birmingham, and Leicester. The ocular imaging was carried out in
46 schools and demonstrated associations between retinal vessel tortuosity and
early risk factors for cardiovascular disease in over 1000 British primary
school children of different ethnic origin. The retinal images of both of the
eyes of each child were recorded with a hand-held Nidek NM-200-D fundus camera.
The images were captured at 30 degrees FOV camera. The dataset of images are
characterized by having nonuniform back-ground illumination, poor contrast of
blood vessels as compared with the background and wider arteriolars that have a
bright strip running down the centre known as the central vessel reflex.
* Reference: [CHASEDB1-2012]_
* Configuration resolution (height x width): 960 x 960
The dataset available in this file is composed of STARE, CHASE-DB1, IOSTAR
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""DRIVE (SSL training set) for Vessel Segmentation
"""COVD-DRIVE + SSL (training set) for Vessel Segmentation
The DRIVE database has been established to enable comparative studies on
segmentation of blood vessels in retinal images.
* Reference: [DRIVE-2004]_
* Configuration resolution: 544 x 544
The dataset available in this file is composed of STARE, CHASE-DB1, IOSTAR
vessel and HRF (with annotated samples) and DRIVE without labels.
"""
# Labelled bits
import torch.utils.data
from bob.ip.binseg.configs.datasets.stare544 import dataset as _stare
from bob.ip.binseg.configs.datasets.chasedb1544 import dataset as _chase
from bob.ip.binseg.configs.datasets.iostarvessel544 import dataset as _iostar
from bob.ip.binseg.configs.datasets.hrf544 import dataset as _hrf
_labelled = torch.utils.data.ConcatDataset([_stare, _chase, _iostar, _hrf])
# Use DRIVE without labels in this setup
from bob.ip.binseg.configs.datasets.starechasedb1iostarhrf544 import dataset as _unlabelled
from bob.ip.binseg.configs.datasets.drive import dataset as _unlabelled
from bob.ip.binseg.data.utils import SSLDataset
dataset = SSLDataset(_labelled, _unlabelled)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment