qbcompiler.calibration.preprocess.Pad Class Reference#
|
Mobilint SDK qb Compiler v1.2
MCS002-EN
|
qbcompiler.calibration.preprocess.Pad Class Reference
Pad images to a target shape or to meet a size divisor. More...
Public Member Functions | |
| __init__ (self, shape=None, int size_divisor=None, float pad_val=0.0, bool right_bottom=False) | |
| __call__ (self, np.ndarray img) | |
Public Attributes | |
| pad_val = pad_val | |
| size_divisor = size_divisor | |
| shape = shape | |
| right_bottom = right_bottom | |
Detailed Description
Pad images to a target shape or to meet a size divisor.
- Parameters
-
shape tuple[int]. Expected output shape (h, w). Defaults to None. size_divisor int. Ensures width and height are divisible by this value. Defaults to None. pad_val float. Fill value used during padding. Defaults to 0.0. right_bottom bool. When True, pad on the right and bottom only. Defaults to False.
Definition at line 437 of file preprocess.py.
Constructor & Destructor Documentation
◆ __init__()
| qbcompiler.calibration.preprocess.Pad.__init__ | ( | self, | |
| shape = None, | |||
| int | size_divisor = None, | ||
| float | pad_val = 0.0, | ||
| bool | right_bottom = False ) |
Definition at line 447 of file preprocess.py.
Member Function Documentation
◆ __call__()
| qbcompiler.calibration.preprocess.Pad.__call__ | ( | self, | |
| np.ndarray | img ) |
Definition at line 460 of file preprocess.py.
Member Data Documentation
◆ pad_val
| qbcompiler.calibration.preprocess.Pad.pad_val = pad_val |
Definition at line 455 of file preprocess.py.
◆ size_divisor
| qbcompiler.calibration.preprocess.Pad.size_divisor = size_divisor |
Definition at line 456 of file preprocess.py.
◆ shape
| qbcompiler.calibration.preprocess.Pad.shape = shape |
Definition at line 457 of file preprocess.py.
◆ right_bottom
| qbcompiler.calibration.preprocess.Pad.right_bottom = right_bottom |
Definition at line 458 of file preprocess.py.
The documentation for this class was generated from the following file:
Generated by