google-cloud-platformocrgoogle-cloud-vision

Classify handwritten text using Google Cloud Vision


I'm exploring Google Cloud Vision to detect handwriting in text. I see that the model is quite accurate in read handwritten text.

I'm following this guide: https://cloud.google.com/vision/docs/handwriting

Here is my question: is there a way to discover in the responses if the text is handwritten or typed?

A parameter or something in the response useful to classify images?

Here is the request:

{
  "requests": [
    {
      "features": [
        {
          "type": "DOCUMENT_TEXT_DETECTION"
        }
      ],
      "image": {
        "source": {
          "imageUri": "gs://cloud-samples-data/vision/handwriting_image.png"
        }
      }
    }
  ]
}

Here is the response:

{
  "responses": [
    {
      "textAnnotations": [
        {
          "locale": "en",
          "description": "Google Cloud\nPlatform\n",
          "boundingPoly": {
            "vertices": [
              {
                "x": 380,
                "y": 66
              },
              {
                "x": 714,
                "y": 66
              },
              {
                "x": 714,
                "y": 257
              },
              {
                "x": 380,
                "y": 257
              }
            ]
          }
        },
        {
          "description": "Google",
          "boundingPoly": {
            "vertices": [
              {
                "x": 380,
                "y": 69
              },
              {
                "x": 544,
                "y": 67
              },
              {
                "x": 545,
                "y": 185
              },
              {
                "x": 381,
                "y": 187
              }
            ]
          }
        },
...

Thank you

Solution

  • It seems that there's already an open discussion with the Google team to get this Feature Request addressed:

    https://issuetracker.google.com/154156890

    I would recommend you to comment on the Public issue tracker and indicate that "you are affected to this issue" to gain visibility and push for get this change done.

    Other that that I'm unsure is that can be implemented locally.