pixano.features.utils.boxes
denormalize_coords(coord, height, width, rounded_int=True)
Denormalize coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
coord
|
list[float]
|
Normalized coordinates. |
required |
height
|
int
|
Height. |
required |
width
|
int
|
Width. |
required |
rounded_int
|
bool
|
True to round denormalized float to nearest integer. |
True
|
Returns:
Type | Description |
---|---|
list[float]
|
Unnormalized coordinates. |
Source code in pixano/features/utils/boxes.py
mask_to_bbox(mask)
Return the smallest bounding box containing all the mask pixels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mask
|
ndarray
|
Mask as NumPy Array. |
required |
Returns:
Type | Description |
---|---|
list[float]
|
Normalized xywh bounding box. |
Source code in pixano/features/utils/boxes.py
normalize_coords(coord, height, width)
Normalize coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
coord
|
list[float]
|
Unnormalized coordinates. |
required |
height
|
int
|
Height. |
required |
width
|
int
|
Width. |
required |
Returns:
Type | Description |
---|---|
list[float]
|
Normalized coordinates. |