Skip to content
class

RandomCropNearBBox

extends_NoParamsTransform[Empty]
RandomCropNearBBox(max_part_shift: float = 0.3, p: float = 1.0)

Crop a window around the first bounding box (Albumentations RandomCropNearBBox).

Parameters

max_part_shiftfloat= 0.3
Max jitter of the crop window edges, as a fraction of the box size.
pfloat= 1.0
No description.

Examples

>>> import lucid, lucid.utils.transforms as T
>>> tf = T.RandomCropNearBBox(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)

Used by 1

Constructors

2
dunder

__init__

→None
__init__(max_part_shift: float = 0.3, p: float = 1.0)
dunder

__call__

→object
__call__(inputs: object)

Instance methods

1
fn

make_params

→Emptyfrom _NoParams
make_params(img: Tensor)

Dunder methods

1