random_crop_from_borders
RandomCropFromBorders
¶
Bases: MultiVariateAlbumentation
Crop a random part of the input from borders.
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[Iterable[str]]
|
The list of mask keys 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[Iterable[str]]
|
The list of keys 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
|
crop_left
|
Randomly crop left border of image.Float value in the range (0.0, 1.0). |
0.1
|
|
crop_right
|
Randomly crop right border of image.Float value in the range (0.0, 1.0). |
0.1
|
|
crop_top
|
Randomly crop top border of image.Float value in the range (0.0, 1.0). |
0.1
|
|
crop_bottom
|
Randomly crop bottom border of image.Float value in the range (0.0, 1.0). |
0.1
|
Image types
uint8, float32