使用iOS版Google Vision API添加2D或3D面部滤镜,例如MSQRD/SnapChat [英] Add 2D or 3D Face Filters like MSQRD/SnapChat Using Google Vision API for iOS

查看:156
本文介绍了使用iOS版Google Vision API添加2D或3D面部滤镜,例如MSQRD/SnapChat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我已经完成了一些研究: -我已经使用Google Vision API来检测各种面部标志. 参考如下: https://developers.google.com/vision/introduction

1) https://deepar.ai/contact/

2) https://www.luxand.com/

有可能有些人将这个问题视为重复的: 像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

1) https://deepar.ai/contact/

2) https://www.luxand.com/

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆