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]
faceMinSizerenamed todetectionMinSize: is applicable whenroienabled; - [Prop]
faceMaxSizerenamed todetectionMaxSize: ignored whenroienabled; - [Method]
setFaceCaptureMinSizerenamed tosetDetectionMinSize: is applicable whenroienabled; - [Method]
setFaceCaptureMaxSizerenamed tosetDetectionMaxSize: ignored whenroienabled; - [Message]
INVALID_CAPTURE_FACE_MIN_SIZErenamed toINVALID_MINIMUM_SIZE; - [Message]
INVALID_CAPTURE_FACE_MAX_SIZErenamed 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]
faceROIrenamed toroi; - [Prop]
faceROITopOffsetrenamed toroiTopOffset; - [Prop]
faceROIRightOffsetrenamed toroiRightOffset; - [Prop]
faceROIBottomOffsetrenamed toroiBottomOffset; - [Prop]
faceROILeftOffsetrenamed toroiLeftOffset; - [Prop]
faceROIMinSizeremoved; - [Prop]
faceDetectionBoxrenamed todetectionBox; - [Method]
setFaceROIEnablerenamed tosetROI; - [Method]
setFaceROITopOffsetrenamed tosetROITopOffset; - [Method]
setFaceROIRightOffsetrenamed tosetROIRightOffset; - [Method]
setFaceROIBottomOffsetrenamed tosetROIBottomOffset; - [Method]
setFaceROILeftOffsetrenamed tosetROILeftOffset; - [Method]
setFaceROIAreaOffsetrenamed tosetROIAreaOffset; - [Method]
setFaceROIMinSizeremoved; - [Method]
setFaceDetectionBoxrenamed tosetDetectionBox; - [Message]
INVALID_CAPTURE_FACE_OUT_OF_ROIrenamed toINVALID_OUT_OF_ROI; - [Message]
INVALID_CAPTURE_FACE_ROI_MIN_SIZEremoved;
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. |