【问题标题】:Using Google Cloud Vision API使用谷歌云视觉 API
【发布时间】:2017-06-17 17:10:24
【问题描述】:

我正在尝试使用 Google Cloud Vision API,但遇到了一些问题。让我解释一下我采取的步骤,然后是我面临的问题。我正在 Windows 10 中运行此代码。

  1. 下载并安装“GoogleCloudSDKInstaller”。
  2. gcloud auth application-default login 来激活我的登录 凭证
  3. 使用this 代码运行人脸检测器,用于图像 在我的本地系统中。
  4. cd 到图片所在的文件夹
  5. 然后运行以下代码:

    python detect_face.py "image.jpg"

但是我收到了这个错误:

raise EnvironmentError('项目没有通过,不能是' OSError:项目未通过,无法从 环境。

谁能告诉我为什么会遇到这个问题?

【问题讨论】:

    标签: python google-cloud-vision


    【解决方案1】:

    我使用的是 Google Vision API,但在 C# 中使用 Visual Studios 2017,我需要将环境变量设置为 GOOGLE_DEFAULT_CREDENTIALS。 你可能有这个问题,试着在网上看看如何设置。

    【讨论】:

    • 感谢您的回答。我通过此链接youtube.com/… 解决了这个问题
    • 原来是一样的?很高兴为您提供帮助!
    猜你喜欢
    • 1970-01-01
    • 2016-06-02
    • 1970-01-01
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    • 2019-03-22
    • 2019-07-05
    • 1970-01-01
    相关资源
    最近更新 更多