zl程序教程

您现在的位置是:首页 >  IT要闻

当前栏目

阿里云智能视觉开放平台人脸人体API测试Demo

2023-02-26 10:19:00 时间

Step By Step

1、API介绍
2、Open API Exployer快速校验测试
3、Java SDK测试


1、API介绍
  • 功能描述

厨师帽检测可以检测明厨亮灶场景中厨师帽佩戴情况。

  • 应用场景

名厨亮灶工程:识别餐饮企业厨房中厨师是否在工作中佩戴好厨师帽。

API说明厨师帽检测

(福利推荐:阿里云、腾讯云、华为云服务器最新限时优惠活动,云服务器1核2G仅88元/年、2核4G仅698元/3年,点击这里立即抢购>>>

2、Open API Exployer快速校验测试

API Exployer快速测试地址

阿里云智能视觉开放平台人脸人体API测试Demo

3、Java SDK测试
  • 3.1 pom.xml
       <dependency>             <groupId>com.aliyun</groupId>             <artifactId>facebody20191230</artifactId>             <version>1.0.15</version>         </dependency>         <dependency>             <groupId>com.aliyun</groupId>             <artifactId>tea-openapi</artifactId>             <version>0.1.1</version>         </dependency>         <dependency>             <groupId>com.aliyun</groupId>             <artifactId>tea-console</artifactId>             <version>0.0.1</version>         </dependency>         <dependency>             <groupId>com.aliyun</groupId>             <artifactId>tea-util</artifactId>             <version>0.2.13</version>         </dependency>         <dependency>             <groupId>com.aliyun</groupId>             <artifactId>tea</artifactId>             <version>[1.1.13, 2.0.0)</version>         </dependency>
  • 3.2 CodeSample
import com.aliyun.facebody20191230.models.DetectChefCapRequest; import com.aliyun.facebody20191230.models.DetectChefCapResponse; import com.aliyun.teaopenapi.models.*;  public class Sample {      /**      * 使用AK&SK初始化账号Client      * @param accessKeyId      * @param accessKeySecret      * @return Client      * @throws Exception      */     public static com.aliyun.facebody20191230.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {         Config config = new Config()                 // 您的AccessKey ID                 .setAccessKeyId(accessKeyId)                 // 您的AccessKey Secret                 .setAccessKeySecret(accessKeySecret);         // 访问的域名         config.endpoint = "facebody.cn-shanghai.aliyuncs.com";         return new com.aliyun.facebody20191230.Client(config);     }      public static void main(String[] args_) throws Exception {         java.util.List<String> args = java.util.Arrays.asList(args_);         com.aliyun.facebody20191230.Client client = Sample.createClient("LT********", "R2DO**********");         DetectChefCapRequest detectChefCapRequest = new DetectChefCapRequest()                 .setImageURL("https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xuhan/facebody/DetectChefCap/ChefCap1.png");         // 复制代码运行请自行打印 API 的返回值           DetectChefCapResponse detectChefCapResponse = client.detectChefCap(detectChefCapRequest);         System.out.println("confidence:" + detectChefCapResponse.getBody().getData().getElements().iterator().next().confidence);         System.out.println("category:" + detectChefCapResponse.getBody().getData().getElements().iterator().next().category);     } }
  • 3.3 测试结果
confidence:0.68170947 category:chefcap

更多参考

阿里云视觉智能开放平台–人脸识别使用教程

阿里云智能视觉开放平台人脸人体API测试Demo


本站部分内容转载自网络,版权属于原作者所有,如有异议请联系QQ153890879修改或删除,谢谢!
转载请注明原文链接:阿里云智能视觉开放平台人脸人体API测试Demo

你还在原价购买阿里云、腾讯云、华为云、天翼云产品?那就亏大啦!现在申请成为四大品牌云厂商VIP用户,可以3折优惠价购买云服务器等云产品,并且可享四大云服务商产品终身VIP优惠价,还等什么?赶紧点击下面对应链接免费申请VIP客户吧:

1、点击这里立即申请成为腾讯云VIP客户

2、点击这里立即注册成为天翼云VIP客户

3、点击这里立即申请成为华为云VIP客户

4、点击这里立享阿里云产品终身VIP优惠价

喜欢 (0)
[[email protected]]
分享 (0)