Skip to content

Enums

rerun

class Box2DFormat

Bases: Enum

How to specify 2D boxes (axis-aligned bounding boxes).

XCYCW2H2 = 'XCYCW2H2' class-attribute instance-attribute

[x_center, y_center, width/2, height/2].

XCYCWH = 'XCYCWH' class-attribute instance-attribute

[x_center, y_center, width, height].

XYWH = 'XYWH' class-attribute instance-attribute

[x,y,w,h], with x,y = left,top.

XYXY = 'XYXY' class-attribute instance-attribute

[x0, y0, x1, y1], with x0,y0 = left,top and x1,y1 = right,bottom.

YXHW = 'YXHW' class-attribute instance-attribute

[y,x,h,w], with x,y = left,top.

YXYX = 'YXYX' class-attribute instance-attribute

[y0, x0, y1, x1], with x0,y0 = left,top and x1,y1 = right,bottom.

class ImageFormat

⚠️ DEPRECATED ⚠️ Image file format.

BMP: ImageFormat instance-attribute

BMP file format.

GIF: ImageFormat instance-attribute

JPEG/JPG file format.

JPEG: ImageFormat instance-attribute

JPEG/JPG file format.

NV12: type[NV12] instance-attribute

Raw NV12 encoded image.

The type comes with a size_hint attribute, a tuple of (height, width) which has to be specified specifying in order to set the RGB size of the image.

PNG: ImageFormat instance-attribute

PNG file format.

TIFF: ImageFormat instance-attribute

TIFF file format.

YUY2: type[YUY2] instance-attribute

Raw YUY2 encoded image.

YUY2 is a YUV422 encoding with bytes ordered as yuyv.

The type comes with a size_hint attribute, a tuple of (height, width) which has to be specified specifying in order to set the RGB size of the image.