RandomPerspective classkeras.layers.RandomPerspective(
factor=1.0,
scale=1.0,
interpolation="bilinear",
fill_value=0.0,
seed=None,
data_format=None,
**kwargs
)
A preprocessing layer that applies random perspective transformations.
This layer distorts the perspective of input images by shifting their
corner points, simulating a 3D-like transformation. The amount of distortion
is controlled by the factor and scale parameters.
Note: This layer is safe to use inside a tf.data or grain pipeline
(independently of which backend you're using).
Arguments
factor=0.0 ensures no transformation is applied.factor=1.0 means the transformation is always applied.(min, max) is provided, a probability is randomly
sampled between min and max for each image.0.0 and the provided float.
Default is 1.0."nearest",
"bilinear".fill_mode="constant".