shift_scale_rotate
ShiftScaleRotate
¶
Bases: MultiVariateAlbumentation
Randomly apply affine transforms: translate, scale and rotate the input.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
Union[None, str, Iterable[str]]
|
What mode(s) to execute this Op in. For example, "train", "eval", "test", or "infer". To execute regardless of mode, pass None. To execute in all modes except for a particular one, you can pass an argument like "!infer" or "!train". |
None
|
ds_id |
Union[None, str, Iterable[str]]
|
What dataset id(s) to execute this Op in. To execute regardless of ds_id, pass None. To execute in all ds_ids except for a particular one, you can pass an argument like "!ds1". |
None
|
image_in |
Optional[str]
|
The key of an image to be modified. |
None
|
mask_in |
Optional[str]
|
The key of a mask to be modified (with the same random factors as the image). |
None
|
masks_in |
Optional[str]
|
The key of masks to be modified (with the same random factors as the image). |
None
|
bbox_in |
Optional[str]
|
The key of a bounding box(es) to be modified (with the same random factors as the image). |
None
|
keypoints_in |
Optional[str]
|
The key of keypoints to be modified (with the same random factors as the image). |
None
|
image_out |
Optional[str]
|
The key to write the modified image (defaults to |
None
|
mask_out |
Optional[str]
|
The key to write the modified mask (defaults to |
None
|
masks_out |
Optional[str]
|
The key to write the modified masks (defaults to |
None
|
bbox_out |
Optional[str]
|
The key to write the modified bounding box(es) (defaults to |
None
|
keypoints_out |
Optional[str]
|
The key to write the modified keypoints (defaults to |
None
|
bbox_params |
Union[BboxParams, str, None]
|
Parameters defining the type of bounding box ('coco', 'pascal_voc', 'albumentations' or 'yolo'). |
None
|
keypoint_params |
Union[KeypointParams, str, None]
|
Parameters defining the type of keypoints ('xy', 'yx', 'xya', 'xys', 'xyas', 'xysa'). |
None
|
shift_limit |
Union[float, Tuple[float, float]]
|
Shift factor range for both height and width. If shift_limit is a single float value, the range will be (-shift_limit, shift_limit). Absolute values for lower and upper bounds should lie in range [0, 1]. |
0.0625
|
scale_limit |
Union[float, Tuple[float, float]]
|
Scaling factor range. If scale_limit is a single float value, the range will be (-scale_limit, scale_limit). |
0.1
|
rotate_limit |
Union[int, Tuple[int, int]]
|
Rotation range. If rotate_limit is a single int value, the range will be (-rotate_limit, rotate_limit). |
45
|
interpolation |
int
|
Flag that is used to specify the interpolation algorithm. Should be one of: cv2.INTER_NEAREST, cv2.INTER_LINEAR, cv2.INTER_CUBIC, cv2.INTER_AREA, cv2.INTER_LANCZOS4. |
INTER_LINEAR
|
border_mode |
int
|
Flag that is used to specify the pixel extrapolation method. Should be one of: cv2.BORDER_CONSTANT, cv2.BORDER_REPLICATE, cv2.BORDER_REFLECT, cv2.BORDER_WRAP, cv2.BORDER_REFLECT_101. |
BORDER_REFLECT_101
|
value |
Union[None, int, float, List[int], List[float]]
|
Padding value if border_mode is cv2.BORDER_CONSTANT. |
None
|
mask_value |
Union[None, int, float, List[int], List[float]]
|
Padding value if border_mode is cv2.BORDER_CONSTANT applied for masks. |
None
|
Image types
uint8, float32