Python API¶
Database¶
-
class
bob.db.drishtigs1.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.drishtigs1.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.drishtigs1.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.drishtigs1.models.
Sample
(img, gt)[source]¶ Bases:
object
Generic Sample object
High level sample class that combines the objects ‘FundusImage’ and ‘GroundTruth’ Allows for access of the subclass, e.g. :
>>> img = FundusImage('path/to/some_img.file') >>> gt = GroundTruth('path/to/some_gt.file') >>> mysample = Sample(img, gt) >>> mysample.img.basename 'some_img.file' >>> mysample.gt.basename 'some_gt.file' >>>
- Parameters
img (FundusImage) –
gt (GroundTruth) –
-
property
paths
¶ returns: paths – paths of image, ground truth :rtype: list