Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
VNDetectFaceRectanglesRequest always returns 0 for yaw/pitch/roll

I'm trying to get the pitch / yaw / roll of a face in an image using the Vision framework but always get 0 for all values. Images should be very easy to process (mostly forward looking portraits).

I've successfully got these values by using Amazon Rekognition on them, so the images themselves aren't the issue. (I need to do a batch of about 70,000 so using rekogniton for them all will get expensive and slow.)

This is the request code:

let faceLandmarksRequest = VNDetectFaceRectanglesRequest(completionHandler: handleRectangles)

let requestHandler = VNImageRequestHandler(cgImage: cgImage!, orientation: CGImagePropertyOrientation.right ,options: [:])

do {
    try requestHandler.perform([faceLandmarksRequest])
} catch {
    print(error)
}

And here's the handler code:

func handleRectangles(request: VNRequest, errror: Error?) {

    guard let observations = request.results as? [VNFaceObservation] else {
        fatalError("unexpected result type!")
    }

    for face in observations {

        print("\(face.yaw))") // always zero

    }
}

Any help appreciated :)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Actually roll and yaw work, but for now they are very rough. You always get zero because roll and yaw (as of 2019) are a discrete set of 6 or 7 values rather than a continuous range of values with exact orientation of the face.

Try a "more rotated" face.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda