tasks.image#

Module Contents#

Classes#

ImageBatch

Task for processing batches of images. Images are stored as a list of ImageObject instances, each containing the path to the image and associated metadata.

ImageObject

Represents a single image with metadata.

API#

class tasks.image.ImageBatch#

Bases: tasks.tasks.Task

Task for processing batches of images. Images are stored as a list of ImageObject instances, each containing the path to the image and associated metadata.

data: list[tasks.image.ImageObject]#

‘field(…)’

property num_items: int#

Number of images in this batch.

validate() bool#

Validate the task data.

class tasks.image.ImageObject#

Represents a single image with metadata.

Attributes: image_path: Path to the image file on disk image_id: Unique identifier for the image metadata: Additional metadata associated with the image image_data: Raw image pixel data as numpy array (H, W, C) in RGB format embedding: Image embedding vector as numpy array aesthetic_score: Aesthetic quality score as float nsfw_score: NSFW probability score as float

aesthetic_score: float | None#

None

embedding: numpy.ndarray | None#

None

image_data: numpy.ndarray | None#

None

image_id: str = <Multiline-String>#
image_path: str = <Multiline-String>#
metadata: dict[str, Any]#

‘field(…)’

nsfw_score: float | None#

None