0

How to get the document quality score in google document AI as the "Intelligent document quality processor" is not available now?

Used general-ocr and tried to get the entities(as the documentation shows entities has the quality score), but no entities found.

richard
  • 1
  • 1

1 Answers1

0

Here is the information about getting Document Quality information from the Document OCR Processor.

Note - For the Document OCR processor, you must use processor version pretrained-ocr-v1.1-2022-09-12 to get the quality information.

Document OCR Processor - Handling the Processing Response

Starting with processor version pretrained-ocr-v1.1-2022-09-12, the Document OCR processor can also perform quality assessment of a document based on its readability. This quality assessment is a quality score in [0, 1], where 1 means perfect quality. The quality score is returned in the Page.imageQualityScores field. All detected defects are listed as quality/defect_* and sorted in descending order by confidence value.

{
  "pages": [
    {
      "imageQualityScores": {
        "qualityScore": 0.7811847,
        "detectedDefects": [
          {
            "type": "quality/defect_document_cutoff",
            "confidence": 1.0
          },
          {
            "type": "quality/defect_glare",
            "confidence": 0.97849524
          },
          {
            "type": "quality/defect_text_cutoff",
            "confidence": 0.5
          }
        ]
      }
    }
  ]
}

Holt Skinner
  • 1,692
  • 1
  • 8
  • 21