qbcompiler.calibration.preprocess.Normalize Class Reference

qbcompiler.calibration.preprocess.Normalize Class Reference#

Mobilint SDK qb Compiler: qbcompiler.calibration.preprocess.Normalize Class Reference
Mobilint SDK qb Compiler v1.2
MCS002-EN
qbcompiler.calibration.preprocess.Normalize Class Reference

Apply mean/std normalization to images. More...

Public Member Functions

 __init__ (self, Union[List[float], np.ndarray] mean, Union[List[float], np.ndarray] std, bool to_float_div255=False)
 __call__ (self, np.ndarray img)

Public Attributes

 mean = np.float32(mean.reshape(1, -1))
 std = np.float32(std.reshape(1, -1))
 to_float_div255 = to_float_div255

Detailed Description

Apply mean/std normalization to images.

Parameters
meanlist[float] or np.ndarray. Normalization mean.
stdlist[float] or np.ndarray. Normalization standard deviation.
to_float_div255bool. Divide by 255 before normalization when True. Defaults to False.

Definition at line 482 of file preprocess.py.

Constructor & Destructor Documentation

◆ __init__()

qbcompiler.calibration.preprocess.Normalize.__init__ ( self,
Union[List[float], np.ndarray] mean,
Union[List[float], np.ndarray] std,
bool to_float_div255 = False )

Definition at line 491 of file preprocess.py.

Member Function Documentation

◆ __call__()

qbcompiler.calibration.preprocess.Normalize.__call__ ( self,
np.ndarray img )

Definition at line 514 of file preprocess.py.

Member Data Documentation

◆ mean

qbcompiler.calibration.preprocess.Normalize.mean = np.float32(mean.reshape(1, -1))

Definition at line 509 of file preprocess.py.

◆ std

qbcompiler.calibration.preprocess.Normalize.std = np.float32(std.reshape(1, -1))

Definition at line 511 of file preprocess.py.

◆ to_float_div255

qbcompiler.calibration.preprocess.Normalize.to_float_div255 = to_float_div255

Definition at line 512 of file preprocess.py.


The documentation for this class was generated from the following file: