简体   繁体   English

Vision 如何用于识别可见的面部标志?

[英]How can Vision be used to identify visible face landmarks?

I've been using Vision to identify Facial Landmarks, using VNDetectFaceLandmarksRequest .我一直在使用 Vision 来识别面部地标,使用VNDetectFaceLandmarksRequest

It seems that whenever a face is detected, the resulting VNFaceObservation will always contain all the possible landmarks, and have positions for all of them.似乎每当检测到人脸时,生成的VNFaceObservation将始终包含所有可能的地标,并具有所有这些地标的位置。 It also seems that positions returned for the occluded landmarks are 'guessed' by the framework.框架似乎还“猜测”了被遮挡地标返回的位置。

I have tested this using a photo where the subject's face is turned to the left, and the left eye thus isn't visible.我已经使用拍摄对象的脸转向左侧的照片对此进行了测试,因此左眼不可见。 Vision returns a left eye landmark, along with a position. Vision 返回一个左眼界标,以及一个 position。

Same thing with the mouth and nose of a subject wearing a N95 face mask, or the eyes of someone wearing opaque sunglasses.戴 N95 面罩的对象的嘴巴和鼻子,或戴不透明太阳镜的人的眼睛也是如此。

While this can be a useful feature for other use cases, is there a way, using Vision or CIDetector, to figure which face landmarks actually are visible on a photo?虽然这对于其他用例可能是一个有用的功能,但有没有一种方法可以使用 Vision 或 CIDetector 来确定照片上哪些人脸标志实际上是可见的?

I also tried using CIDetector, but it appears to be able to detect mouths and smiles through N95 masks, so it doesn't seem to be a reliable alternative.我也尝试过使用 CIDetector,但它似乎能够透过 N95 口罩检测到嘴巴和微笑,所以它似乎不是一个可靠的替代方案。

After confirmation from Apple, it appears it simply cannot be done.苹果确认后,看来根本做不到。 If Vision detects a face, it will guess some occluded landmarks' positions, and there is no way to differentiate actually detected landmarks from guesses.如果 Vision 检测到人脸,它会猜测一些被遮挡的地标的位置,并且无法区分实际检测到的地标和猜测。

For those facing the same issue, a partial way around can be to compare the landmarks' points' positions to those of the median line's and the nose crest's points.对于那些面临相同问题的人,部分解决方法是将地标点的位置与中线和鼻梁点的位置进行比较。

While this can help determine if a facial landmark is occluded by the face itself, it won't help with facial landmarks occluded by opaque sunglasses or face masks.虽然这有助于确定面部标志是否被面部本身遮挡,但对于被不透明太阳镜或面罩遮挡的面部标志却无济于事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM