image
A Evidence instance for image media.
Image
Bases: Evidence
Image implements the Value interface for image media.
Source code in mlte/evidence/types/image.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
image = image
instance-attribute
The data of the referenced image.
__init__(image)
Initialize an Image instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image
|
Union[str, Path, bytes]
|
The path to the image (str, Path) or raw image data (bytes) |
required |
Source code in mlte/evidence/types/image.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
__str__()
Return a string representation of this Evidence.
Source code in mlte/evidence/types/image.py
86 87 88 | |
from_model(model)
classmethod
Convert an opaque value model to its corresponding artifact.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
BaseModel
|
The model representation |
required |
Returns:
| Type | Description |
|---|---|
Image
|
The real value |
Source code in mlte/evidence/types/image.py
59 60 61 62 63 64 65 66 67 68 69 | |
register_info(info)
classmethod
Register info about an image value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
info
|
str
|
The information to record. |
required |
Returns:
| Type | Description |
|---|---|
Validator
|
The Validator that can be used. |
Source code in mlte/evidence/types/image.py
71 72 73 74 75 76 77 78 | |
to_model()
Convert an image value artifact to its corresponding model.
Returns:
| Type | Description |
|---|---|
ArtifactModel
|
The artifact model |
Source code in mlte/evidence/types/image.py
48 49 50 51 52 53 54 55 56 57 | |