Minor adjustment to face

cache
Varun Patil 2022-10-07 12:35:46 -07:00
parent d1e9205a54
commit 27743824f0
1 changed files with 6 additions and 5 deletions

View File

@ -149,10 +149,11 @@ export default class Tag extends Mixins(GlobalMixin) {
+ Math.max(0, -1 * (1 - (faceDetection.y + faceDetection.height) - faceDetection.height * 0.5))
}
return detections.sort((a, b) =>
scoreFacePosition(a)
- scoreFacePosition(b)
)[0];
const scoreFace = (faceDetection: IFaceDetection) => {
return (1 - faceDetection.width * faceDetection.height) + scoreFacePosition(faceDetection);
}
return detections.sort((a, b) => scoreFace(a) - scoreFace(b))[0];
}
/**
@ -236,7 +237,7 @@ export default class Tag extends Mixins(GlobalMixin) {
> img {
padding: 0;
width: 100%;
filter: brightness(50%);
filter: brightness(60%);
cursor: pointer;
transition: filter 0.2s ease-in-out;