imlab.picture.Picture
- class imlab.picture.Picture(image: object, box_cla: [((<class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>), <class 'str'>)])[source]
Bases:
objectPicture. Transform a Picture to one with bouding box and its classes
- __init__(image: object, box_cla: [((<class 'float'>, <class 'float'>, <class 'float'>, <class 'float'>), <class 'str'>)]) None[source]
__init__.
- Parameters
image (object) – image to transform
box_cla ([((float, float, float, float), str)]) – bouding box and classes
- Return type
None
Methods
__init__(image, box_cla)__init__.
draw([conf_prec, font])draw.
get_all_classes.
- draw(conf_prec: int = 2, font: str = '/usr/local/lib/python3.10/dist-packages/imlab/font/FUTURAM.ttf') <module 'PIL.Image' from '/usr/lib/python3/dist-packages/PIL/Image.py'>[source]
draw. draw the bouding box, classes and conf
- Parameters
conf_prec (int) – decimals of conf score to draw, 0 = no conf drawn
font (str) – font to be used
- Return type
Image