Image
Base Image class
Bases: BaseModel
Represents an image within a Tenyks dataset.
Attributes:
Name | Type | Description |
---|---|---|
dataset_key |
str
|
Key of the dataset the image belongs to.
Examples: |
key |
str
|
Key of the image.
Examples: |
filename |
str
|
Filename of the image.
Examples: |
type |
str
|
Format of the image.
Examples: |
width |
PositiveInt
|
Width of the image in pixels.
Examples: |
height |
PositiveInt
|
Height of the image in pixels.
Examples: |
raw_image_url |
HttpUrl
|
URL to the raw image (e.g., Presigned AWS S3 URL).
Examples: |
tags |
Optional[List[Tag]]
|
List of tags for the image. Defaults to an empty list. Examples: [ { "key": "colour", "name": "colour", "values": ["peach"] }, { "key": "daytime", "name": "daytime", "values": ["night", "snow"] } ]. |
annotations |
Optional[List[Annotation]]
|
List of annotations for the image. Defaults to an empty list. Examples: [ { "coordinates": [606, 170.91, 621.35, 184.28], "category": { "id": 2, "name": "person", "color": "#FF0000" }, "id": "uuid4", "segmentation": [ [431.0, 217.5, 442.0, 215.5, 432.0, 216.5, 431.0, 217.5] ], "tags": [ { "key": "colour", "name": "colour", "values": ["peach"] } ] } ]. |
predictions |
Optional[List[Prediction]]
|
List of predictions for the image. Defaults to an empty list. Examples: [ { "coordinates": [606, 170.91, 621.35, 184.28], "category": { "id": 2, "name": "person", "color": "#FF0000" }, "id": "uuid4", "segmentation": [ [431.0, 217.5, 442.0, 215.5, 432.0, 216.5, 431.0, 217.5] ], "tags": [ { "key": "colour", "name": "colour", "values": ["peach"] } ], "score": 0.95 } ]. |
Display Tenyks Image:
from tenyks_sdk.sdk.image.utils import display_images
Utility function to display Tenyks Images
Parameters:
Name | Type | Description | Default |
---|---|---|---|
images
|
List[Image]
|
A list of |
required |
n_images_to_show
|
Optional[int]
|
The number of images to display.
If |
None
|
draw_bboxes
|
Optional[bool]
|
Whether to draw bounding boxes around annotations.
If |
False
|
n_cols
|
Optional[int]
|
The number of columns in the display grid.
The layout will adjust the number of rows accordingly. Defaults to |
3
|