ResizeEdge¶
- class mmcls.datasets.transforms.ResizeEdge(scale, edge='short', backend='cv2', interpolation='bilinear')[source]¶
Resize images along the specified edge.
Required Keys:
img
Modified Keys:
img
img_shape
Added Keys:
scale
scale_factor
- Parameters
scale (int) – The edge scale to resizing.
edge (str) – The edge to resize. Defaults to ‘short’.
backend (str) – Image resize backend, choices are ‘cv2’ and ‘pillow’. These two backends generates slightly different results. Defaults to ‘cv2’.
interpolation (str) – Interpolation method, accepted values are “nearest”, “bilinear”, “bicubic”, “area”, “lanczos” for ‘cv2’ backend, “nearest”, “bilinear” for ‘pillow’ backend. Defaults to ‘bilinear’.