yarrow.yarrow_cls.Image
- class yarrow.yarrow_cls.Image(width: int, height: int, file_name: str, date_captured: datetime, id: Optional[str] = None, azure_url: Optional[str] = None, confidential: Optional[Clearance] = None, meta: Optional[dict] = None, comment: Optional[str] = None, asset_id: Optional[str] = None, split: Optional[str] = None, **kwargs)
Bases:
object- __init__(width: int, height: int, file_name: str, date_captured: datetime, id: Optional[str] = None, azure_url: Optional[str] = None, confidential: Optional[Clearance] = None, meta: Optional[dict] = None, comment: Optional[str] = None, asset_id: Optional[str] = None, split: Optional[str] = None, **kwargs) None
Image object, not a pydantic class, represents the image informations
- Args:
width (int): image width in pixel height (int): image height in pixel file_name (str): file name OR path in container in azure date_captured (datetime): date of acquisition id (str, optional): pydantic identifier azure_url (str, optional): complete azure url. Defaults to None. confidential (Clearance, optional): clearance information, not necessary. Defaults to None. meta (dict, optional): optional metadata. Defaults to None. comment (str, optional): optional comment. Defaults to None. asset_id (str, optional): unique identifier of the asset that created the picture, not used. Defaults to None. split(str, optional): string to specify to which split the image belong, used to assign images to “train”, “validate” or “test” when training models for example.
Methods
__init__(width, height, file_name, date_captured)Image object, not a pydantic class, represents the image informations
pydantic([id, reset])Returns the pydantic object mapping this class.
- pydantic(id: Optional[str] = None, reset: bool = False) Image_pydantic
Returns the pydantic object mapping this class. After the first call_ the object reference is kept. Pass reset=True to reinstantiate the object
- Args:
id (str, optional): image id that will be passed to the pydantic class. IRIS2 use cas. Defaults to None. reset (bool, optional): Pass True to reinstantiate the object, previous object will be lost. Defaults to False.
- Returns:
Image_pydantic: pydantic image class