Open MathieuCesbron opened 1 year ago
@justadudewhohacks can you please provide an option to remove score from top of the detection rectangle. Thanks!
Need to customize method drawDetections. In face-api.js find function drawDetections and add options={withScore:true}
as third argument. Than inside this function change row var label = score ? "" + round(score) : undefined;
to var label = options.withScore && score ? "" + round(score) : undefined;
After these changes call faceapi.draw.drawDetections
with third argument {withScore: false}
drawDetections won't draw score if we provide IRect object. The code below works for me
const box: IRect = {
x: resizedDetections.detection.box.left,
y: resizedDetections.detection.box.top,
width: resizedDetections.detection.box.width,
height: resizedDetections.detection.box.height,
};
faceapi.draw.drawDetections(canvasDraw, box);
Hello and thanks for the great work,
I have this in my code:
faceapi.draw.drawDetections(canvasDraw, resizedDetections);
It works but I would like to remove the score on the top of the rectangle, I cannot find where to pass the options.
May be it is something like this ?
faceapi.draw.drawDetections(canvasDraw, resizedDetections, {withScore: false});
Have a good day,