Remove calculation

This commit is contained in:
Manav Rathi 2024-05-21 09:38:05 +05:30
parent c8be764f35
commit 5aee42d59d
No known key found for this signature in database
2 changed files with 3 additions and 8 deletions

View file

@ -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 = (

View file

@ -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;