使用iOS版Google Vision API添加2D或3D面部滤镜,例如MSQRD/SnapChat [英] Add 2D or 3D Face Filters like MSQRD/SnapChat Using Google Vision API for iOS
问题描述
到目前为止,我已经完成了一些研究: -我已经使用Google Vision API来检测各种面部标志. 参考如下: https://developers.google.com/vision/introduction
-
这是示例代码的链接,用于获取面部标志.它使用相同的Google Vision API.这是参考链接: https://github.com/googlesamples/ios-vision
-
我浏览了互联网上的各种博客,这些博客说基于谷歌的云愿景的MSQRD.这是它的链接: https://www.raywenderlich.com/158580/augmented-reality -android-googles-face-api
-
有多个付费SDK,可以完全满足目的.但是它们价格很高.所以买不起. 例如:
有可能有些人将这个问题视为重复的: 像MSQRD/SnapChat这样的面部过滤器实现
但是该线程已使用了将近1.6年,没有正确的答案.
我已经阅读了这篇文章: https://dzone.com/articles/mimic-snapchat-filters-programmatically-1
它描述了获得所需结果的所有基本步骤.但是他们建议使用自己制作的SDK.
根据我的研究,没有足够好的材料来帮助填充所需的结果,例如 MSQRD面部滤镜.
另外一个Github存储库,其周围具有相同的实现,但没有提供太多有关相同的信息. https://github.com/rootkit/LiveFaceMask
现在我的问题是:
如果我们使用Google Vision API(甚至使用 DiLib),如何在其上添加2d或3d模型.这种格式 需要像这样完成,需要一些带有顶点的X,Y坐标 计算.
注意:我浏览了Google的"GooglyEyesDemo",其中添加了 预览层覆盖眼睛.它基本上在脸上增加了一个视野.所以我 不想在其上添加UIView一维预览层.图像 随附以供参考:
https://developers.google.com/vision/ios/face- tracker-tutorial
创建模型:我还想知道如何创建实时模型 像MSQRD这样的过滤器.我欢迎任何软件或格式建议. 希望我所做的研究能够对他人和其他人有所帮助 经验可以帮助我达到预期的效果.让我知道 需要更多详细信息.**
随附的图片以供更多参考:
谢谢 哈里
在Android中,Canvas类用于绘制此类3D/2D模型或IOS的核心图形. 您可以做的就是检测面部组件,获取它们的位置点并在它们上面绘制图像. 考虑此操作 >
Here's some research I have done so far: - I have used Google Vision API to detect various face landmarks. Here's the reference: https://developers.google.com/vision/introduction
Here's the link to Sample Code to get the facial landmarks. It uses the same Google Vision API. Here's the reference link: https://github.com/googlesamples/ios-vision
I have gone through the various blogs on internet which says MSQRD based on the Google's cloud vision. Here's the link to it: https://medium.com/@AlexioCassani/how-to-create-a-msqrd-like-app-with-google-cloud-vision-802b578b30a0
For Android here's the reference: https://www.raywenderlich.com/158580/augmented-reality-android-googles-face-api
There are multiple paid SDK's which full fills the purpose. But they are highly priced. So cant able to afford it. For instance:
There is possibility might have some see this question as duplicate of this: Face filter implementation like MSQRD/SnapChat
But the thread is almost 1.6 years old with no right answers to it.
I have gone through this article: https://dzone.com/articles/mimic-snapchat-filters-programmatically-1
It describes all the essential steps to achieve the desired results. But they advice to use their own made SDK.
As per my research no good enough material is around which helps to full fill the desired results like MSQRD face filters.
One more Github repository around which has same implementation but it doesn't gives much information about same. https://github.com/rootkit/LiveFaceMask
Now my question is:
If we have the facial landmarks using Google Vision API (or even using DiLib), how I can add 2d or 3d models over it. In which format this needs to be done like this require some X,Y coordinates with vertices calculation.
NOTE: I have gone through the Googles "GooglyEyesDemo" which adds the preview layer over eyes. It basically adds a view over the face. So I dont want to add UIView one dimensional preview layers over it. Image attached for reference :
https://developers.google.com/vision/ios/face-tracker-tutorial
Creating Models: I also want to know how to create models for live filters like MSQRD. I welcome any software or format recommendations. Hope the research I have done will help others and someone else experience helps me to achieve the desired results. Let me know if any more details are required.**
Image attached for more reference:
Thanks Harry
Canvas class is used in android for drawing such 3D / 2D models or core graphics for IOS can be used. What you can do is detect the face components, take their location points and draw images on top of them. Consider going through this
这篇关于使用iOS版Google Vision API添加2D或3D面部滤镜,例如MSQRD/SnapChat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!