How it works

 

 

This tutorial describes the training cycle of your deep learning algorithm.

 

 

Create a dummy API 

 

First, we’re going to create a dummy API that illustrates the main phases of the training cycle.

 

Head over to the platform and press the ‘Create a new API’ button.

 

You land now on the setup page. Here is the image I use for setting up the API, and my setup looks like this:

 

 

 

 

Upload this json into the data model. Once it’s done, it should looks like this:

 

 

 

In this model, we have set up a field of each type to understand how it works.

 

You’re all set, we can now click on the “start training” button.

 

 

Training phase

 

Our API was deployed, and you land now on the training section.

 

Upload this image into the document area:

 

 

 

 

 

Click on any field input in the form, you should see the blue boxes on your document changing.

 

 

 

 

The blue boxes displayed on the document for each field are actually the fields candidates. For each field you set up in your data model, our engine will parse the potential candidates so that a user, you, or an automatic script can tell the model what candidate was actually the one you are looking for.

 

That’s what happens when you click on the validate button.

 

For example, let’s assume we are looking for the total amount of the invoice. 

 

When you hit the blue box corresponding to the total amount in the document, the color changes and the amount is filled in the field.

 

 

 

When you are going to press “validate”, you are going to tell the deep learning model that this green box was the one corresponding to the total amount. In other words, you are teaching the model which candidate is the total amount, and he’s going to learn to extract the right one on new samples.

 

At the very beginning, there is no trained model and calling the /predict endpoint will give you only the candidates for each field, no predictions.

 

Without any prediction, the /predict endpoint and the training cycle looks like this:

 

 

 

 

The /feedback endpoint is automatically called within the interface, but you can also use the API if you want to do this on your own interface.


 

Model training

 

Once there are 20 data sent to the feedback endpoint, the training of your first model will start.

 

Our deep learning engine will automatically generate and train a model based on the data you send, and a lot of extra features based on computer visions and natural language processing embeddings.

 

In a nutshell, the algorithm will take as inputs the image of each document as well as the whole text. It’s then going to be train based on your feedback to extract the right candidates for each field.

 

Once the model is trained, it’s going to be automatically deployed in your API, and you will see a v1 version of your API appear in the documentation. A new version is released every time a new model is deployed.

 

When you call the predict endpoint with a trained model, it will perform an inference before sending back the response:


 

 

 

If you want to dive deeper into our product, feel free to reach out to our data scientist team: contact@mindee.co or join the slack channel!