This commit is contained in:
Manav Rathi 2024-05-18 17:27:41 +05:30
parent 3f18fb84a1
commit 4d5ba47be4
No known key found for this signature in database

View file

@ -287,7 +287,7 @@ const faceDetectionsFromYOLOOutput = (rows: Float32Array): FaceDetection[] => {
* @returns An array of face detections with duplicates removed.
*/
const removeDuplicateDetections = (
detections: Array<FaceDetection>,
detections: FaceDetection[],
withinDistance: number,
) => {
detections.sort((a, b) => b.probability - a.probability);
@ -313,7 +313,7 @@ const removeDuplicateDetections = (
}
}
const uniques: Array<FaceDetection> = [];
const uniques: FaceDetection[] = [];
for (let i = 0; i < detections.length; i++) {
isSelected.get(i) && uniques.push(detections[i]);
}