Skip to content

kolena.asset

Assets are additional files that can be linked to the datapoints in your datasets. Assets can be visualized in the Kolena when exploring your datasets, test cases, or model results.

The following asset types are available:

Asset #

Bases: TypedDataObject[_AssetType]

Base class for all asset types.

ImageAsset #

Bases: Asset

An image in a cloud bucket.

locator: str instance-attribute #

The location of this image in a cloud bucket, e.g. s3://my-bucket/path/to/my-image-asset.png.

PlainTextAsset #

Bases: Asset

A plain text file in a cloud bucket.

locator: str instance-attribute #

The location of this text file in a cloud bucket, e.g. s3://my-bucket/path/to/my-text-asset.txt.

BinaryAsset #

Bases: Asset

A binary file in a cloud bucket.

locator: str instance-attribute #

The location of this text file in a cloud bucket, e.g. s3://my-bucket/path/to/my-binary-asset.bin.

PointCloudAsset #

Bases: Asset

A three-dimensional point cloud located in a cloud bucket. Points are assumed to be specified in a right-handed, Z-up coordinate system with the origin around the sensor that captured the point cloud.

PointCloudAsset supports the following extensions: .pcd, .npy, and .npz.

If using an .npy or .npz file format, PointCloudAsset expects a (N, 3) or (N, 4) shaped numpy array, with each row as a array of (x, y, z, [intensity]) values.

If using an .npz file, include an npz_key when initializing to specify the path field to load as an array: PointCloudAsset(locator="s3://my-bucket/path/to/my-point-cloud.npz", npz_key="points")

locator: str instance-attribute #

The location of this point cloud in a cloud bucket, e.g. s3://my-bucket/path/to/my-point-cloud.pcd.

BaseVideoAsset #

Bases: Asset

A video clip located in a cloud bucket or served at a URL.

locator: str instance-attribute #

URL (e.g. S3, HTTPS) of the video file.

VideoAsset #

Bases: BaseVideoAsset

A video clip located in a cloud bucket or served at a URL.

locator: str instance-attribute #

URL (e.g. S3, HTTPS) of the video file.

thumbnail: Optional[ImageAsset] = None class-attribute instance-attribute #

Optionally provide asset locator for custom video thumbnail image.

start: Optional[float] = None class-attribute instance-attribute #

Optionally specify start time of video snippet, in seconds.

end: Optional[float] = None class-attribute instance-attribute #

Optionally specify end time of video snippet, in seconds.

frame_rate: Optional[float] = None class-attribute instance-attribute #

Optionally specify the frame rate of video snippet, in frames per second.

AudioAsset #

Bases: Asset

An audio file in a cloud bucket or served at a URL.

For best results, use a broadly supported file type such as .mp3 or .wav.

locator: str instance-attribute #

The location of this audio file in a cloud bucket, e.g. s3://my-bucket/path/to/my-audio-asset.mp3.

MeshAsset #

Bases: Asset

A 3d mesh file in a cloud bucket or served at a URL.

Only .ply file type is supported.

locator: str instance-attribute #

The location of this 3d mesh file in a cloud bucket, e.g. s3://my-bucket/path/to/my-mesh-asset.ply.