Unity调用Face++ 人脸识别 Detect API

Face++提供的 人脸识别 SDK 和 公开的API 可以实现精确的人脸识别,返回多达106个识别点,是目前市面上非常理想的人脸识别产品。这里记录一下 通过Unity 使用c# 调用Face++的detect API的过程。首先申请Face++账号,创建应用、绑定BundleID(BundleID 与 unity 中PlaySetting的Package Name 保持一致)等必备条件,具体步骤...
摘要由CSDN通过智能技术生成

Face++提供的 人脸识别 SDK 和 公开的API 可以实现精确的人脸识别,返回多达106个识别点,是目前市面上非常理想的人脸识别产品。这里记录一下 通过Unity 使用c# 调用Face++的detect API的过程。

首先申请Face++账号,创建应用、绑定BundleID(BundleID 与 unity 中PlaySetting的Package Name 保持一致)等必备条件,具体步骤 在Face++的官网上有详细流程点击打开链接,对于Detect API的调用参数介绍等点击打开链接

调用代码:静态类 HttpHelper4MultipartForm

using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using UnityEngine;

namespace MgLiveCOM_Eyes
{
    public static class HttpHelper4MultipartForm 
    {
        public class FileParameter
        {
            public byte[] File
            {
                get;
                set;
            }

            public string FileName
            {
                get;
                set;
            }

            public string ContentType
            {
                get;
                set;
            }

            public FileParameter(byte[] file) : this(file, null)
            {
            }

            public FileParameter(byte[] file, string filename) : this(file, filename, null)
            {
            }

            public FileParameter(byte[] file, string filename, string contenttype)
            {
                this.File = file;
                this.FileName = filename;
                this.ContentType = contenttype;
            }
        }
        private static readonly Encoding encoding = Encoding.UTF8;
        /// <summary>
        /// MultipartForm请求
        /// </summary>
        /// <p
  • 3
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值