|
Safemotion Lib
|
Functions | |
| to_tensor (pic) | |
| int_parameter (level, maxval) | |
| float_parameter (level, maxval) | |
| sample_level (n) | |
| autocontrast (pil_img, *args) | |
| equalize (pil_img, *args) | |
| posterize (pil_img, level, *args) | |
| rotate (pil_img, level, *args) | |
| solarize (pil_img, level, *args) | |
| shear_x (pil_img, level, image_size) | |
| shear_y (pil_img, level, image_size) | |
| translate_x (pil_img, level, image_size) | |
| translate_y (pil_img, level, image_size) | |
| color (pil_img, level, *args) | |
| contrast (pil_img, level, *args) | |
| brightness (pil_img, level, *args) | |
| sharpness (pil_img, level, *args) | |
Variables | |
| list | augmentations_reid |
| list | augmentations |
| list | augmentations_all |
@author: liaoxingyu @contact: sherlockliao01@gmail.com
| fastreid.data.transforms.functional.autocontrast | ( | pil_img, | |
| * | args ) |
Definition at line 92 of file functional.py.
| fastreid.data.transforms.functional.brightness | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 166 of file functional.py.
| fastreid.data.transforms.functional.color | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 154 of file functional.py.
| fastreid.data.transforms.functional.contrast | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 160 of file functional.py.
| fastreid.data.transforms.functional.equalize | ( | pil_img, | |
| * | args ) |
Definition at line 96 of file functional.py.
| fastreid.data.transforms.functional.float_parameter | ( | level, | |
| maxval ) |
Helper function to scale `val` between 0 and maxval.
Args:
level: Level of the operation that will be between [0, `PARAMETER_MAX`].
maxval: Maximum value that the operation can have. This will be scaled to
level/PARAMETER_MAX.
Returns:
A float that results from scaling `maxval` according to `level`.
Definition at line 76 of file functional.py.
| fastreid.data.transforms.functional.int_parameter | ( | level, | |
| maxval ) |
Helper function to scale `val` between 0 and maxval .
Args:
level: Level of the operation that will be between [0, `PARAMETER_MAX`].
maxval: Maximum value that the operation can have. This will be scaled to
level/PARAMETER_MAX.
Returns:
An int that results from scaling `maxval` according to `level`.
Definition at line 64 of file functional.py.
| fastreid.data.transforms.functional.posterize | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 100 of file functional.py.
| fastreid.data.transforms.functional.rotate | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 105 of file functional.py.
| fastreid.data.transforms.functional.sample_level | ( | n | ) |
Definition at line 88 of file functional.py.
| fastreid.data.transforms.functional.sharpness | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 172 of file functional.py.
| fastreid.data.transforms.functional.shear_x | ( | pil_img, | |
| level, | |||
| image_size ) |
Definition at line 117 of file functional.py.
| fastreid.data.transforms.functional.shear_y | ( | pil_img, | |
| level, | |||
| image_size ) |
Definition at line 126 of file functional.py.
| fastreid.data.transforms.functional.solarize | ( | pil_img, | |
| level, | |||
| * | args ) |
Definition at line 112 of file functional.py.
| fastreid.data.transforms.functional.to_tensor | ( | pic | ) |
Convert a ``PIL Image`` or ``numpy.ndarray`` to tensor.
See ``ToTensor`` for more details.
Args:
pic (PIL Image or numpy.ndarray): Image to be converted to tensor.
Returns:
Tensor: Converted image.
Definition at line 12 of file functional.py.
| fastreid.data.transforms.functional.translate_x | ( | pil_img, | |
| level, | |||
| image_size ) |
Definition at line 135 of file functional.py.
| fastreid.data.transforms.functional.translate_y | ( | pil_img, | |
| level, | |||
| image_size ) |
Definition at line 144 of file functional.py.
| list fastreid.data.transforms.functional.augmentations |
Definition at line 182 of file functional.py.
| list fastreid.data.transforms.functional.augmentations_all |
Definition at line 187 of file functional.py.
| list fastreid.data.transforms.functional.augmentations_reid |
Definition at line 177 of file functional.py.