开发者社区 > 视觉智能 > 正文

阿里云视觉智能facebody.cn-shanghai.aliyuncs.com是活体检测的域名吗?

在阿里云视觉智能开放平台中,"facebody.cn-shanghai.aliyuncs.com";
活体检测的域名是这个吧?

展开
收起
土豆吃小鸡 2024-08-12 07:48:19 17 0
4 条回答
写回答
取消 提交回答
  • 从事java行业9年至今,热爱技术,热爱以博文记录日常工作,csdn博主,座右铭是:让技术不再枯燥,让每一位技术人爱上技术

    您好,是的。人脸活体检测能力属于人脸人体场景,人脸人体场景的外网Endpoint是:facebody.cn-shanghai.aliyuncs.com
    人脸人体场景的内网Endpoint是:facebody-vpc.cn-shanghai.aliyuncs.com
    image.png
    其他视觉智能开放平台能力场景的访问域名信息可以参考文档:https://help.aliyun.com/zh/viapi/getting-started/access-to-the-domain-name?spm=a2c4g.11186623.0.0.53c4ed58CmXm77

    2024-08-17 17:41:39
    赞同 展开评论 打赏
  • 是的。此回答整理自钉群“阿里云视觉智能开放平台咨询1群”。

    2024-08-13 12:02:14
    赞同 展开评论 打赏
  • 是的,人脸活体检测属于人脸人体类目中,视觉智能开放平台的人脸人体服务域名是:facebody.cn-shanghai.aliyuncs.com
    image.png
    域名文档:https://help.aliyun.com/zh/viapi/getting-started/access-to-the-domain-name

    2024-08-12 13:35:27
    赞同 展开评论 打赏
  • 你说的是对的,你看下面截图那个是不是与你的一模一样
    image.png
    参考代码

    /*
    引入依赖包
    最低SDK版本要求:facebody20191230的SDK版本需大于等于3.0.7。
    可以在此仓库地址中引用最新版本SDK:https://mvnrepository.com/artifact/com.aliyun/facebody20191230
    <!-- https://mvnrepository.com/artifact/com.aliyun/facebody20191230 -->
    <dependency>
        <groupId>com.aliyun</groupId>
        <artifactId>facebody20191230</artifactId>
        <version>${aliyun.facebody.version}</version>
    </dependency>
    */
    
    import com.aliyun.facebody20191230.models.DetectLivingFaceResponse;
    import com.aliyun.tea.TeaException;
    import com.aliyun.tea.TeaModel;
    public class DetectLivingFace {
        public static com.aliyun.facebody20191230.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
            /*
              初始化配置对象com.aliyun.teaopenapi.models.Config
              Config对象存放 AccessKeyId、AccessKeySecret、endpoint等配置
             */
             com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
                .setAccessKeyId(accessKeyId)
                .setAccessKeySecret(accessKeySecret);
            // 访问的域名
            config.endpoint = "facebody.cn-shanghai.aliyuncs.com";
            return new com.aliyun.facebody20191230.Client(config);
        }
    
        public static void main(String[] args) throws Exception {
            // 创建AccessKey ID和AccessKey Secret,请参见:https://help.aliyun.com/document_detail/175144.html。
            // 如果您使用的是RAM用户的AccessKey,还需要为子账号授予权限AliyunVIAPIFullAccess,请参见:https://help.aliyun.com/document_detail/145025.html。
            // 从环境变量读取配置的AccessKey ID和AccessKey Secret。运行代码示例前必须先配置环境变量。
            String accessKeyId = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
            String accessKeySecret = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"); 
            com.aliyun.facebody20191230.Client client = DetectLivingFaceSample.createClient(accessKeyId, accessKeySecret);
            com.aliyun.facebody20191230.models.DetectLivingFaceRequest.DetectLivingFaceRequestTasks tasks0 = new com.aliyun.facebody20191230.models.DetectLivingFaceRequest.DetectLivingFaceRequestTasks()
                .setImageURL("http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg");
            com.aliyun.facebody20191230.models.DetectLivingFaceRequest.DetectLivingFaceRequestTasks tasks1 = new com.aliyun.facebody20191230.models.DetectLivingFaceRequest.DetectLivingFaceRequestTasks()
                .setImageURL("http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace17.jpg");
            com.aliyun.facebody20191230.models.DetectLivingFaceRequest detectLivingFaceRequest = new com.aliyun.facebody20191230.models.DetectLivingFaceRequest()
                .setTasks(java.util.Arrays.asList(
                    tasks0,
                    tasks1
                ));
            com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
            try {
                // 复制代码运行请自行打印 API 的返回值
                DetectLivingFaceResponse resp = client.detectLivingFaceWithOptions(detectLivingFaceRequest, runtime);
                System.out.println(com.aliyun.teautil.Common.toJSONString(TeaModel.buildMap(resp)));
            } catch (TeaException error) {
                // 如有需要,请打印 error
                com.aliyun.teautil.Common.assertAsString(error.message);
                System.out.println(error);
            } catch (Exception _error) {
                TeaException error = new TeaException(_error.getMessage(), _error);
                // 如有需要,请打印 error
                com.aliyun.teautil.Common.assertAsString(error.message);
                System.out.println(_error);
            }
        }
    }
    

    参考地址
    https://help.aliyun.com/zh/viapi/use-cases/face-in-vivo-detection-1

    回答不易请采纳

    2024-08-12 09:58:31
    赞同 4 展开评论 打赏

为开发者提供高易用、普惠的视觉API服务,帮助企业快速建立视觉智能技术应用能力的综合性视觉AI能力平台。适用于数字营销、互联网娱乐、安防、手机应用、泛金融身份认证等行业。

热门讨论

热门文章

相关电子书

更多
创新改变行业——释放域名生态的力量 立即下载
“域”见更美好的未来——域名筑梦互联网+ 立即下载
“域”感——《域名投资从入门到精通》 立即下载