pixano.data.item.item_view
ItemView(**data)
Bases: BaseModel
View type for DatasetItem
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
View ID |
type |
str
|
View type ("image", "video", "point_cloud") |
url |
str
|
View URI |
thumbnail |
str
|
View thumbnail as base 64 URL |
frame_number |
int
|
View frame number |
total_frames |
int
|
View total frames |
features |
dict[str, ItemFeature]
|
View features |
Raises ValidationError
if the input data cannot be
validated to form a valid model.
self
is explicitly positional-only to allow self
as a field name.
Source code in pydantic/main.py
from_pyarrow(table, schema, media_dir, media_features=False)
staticmethod
Create dictionary of ItemView from PyArrow Table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
dict[str, Any]
|
PyArrow table |
required |
schema
|
schema
|
PyArrow schema |
required |
media_dir
|
Path
|
Dataset media directory |
required |
media_features
|
bool
|
Load media features like image width and height (slow for large item batches) |
False
|
Returns:
Type | Description |
---|---|
dict[ItemView]
|
Dictionary of ItemView |