Closed pjebs closed 4 years ago
It's possible, but why would you need it?
oval shape is more natural for a face. I can more cleanly extract out the face portion from the full image.
@pjebs do you wish to be integrated into the CLI application or the WASM version?
both
I will take care of this.
thank you
@pjebs I have update the CLI tool to support ellipses for marking the detected faces. Please also check the readme file for the supported marker types and how you can use the newly introduced marker
flag.
Will wasm have ovals too?
It's it possible to get the coordinates of the oval? Perhaps the rectangle encompassing the oval
Will wasm have ovals too?
No, at least not yet. If required could be included into WASM too.
It's it possible to get the coordinates of the oval? Perhaps the rectangle encompassing the oval
Yes, you can get the coordinates of the detected faces/eyes/landmark point by using the -json
flag.
On the WASM demo you can display the face coordinates by pressing the x
key. Check the wasm
folder for more details.
How long will it take to implement for wasm?
Done. Now it's possible to toggle between the detection marker shapes by pressing the c
key. Also check the wasm demo reference.
I saw the change to CLI:
dc.DrawEllipse(
float64(face.Col),
float64(face.Row),
float64(face.Scale)/2,
float64(face.Scale)/1.6,
)
type Detection struct {
Row int
Col int
Scale int
Q float32
}
DrawRectangle(x, y, w, h float64)
DrawEllipse(x, y, rx, ry float64)
I was wondering where the 2
and 1.6
came from? I mistakenly thought perhaps the face-detector could return a ellipse for the face. I'm assuming the face-detector just gives you a rectangle that contains the face and you just put an ellipse inside with some constants you thought looked okay visually.
If that's the case, is it possible to change marker
param for rect
to square
and have rect
be the actual rectangle returned by the face detector? Since the oval is arbitrarily chosen by you.
Either way, thank you @esimov for your package.
The detector returns just the coordinates of the detected face together with the scale factor. In fact the scale factor is the dimension of the detection window, which means in the case of ellipse, since the face detector returns a rectangle (square) this needs to be adapted to the actual shape of a face, this is the reason why on y
axis I'm using a smaller scale factor (I'm dividing by 2 because x
and y
are pointing to the center of the detection window.
Is there a way to detect the actual oval shape of the actual face?
Is it possible to use oval shape instead of square or circle?