pychubby.reference module¶
Module focused on creation of reference spaces.
-
class
pychubby.reference.
DefaultRS
¶ Bases:
pychubby.reference.ReferenceSpace
Default reference space.
-
tform
¶ Affine transformation.
Type: skimage.transform.GeometricTransform
-
keypoints
¶ Defining landmarks used for estimating the parameters of the model.
Type: dict
-
estimate
(lf)¶ Estimate parameters of the affine transformation.
Parameters: lf (pychubby.detect.LandmarFace) – Instance of the LandmarkFace
.
-
inp2ref
(coords)¶ Transform from input to reference space.
Parameters: coords (np.ndarray) – Array of shape (N, 2) where the columns represent x and y coordinates in the input space. Returns: tformed_coords – Array of shape (N, 2) where the columns represent x and y coordinates in the reference space correspoding row-wise to coords. Return type: np.ndarray
-
ref2inp
(coords)¶ Transform from reference to input space.
Parameters: coords (np.ndarray) – Array of shape (N, 2) where the columns represent x and y reference coordinates. Returns: tformed_coords – Array of shape (N, 2) where the columns represent x and y coordinates in the input image correspoding row-wise to coords. Return type: np.ndarray
-