anomalib.data.utils.generators¶
Utilities to generate synthetic data.
Submodules¶
Package Contents¶
Functions¶
|
Returns a random 2d perlin noise array. |
- anomalib.data.utils.generators.random_2d_perlin(shape: Tuple, res: Tuple[Union[int, torch.Tensor], Union[int, torch.Tensor]], fade=lambda t: ...) Union[numpy.ndarray, torch.Tensor][source]¶
Returns a random 2d perlin noise array.
- Parameters
shape (Tuple) – Shape of the 2d map.
res (Tuple[Union[int, Tensor]]) – Tuple of scales for perlin noise for height and width dimension.
fade (_type_, optional) – Function used for fading the resulting 2d map. Defaults to equation 6*t**5-15*t**4+10*t**3.
- Returns
Random 2d-array/tensor generated using perlin noise.
- Return type
Union[np.ndarray, Tensor]