Find Pitch and Yaw of Face with Vision

Using VNFaceObservation to get a bounding box and approximate information about the face, but could not find where to get the feed and yaw of the face from observation.

They also tried to get metadata metadata and metadata from CIDetector, but the simultaneous use of CIDetector and Vision Framework is the processor intensity.

    let metadataOutput = AVCaptureMetadataOutput()
    let metaQueue = DispatchQueue(label: "MetaDataSession")
    metadataOutput.setMetadataObjectsDelegate(self, queue: metaQueue)
    if captureSession.canAddOutput(metadataOutput) {
        captureSession.addOutput(metadataOutput)
    } else {
        print("Meta data output can not be added.")
    }


    let configurationOptions: [String: AnyObject] = [CIDetectorAccuracy: CIDetectorAccuracyHigh as AnyObject, CIDetectorTracking : true as AnyObject, CIDetectorNumberOfAngles: 11 as AnyObject]
    faceDetector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: configurationOptions)

Is there a way to use VNFaceObservation data to search for height and yaw of a face?

+4
source share

Source: https://habr.com/ru/post/1692284/


All Articles