0.20.0
·
64 commits
to master
since this release
features:
- age and gender recognition (AgeGenderNet)
- improved and more flexible drawing api accessible via faceapi.draw (see examples)
- allow alignment via withFaceLandmarks before face classification (expression, age and gender prediction) for better accuracy
- faceapi.matchDimensions helper function to resize media elements
breaking API changes:
-
FaceExpressionNet.predictExpressions returns FaceExpressions instance instead of array now
-
withFaceLandmarks() has to come first after detectAllFaces, detectSingleFace now, since its
possible now to use face alignment for face classifcation to achieve more stable prediction results
for face classification (expression, age and gender prediction):
await faceapi.detectAllFaces(input).withFaceExpressions().withFaceLandmarks()
-> await faceapi.detectAllFaces(input).withFaceLandmarks().withFaceExpressions()
await faceapi.detectAllFaces(input).withFaceLandmarks().withFaceExpressions().withFaceDescriptors()
-> await faceapi.detectAllFaces(input).withFaceLandmarks().withFaceExpressions().withFaceDescriptors()
await faceapi.detectSingleFace(input).withFaceExpressions().withFaceLandmarks()
-> await faceapi.detectSingleFace(input).withFaceLandmarks().withFaceExpressions()
await faceapi.detectSingleFace(input).withFaceExpressions().withFaceLandmarks().withFaceDescriptor()
-> await faceapi.detectSingleFace(input).withFaceLandmarks().withFaceExpressions().withFaceDescriptor()
- removed internals and old drawing api that have been exported:
- BoxWithText
- getDefaultDrawOptions
- drawBox (use faceapi.draw.DrawBox(box).draw(canvas) instead)
- drawDetection (use faceapi.draw.drawDetections instead)
- drawFaceLandmarks (use faceapi.draw.drawFaceLandmarks instead)
- drawFaceExpressions (use faceapi.draw.drawFaceExpressions instead)
- drawText (use faceapi.draw.DrawTextField(text).draw(canvas) instead)