Remove calculation
This commit is contained in:
parent
c8be764f35
commit
5aee42d59d
2 changed files with 3 additions and 8 deletions
|
@ -452,12 +452,8 @@ const faceAlignmentUsingSimilarityTransform = (
|
|||
const meanTranslation = simTransform.toMean.sub(0.5).mul(size);
|
||||
const centerMat = simTransform.fromMean.sub(meanTranslation);
|
||||
const center = new Point(centerMat.get(0, 0), centerMat.get(1, 0));
|
||||
const rotation = -Math.atan2(
|
||||
simTransform.rotation.get(0, 1),
|
||||
simTransform.rotation.get(0, 0),
|
||||
);
|
||||
|
||||
return { affineMatrix, center, size, rotation };
|
||||
return { affineMatrix, center, size };
|
||||
};
|
||||
|
||||
const convertToMobileFaceNetInput = (
|
||||
|
|
|
@ -8,10 +8,9 @@ export interface FaceDetection {
|
|||
}
|
||||
|
||||
export interface FaceAlignment {
|
||||
// TODO-ML(MR): remove affine matrix as rotation, size and center
|
||||
// are simple to store and use, affine matrix adds complexity while getting crop
|
||||
// An affine transformation matrix (rotation, translation, scaling) to align
|
||||
// the face extracted from the image.
|
||||
affineMatrix: number[][];
|
||||
rotation: number;
|
||||
// size and center is relative to image dimentions stored at mlFileData
|
||||
size: number;
|
||||
center: Point;
|
||||
|
|
Loading…
Add table
Reference in a new issue