Python API¶
Database¶
-
class
bob.db.hrf.query.
FileList
(db_json)[source]¶ Bases:
object
FileList object that loads the protocol as defined in a json file. Provides a
__getitem__
interface.
Sample¶
-
class
bob.db.hrf.models.
FundusImage
(path)[source]¶ Bases:
object
Generic fundus image object.
-
property
size
¶ returns: size – the fundus image resolution in (W, H). :rtype: tuple
-
property
-
class
bob.db.hrf.models.
GroundTruth
(path, threshold=None, drawsize=None)[source]¶ Bases:
object
Generic ground truth object.
Allows for thresholding in case there are multiple ground truth annotations in one bitmap
Allows for “on-the-fly” drawing of ground truth annotations with a specified size
- Parameters
-
class
bob.db.hrf.models.
Mask
(path)[source]¶ Bases:
object
Generic mask object.
-
property
size
¶ returns: size – the mask image resolution in (W, H). :rtype: tuple
-
property
-
class
bob.db.hrf.models.
Sample
(img, gt, mask)[source]¶ Bases:
object
Generic Sample object
High level sample class that combines the objects ‘FundusImage’, ‘GroundTruth’ and ‘Mask’. Allows for access of the subclass, e.g. :
>>> img = FundusImage('path/to/some_img.file') >>> gt = GroundTruth('path/to/some_gt.file') >>> mask = Mask('path/to/some_mask.file') >>> mysample = Sample(img, gt, mask) >>> mysample.img.basename 'some_img.file' >>> mysample.gt.basename 'some_gt.file' >>> mysample.mask.basename 'some_mask.file' >>>
- Parameters
img (FundusImage) –
gt (GroundTruth) –
mask (Mask) –
-
property
paths
¶ returns: paths – paths of image, ground truth and mask :rtype: list