Hive’s OCR moderation model outputs semantically grouped and ordered text blocks in their natural reading order accompanied by a set of classifications, timestamps and indexes.

{
"status": [
    {
      "status": {
        "code": "0",
        "message": "SUCCESS"
      },
      "response": {
        "input": "...",
        "output": [
          {
            "time": 0,
            "frame_results": [
              {
                "block_text": "Hey Hello How are you!!!",
                "start_char_index": 0,
                "end_char_index": 24,
                "custom_classes": [],
                "text_filters": [],
                "pii_entities": [],
                "classes": [
                  {
                    "class": "spam",
                    "score": 0
                  },
                  {
                    "class": "sexual",
                    "score": 0
                  },
                  {
                    "class": "hate",
                    "score": 0
                  },
                  {
                    "class": "violence",
                    "score": 0
                  },
                  {
                    "class": "bullying",
                    "score": 0
                  }
                ],
                "bounding_poly": [
                  {
                    "classes": [
                      {
                        "class": "Hey",
                        "score": 0.9999999917553856
                      }
                    ],
                    "dimensions": {
                      "left": 12.1875,
                      "right": 54.375,
                      "top": 90,
                      "bottom": 110.625
                    },
                    "vertices": [
                      {
                        "x": 12.1875,
                        "y": 110.625
                      },
                      {
                        "x": 12.1875,
                        "y": 90
                      },
                      {
                        "x": 54.375,
                        "y": 90
                      },
                      {
                        "x": 54.375,
                        "y": 110.625
                      }
                    ],
                    "meta": {
                      "score": 0.9998763799667358,
                      "label": "text"
                    }
                  },
                  {
                    "classes": [
                      {
                        "class": "Hello",
                        "score": 0.9999999917553853
                      }
                    ],
                    "dimensions": {
                      "left": 11.875,
                      "right": 67.5,
                      "top": 115.625,
                      "bottom": 132.1875
                    },
                    "vertices": [
                      {
                        "x": 11.875,
                        "y": 132.1875
                      },
                      {
                        "x": 11.875,
                        "y": 115.625
                      },
                      {
                        "x": 67.5,
                        "y": 115.625
                      },
                      {
                        "x": 67.5,
                        "y": 132.1875
                      }
                    ],
                    "meta": {
                      "score": 0.9998019337654114,
                      "label": "text"
                    }
                  },
                  {
                    "classes": [
                      {
                        "class": "How",
                        "score": 0.9999999917553853
                      }
                    ],
                    "dimensions": {
                      "left": 12.5,
                      "right": 59.6875,
                      "top": 140.625,
                      "bottom": 157.1875
                    },
                    "vertices": [
                      {
                        "x": 12.5,
                        "y": 157.1875
                      },
                      {
                        "x": 12.5,
                        "y": 140.625
                      },
                      {
                        "x": 59.6875,
                        "y": 140.625
                      },
                      {
                        "x": 59.6875,
                        "y": 157.1875
                      }
                    ],
                    "meta": {
                      "score": 0.9997391104698181,
                      "label": "text"
                    }
                  },
                  {
                    "classes": [
                      {
                        "class": "are",
                        "score": 0.9999999917553856
                      }
                    ],
                    "dimensions": {
                      "left": 65.00000238418579,
                      "right": 99.68749761581421,
                      "top": 144.3750011920929,
                      "bottom": 157.1874988079071
                    },
                    "vertices": [
                      {
                        "x": 65.00000238418579,
                        "y": 157.1874988079071
                      },
                      {
                        "x": 65.00000238418579,
                        "y": 144.3750011920929
                      },
                      {
                        "x": 99.68749761581421,
                        "y": 144.3750011920929
                      },
                      {
                        "x": 99.68749761581421,
                        "y": 157.1874988079071
                      }
                    ],
                    "meta": {
                      "score": 0.9997876286506653,
                      "label": "text"
                    }
                  },
                  {
                    "classes": [
                      {
                        "class": "you!!!",
                        "score": 0.9999999917553856
                      }
                    ],
                    "dimensions": {
                      "left": 104.68748569488525,
                      "right": 163.7499761581421,
                      "top": 140.6250023841858,
                      "bottom": 160.9374976158142
                    },
                    "vertices": [
                      {
                        "x": 104.68748569488525,
                        "y": 160.9374976158142
                      },
                      {
                        "x": 104.68748569488525,
                        "y": 140.6250023841858
                      },
                      {
                        "x": 163.7499761581421,
                        "y": 140.6250023841858
                      },
                      {
                        "x": 163.7499761581421,
                        "y": 160.9374976158142
                      }
                    ],
                    "meta": {
                      "score": 0.9998366832733154,
                      "label": "text"
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  ]
}

Name

Description

frame_results[j].bounding_poly[i].classes.0.class

Contains the transcribed characters for the detected word.

frame_results[j].bounding_poly[i].classes.0.score

Contains the confidence score for the transcribed word.

frame_results[j].bounding_poly[i].meta.score

Contains the confidence score for the detected word — irrespective of the transcription of that word.

frame_results[j].classes

List of dictionaries of all output classes. Each dictionary contains the class name and the score. The scores range from 0 to 3 with 3 being the most severe.

frame_results[j].classes.class

Name of predicted class.

frame_results[j].classes.score

Score of predicted class.

frame_results[j].classes.start_char_index

First character processed.

frame_results[j].classes.end_char_index

Last character processed.