Skip to content

v3.0.0

Compare
Choose a tag to compare
@TeruyaHaroldo TeruyaHaroldo released this 05 Apr 12:26
· 329 commits to development since this release

🔊 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 to detectionMinSize: is applicable when roi enabled;
  • [Prop] faceMaxSize renamed to detectionMaxSize: ignored when roi enabled;
  • [Method] setFaceCaptureMinSize renamed to setDetectionMinSize: is applicable when roi enabled;
  • [Method] setFaceCaptureMaxSize renamed to setDetectionMaxSize: ignored when roi enabled;
  • [Message] INVALID_CAPTURE_FACE_MIN_SIZE renamed to INVALID_MINIMUM_SIZE;
  • [Message] INVALID_CAPTURE_FACE_MAX_SIZE renamed to INVALID_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 to roi;
  • [Prop] faceROITopOffset renamed to roiTopOffset;
  • [Prop] faceROIRightOffset renamed to roiRightOffset;
  • [Prop] faceROIBottomOffset renamed to roiBottomOffset;
  • [Prop] faceROILeftOffset renamed to roiLeftOffset;
  • [Prop] faceROIMinSize removed;
  • [Prop] faceDetectionBox renamed to detectionBox;
  • [Method] setFaceROIEnable renamed to setROI;
  • [Method] setFaceROITopOffset renamed to setROITopOffset;
  • [Method] setFaceROIRightOffset renamed to setROIRightOffset;
  • [Method] setFaceROIBottomOffset renamed to setROIBottomOffset;
  • [Method] setFaceROILeftOffset renamed to setROILeftOffset;
  • [Method] setFaceROIAreaOffset renamed to setROIAreaOffset;
  • [Method] setFaceROIMinSize removed;
  • [Method] setFaceDetectionBox renamed to setDetectionBox;
  • [Message] INVALID_CAPTURE_FACE_OUT_OF_ROI renamed to INVALID_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:

🎉 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.

⬆️ Upgrade Dependencies

  • android-yoonit-camera update to 2.9.0;
  • ios-yoonit-camera update to 2.5.0;