Vision Processor(多硬件图像处理库)#
fastdeploy.vision.common.manager.PyProcessorManager#
fastdeploy.vision.common.processors.Processor#
fastdeploy.vision.common.processors.ResizeByShort#
- class fastdeploy.vision.common.processors.ResizeByShort(target_size: int, interp=1, use_scale=True, max_hw=[])[source]#
Create a ResizeByShort operation with the given parameters.
- Parameters
target_size – The target short size to resize the image
interp – Optionally, the interpolation mode for resizing image
use_scale – Optionally, whether to scale image
max_hw – Max spatial size which is used by ResizeByShort
fastdeploy.vision.common.processors.Resize#
- class fastdeploy.vision.common.processors.Resize(width, height, scale_w=-1.0, scale_h=-1.0, interp=1, use_scale=False)[source]#
Create a Resize operation with the given parameters.
- Parameters
width – Desired width of the output image
height – Desired height of the output image
scale_w – Scales the width in x-direction
scale_h – Scales the height in y-direction
interp – Optionally, the interpolation mode for resizing image
use_scale – Optionally, whether to scale image
fastdeploy.vision.common.processors.CenterCrop#
fastdeploy.vision.common.processors.Cast#
fastdeploy.vision.common.processors.HWC2CHW#
fastdeploy.vision.common.processors.Normalize#
- class fastdeploy.vision.common.processors.Normalize(mean, std, is_scale=True, min=[], max=[], swap_rb=False)[source]#
Creat a new normalize opereator with given paremeters.
- Parameters
mean – A list containing the mean of each channel
std – A list containing the standard deviation of each channel
is_scale – Specifies if the image are being scaled or not
min – A list containing the minimum value of each channel
max – A list containing the maximum value of each channel
fastdeploy.vision.common.processors.NormalizeAndPermute#
- class fastdeploy.vision.common.processors.NormalizeAndPermute(mean=[], std=[], is_scale=True, min=[], max=[], swap_rb=False)[source]#
Creae a Normalize and a Permute operation with the given parameters.
- Parameters
mean – A list containing the mean of each channel
std – A list containing the standard deviation of each channel
is_scale – Specifies if the image are being scaled or not
min – A list containing the minimum value of each channel
max – A list containing the maximum value of each channel
fastdeploy.vision.common.processors.Pad#
- class fastdeploy.vision.common.processors.Pad(top: int, bottom: int, left: int, right: int, value=[])[source]#
Create a Pad operation with the given parameters.
- Parameters
top – The top padding
bottom – The bottom padding
left – The left padding
right – The right padding
value – the value that is used to pad on the input image