v3.0.0
🔊 Yoonit Camera 3.0
Hello Devs, how have you been?
We are happily announcing the 3.0
version. This release is very important to the entire team, and we expect to the world too.
👥 New Contributor
Let's begin announcing a new contributor, our team mate and friend @gabrielrizzo. He is already in the Yoonit-Labs team and have been advising the project long ago. In this release he decided to code.
Now, let's see what we have in this release:
Detection Size
The detection validation by size is not related only to face anymore. It's applicable to QR code detection too. Soon, this feature will be applicable to the "computer vision" features.
- [Prop]
faceMinSize
renamed todetectionMinSize
: is applicable whenroi
enabled; - [Prop]
faceMaxSize
renamed todetectionMaxSize
: ignored whenroi
enabled; - [Method]
setFaceCaptureMinSize
renamed tosetDetectionMinSize
: is applicable whenroi
enabled; - [Method]
setFaceCaptureMaxSize
renamed tosetDetectionMaxSize
: ignored whenroi
enabled; - [Message]
INVALID_CAPTURE_FACE_MIN_SIZE
renamed toINVALID_MINIMUM_SIZE
; - [Message]
INVALID_CAPTURE_FACE_MAX_SIZE
renamed toINVALID_MAXIMUM_SIZE
;
Region of Interest
ROI
is not related only to face detection, it's generic and can be applicable to QR code detection. Soon, the ROI
will be applicable to the entire camera frame. In the name of the consistency and pattern, changes made necessary not only internal, but also method's names and some were removed:
- [Prop]
faceROI
renamed toroi
; - [Prop]
faceROITopOffset
renamed toroiTopOffset
; - [Prop]
faceROIRightOffset
renamed toroiRightOffset
; - [Prop]
faceROIBottomOffset
renamed toroiBottomOffset
; - [Prop]
faceROILeftOffset
renamed toroiLeftOffset
; - [Prop]
faceROIMinSize
removed; - [Prop]
faceDetectionBox
renamed todetectionBox
; - [Method]
setFaceROIEnable
renamed tosetROI
; - [Method]
setFaceROITopOffset
renamed tosetROITopOffset
; - [Method]
setFaceROIRightOffset
renamed tosetROIRightOffset
; - [Method]
setFaceROIBottomOffset
renamed tosetROIBottomOffset
; - [Method]
setFaceROILeftOffset
renamed tosetROILeftOffset
; - [Method]
setFaceROIAreaOffset
renamed tosetROIAreaOffset
; - [Method]
setFaceROIMinSize
removed; - [Method]
setFaceDetectionBox
renamed tosetDetectionBox
; - [Message]
INVALID_CAPTURE_FACE_OUT_OF_ROI
renamed toINVALID_OUT_OF_ROI
; - [Message]
INVALID_CAPTURE_FACE_ROI_MIN_SIZE
removed;
Face Analysis
Now, the face is not only detected, it is analyzed. What this really means? Well, this means that we can "understand" the face gestures, like smiles, blinks and the head movements.
This changes is the reflect of the core, the native layer. The main change is the integration in the native layer with the new projects:
- android-yoonit-facefy to the android-yoonit-camera;
- ios-yoonit-facefy to the ios-yoonit-camera;
🎉 Yoonit Facefy
This project has the focus in the face detection and analysis. He is the responsible for the Face Analysis features.
- Avoid inflate Yoonit Camera project and better maintenance;
- Enables other projects that not use the camera to analyse faces too;
Add in the event faceDetect
the Face Analysis parameters.
Before:
faceDetected(
x: number,
y: number,
width: number,
height: number
)
Now:
faceDetected(
x: number,
y: number,
width: number,
height: number,
leftEyeOpenProbability: number,
rightEyeOpenProbability: number,
smilingProbability: number,
headEulerAngleX: number,
headEulerAngleY: number,
headEulerAngleZ: number
)
Computer Vision
Computer vision is the "feature" kit with the focus in the usage of the Machine Learning in the edge. Only for Android.
➕ New Dependency: PyTorch
With the integration in the native layer, now it is possible to use any trained model in the images captured. It's only the beginning and we have big expectations with this integration.
Before:
imageCapture({
type: string,
count: number,
total: number,
image: object = {
path: string,
source: blob,
bynary: blob
}
})
Now:
imageCapture({
type: string,
count: number,
total: number,
image: object = {
path: string,
source: any,
binary: any
},
inferences: [{
['model_name']: []
}]
})
API
Function | Props | Input Type | Valid Values | Default Value | Description |
---|---|---|---|---|---|
setComputerVision | computerVision | boolean | - | false |
Enable/disable computer vision model. |
setComputerVisionLoadModels | - | Array | - | [] |
Set model to be used when image is captured. |
computerVisionClearModels | - | - | - | - | Clear models that was previous added using setComputerVisionLoadModels . |
✨ New Features
Android & iOS
Function | Props | Input Type | Valid Values | Default Value | Description |
---|---|---|---|---|---|
setTorch | torch | boolean | - | false |
Enable/disable device torch. Available only to camera lens "back" . |
setDetectionColor | detectionColor | string | - | "#ffffff73" |
Set detection box color. |
setROIAreaOffsetColor | roiAreaOffsetColor | string | - | "#ffffff73" |
Set display of the region of interest area offset color. |
Android Only
Function | Props | Input Type | Valid Values | Default Value | Description |
---|---|---|---|---|---|
setFaceContours | faceContours | boolean | - | false |
Enable/disable display list of points on a detected face. |
setFaceContoursColor | faceContoursColor | string | - | "#FFFFFF" |
Set face contours color. |