Diploma OCR

Reading this article you'll be able to build an OCR API that extracts data from diploma using our deep learning engine.

Prerequisites

  1. You’ll need a free account. Sign up and confirm your email to login.
  2. You’ll need at least 20 different diploma images or pdfs to train your OCR model

Define your diploma prescription use case


First, we’re going to define what fields we want to extract from your diploma.

Here is the list of fields we are going to extract using our OCR API:

  • Date
  • University name: String which contains both numeric and alpha characters
  • Graduate name: String which Only contains alpha characters
  • Major: String which only contains alpha characters
  • Diploma number: Amount

Diploma key data extraction

That’s it for our use case. Feel free to add any other relevant data to fit your requirements.

Deploy your API


Once you have defined what fields you want to extract, head over to the platform and press the ‘Create a new API’ button.

You land now on the setup page. You can use any image you want for setting up the API, my setup looks like this:

Set up your model

Once you’re ready, click on the “next” button. We are going to specify the data types for each of the fields we want our API to extract.

Define your model

To move forward, you have two possibilities:

Upload a json config
Copy the following JSON into a file and upload it on the interface

{
  "problem_type": {
    "classificator": { "features": [], "features_name": [] },
    "selector": {
      "features": [
        {
          "cfg": { "filter": { "convention": "US" } },
          "handwritten": false,
          "name": "date",
          "public_name": "Date",
          "semantics": "date"
        },
        {
          "cfg": { "filter": { "alpha": -1, "numeric": -1 } },
          "handwritten": false,
          "name": "university_name",
          "public_name": "University Name",
          "semantics": "word"
        },
        {
          "cfg": { "filter": { "alpha": -1, "numeric": 0 } },
          "handwritten": false,
          "name": "graduate_name",
          "public_name": "Graduate Name",
          "semantics": "word"
        },
        {
          "cfg": { "filter": { "alpha": -1, "numeric": 0 } },
          "handwritten": false,
          "name": "major",
          "public_name": "Major",
          "semantics": "word"
        },
        {
          "cfg": { "filter": { "is_integer": -1 } },
          "handwritten": false,
          "name": "diploma_number",
          "public_name": "Diploma Number",
          "semantics": "amount"
        }
      ],
      "features_name": [
        "date",
        "university_name",
        "graduate_name",
        "major",
        "diploma_number"
      ]
    }
  }
}

Or build your data model manually
Using the interface, add up to your data model each field.

In our example, here are the different field configurations we used:

  • Date: in European format
  • University name: String which contains both numeric and alpha characters
  • Graduate name: A name never contains numeric characters
  • Major: String which only contains alpha characters
  • Diploma number: Amount

Once you’re done setting up your data model, press the Start training your model button at the bottom of the screen.

Ready to train model

Train your diploma OCR

Train your model

Now is the time to train your diploma deep learning model in the Training section of our API. You will soon be able to use your custom OCR API for diplomas! When you will reach at least 20 documents to train your model you will receive a confirmation email allowing your model to make predictions.

To get more information about the training phase, please refer to the Getting Started tutorial. If you have any question regarding your use case, feel free to reach out on our chat!

Updated 28 days ago


Diploma OCR


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.