Aliyun_人脸人体_人体姿态关键点

本文详细介绍了阿里云在计算机视觉领域的创新应用,特别是针对人脸识别和人体姿态关键点检测的技术。通过深度学习算法,该技术能够精准地识别和定位人体多个关节的位置,广泛应用于智能安防、运动分析、虚拟试衣等领域,显著提升了人工智能的实用性和效率。
摘要由CSDN通过智能技术生成
import oss2
import json
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
AccessKeyId="xxxxxx"
AccessKeySecret="xxxxxxx"
auth = oss2.Auth(AccessKeyId, AccessKeySecret)
bucket = oss2.Bucket(auth, 'https://oss-cn-shanghai.aliyuncs.com', 'ocr-yjs')
from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdkcore.auth.credentials import AccessKeyCredential
from aliyunsdkcore.auth.credentials import StsTokenCredential
credentials = AccessKeyCredential(AccessKeyId, AccessKeySecret)
client = AcsClient(region_id='cn-shanghai', credential=credentials)
import seaborn as sns
"""

https://help.aliyun.com/document_detail/159145.html
人体姿态关键点

BodyPosture可以获取人体的十八个关键点信息。包括:nose、neck、right_shoudler、
right_elbow、right_wrist、left_shoudler、left_elbow、left_wrist、right_hip、right_knee、right_ankle、left_hip、
left_knee、left_ankle、right_eye、left_eye、right_ear、left_ear"""

from aliyunsdkfacebody.request.v20191230.BodyPostureRequest import BodyPostureRequest

request = BodyPostureRequest()
request.set_accept_format('json')

filepath="images/人体2.jpg"
with open(filepath, 'rb') as fileobj:
    bucket.put_object(filepath, fileobj)
url="https://ocr-yjs.oss-cn-shanghai.aliyuncs.com/"+filepath
request.set_ImageURL(url)

response = client.do_action_with_exception(request)
response=json.loads(str(response, encoding='utf-8'))
print(response)
{'RequestId': '5D3902BB-BD33-5748-AF57-B93E22C4BD6A', 'Data': {'MetaObject': {'Height': 800, 'Width': 533}, 'Outputs': [{'Results': [{'Bodies': [{'Confident': 0.7394627332687378, 'Label': 'nose', 'Positions': [{'Points': [0.5694444179534912, 0.14130434393882751]}]}, {'Confident': 0.688110888004303, 'Label': 'neck', 'Positions': [{'Points': [0.5879629850387573, 0.25]}]}, {'Confident': 0.6811688542366028, 'Label': 'right_shoudler', 'Positions': [{'Points': [0.46759259700775146, 0.2554347813129425]}]}, {'Confident': 0.6633850336074829, 'Label': 'right_elbow', 'Positions': [{'Points': [0.42129629850387573, 0.3804347813129425]}]}, {'Confident': 0.6713557243347168, 'Label': 'right_wrist', 'Positions': [{'Points': [0.49074074625968933, 0.45108696818351746]}]}, {'Confident': 0.6367168426513672, 'Label': 'left_shoudler', 'Positions': [{'Points': [0.7037037014961243, 0.25]}]}, {'Confident': 0.739377498626709, 'Label': 'left_elbow', 'Positions': [{'Points': [0.7361111044883728, 0.3695652186870575]}]}, {'Confident': 0.7219
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值