首页 > 解决方案 > 每个文本的 Google Cloud Vision 准确度返回 0.0

问题描述

我正在使用谷歌云视觉 OCR 来检测图像中的文本。我在谷歌提供的文本之后尝试了 .confidence ,但它总是返回为 0.0

response = client.document_text_detection(image=image_googlecloud)
texts = response.text_annotations

texts[0].confidence == 0.0

###This is the part of output of the response variable (the last few lines)###
                y: 2657
              }
            }
            text: "E"
            confidence: 1.0
          }
          confidence: 0.9900000095367432
        }
        confidence: 0.9900000095367432
      }
      block_type: TEXT
      confidence: 0.9900000095367432
    }
  }

当我打印响应变量具有所有置信度值(都大于 0.0)但是当我尝试获取某个单词的置信度时(在上面的方法中)它返回 0.0。有没有办法解决这个问题来获得每个单词的信心?

标签: google-cloud-vision

解决方案



推荐阅读