阿里云智能视觉开放平台人脸人体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快速测试地址
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
更多参考
阿里云视觉智能开放平台–人脸识别使用教程
你还在原价购买阿里云、腾讯云、华为云、天翼云产品?那就亏大啦!现在申请成为四大品牌云厂商VIP用户,可以3折优惠价购买云服务器等云产品,并且可享四大云服务商产品终身VIP优惠价,还等什么?赶紧点击下面对应链接免费申请VIP客户吧:
相关文章
- 微软 Windows 11 预览版截图工具新增自动保存功能,如何关闭和开启?
- 高性能的包管理器Pnpm,你学会了吗?
- Windows 11 22H2 更新无法在动态磁盘上升级,微软称该功能已从 Windows 中废弃
- 位运算的秒用--异或运算面试真题
- 啃论文俱乐部---一个C语言JSON解析库的基准评估
- 面试官:聊聊 BigInt?
- 面试突击:单例模式有几种写法?
- 微软最后提醒:Microsoft 365 国际版将于 10 月 1 日关闭 Exchange Online 基本身份验证
- 如何为你打造一个家庭健康管理平台
- Arch Linux 中用于包管理的 GUI 应用程序
- 微软 Windows 11 Clipchamp 视频编辑器“高级滤镜”面向 Microsoft 365 用户免费解锁
- 测试显示微软 Windows 10 比 Windows 11 更节能,笔记本电脑续航更长
- 去除微软TPM等硬件限制!教你制作Windows 11安装U盘
- 微软反向升级:Windows 11续航表现实测不如Windows 10
- 微软 Windows 11 22H2 (KB5017321) 更新失败并显示下载错误 0x800F0806,修复方法来了
- 微软 Windows 11 2022 更新错误 Bug 盘点:FPS 帧率下降、蓝屏死机、安装卡住...
- 微软 Windows 11 2022 版本推送,部分用户无法检查到更新或安装(附修复方法)
- 如何使用 KubeSeal 高效加密和管理 Kubernetes 集群的 Secret
- 使用 Podman Desktop 在 Fedora Linux 上管理容器
- 淘系用户平台技术团队单元测试建设