【发布时间】:2021-08-09 22:20:02
【问题描述】:
我正在使用谷歌云视觉 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。 有没有办法解决这个问题来获得每个单词的信心?
【问题讨论】: