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

视觉智能平台人体分割有一个证件照的例子,我调试提示错误怎么办?

视觉智能平台人体分割有一个证件照的例子,我调试提示没有detect_face_with_option,这要怎么解决?
```python3 idcard.py
/usr/local/lib/python3.5/dist-packages/aliyunsdkcore/auth/algorithm/sha_hmac256.py:20: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
from cryptography.hazmat.backends import default_backend
Traceback (most recent call last):
File "idcard.py", line 82, in id_pohto_demo
face_result = face_client.detect_face_with_options(detect_face_request, runtime)
AttributeError: 'Client' object has no attribute 'detect_face_with_options'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "idcard.py", line 254, in
id_pohto_demo(args)
File "idcard.py", line 109, in id_pohto_demo
print(error.message)
AttributeError: 'AttributeError' object has no attribute 'message'
```

展开
收起
你鞋带开了~ 2024-02-20 21:59:48 36 0
2 条回答
写回答
取消 提交回答
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    根据您提供的错误信息,问题出在face_client.detect_face_with_options(detect_face_request, runtime)这一行代码。错误提示为'Client' object has no attribute 'detect_face_with_options',意味着face_client对象没有名为detect_face_with_options的属性。

    解决这个问题的方法是检查您的代码中是否正确导入了相关模块和库,并确保使用了正确的方法名。根据您的描述,您可能需要使用detect_face方法而不是detect_face_with_options

    请尝试将代码中的detect_face_with_options替换为detect_face,然后重新运行程序。如果问题仍然存在,请检查您的阿里云视觉智能平台的文档或联系技术支持以获取更多帮助。

    2024-02-21 13:30:07
    赞同 展开评论 打赏
  • 这个几个包都有依赖了嘛?这个报错应该是没有依赖facebody20191230这个包
    3e0a76d63fd957ae88f369274620d0e9.png
    --此回答整理自钉群“阿里云视觉智能开放平台咨询1群”

    2024-02-20 22:14:10
    赞同 展开评论 打赏

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

相关产品

  • 视觉智能开放平台
  • 热门讨论

    热门文章

    相关电子书

    更多
    阿里云视觉智能开放平台-产品介绍 立即下载
    阿里云视觉智能开放平台产品介绍 立即下载
    利用CNN实现无需联网的图像识别 立即下载