iaa_od.models.coordinates

Classes

COCOCoordinates(input_x, input_y, input_w, ...)

A class to represent bounding box coordinates in (x, y, width, height) format.

XYXYCoordinates(x_min, y_min, x_max, y_max)

A class to represent bounding box coordinates in (x_min, y_min, x_max, y_max) format.

class iaa_od.models.coordinates.COCOCoordinates(input_x, input_y, input_w, input_h, *, image_height=None)[source]

Bases: object

A class to represent bounding box coordinates in (x, y, width, height) format.

x

The top-left corner x coordinate.

Type:

float

y

The top-left corner y coordinate.

Type:

float

w

The width of the box.

Type:

float

h

The height of the box.

Type:

float

h: int
image_height: InitVar = None
input_h: InitVar
input_w: InitVar
input_x: InitVar
input_y: InitVar
to_xyxy()[source]

Convert the (x, y, w, h) coordinates to XYXY format (x_min, y_min, x_max, y_max).

w: int
x: int
y: int
class iaa_od.models.coordinates.XYXYCoordinates(x_min, y_min, x_max, y_max)[source]

Bases: object

A class to represent bounding box coordinates in (x_min, y_min, x_max, y_max) format.

x_min

The minimum x-coordinate (left).

Type:

float

y_min

The minimum y-coordinate (top).

Type:

float

x_max

The maximum x-coordinate (right).

Type:

float

y_max

The maximum y-coordinate (bottom).

Type:

float

to_coco()[source]

Convert the (x_min, y_min, x_max, y_max) coordinates to COCO format (x, y, width, height).

x_max: int
x_min: int
y_max: int
y_min: int