L
L
Laigo Docs
Search
K

smartDocSplit

Introducing our smartDocSplit, which automates the task of splitting the documents between lot of joined pages within a big document, providing users with a more efficient and accurate way to process documents. Our model is capable of handling any document type, and provides extracted documents with their exact location where they begin and end. This means that you can save time and reduce the risk of errors that can occur with manual processing.
By utilizing our AI solution, you can experience faster and more accurate processing of documents, freeing up valuable time and resources that can be used elsewhere. With our model, we offer a valuable tool for anyone who regularly works with document processing, providing a more streamlined and effective solution for the Page Stream Segmentation problem. Try our smartDocSplit solution for this problem today and see how it can help improve your document processing efficiency and accuracy.

Limitations

Max File Size is 10 MB Max requests per second: 1 Processing Time: Up to the number of characters in an image

Licenses

All rights reserved by Laigo

API Call

post
https://use.laigo.io/api/FileUpload/v1/Upload/smartDocSplit
Upload file to smartInvoice
Parameters
Query
email
Define receiver email address
threshold
Set minimum probability to be reached by model
Header
accessToken*
A JWT issued to your application by the Laigo identity provider.
Body
file*
The file for uploading
Responses
201: Created
Returns Job Id
400: Bad Request
Incomplete request or insufficient Laigos
401: Unauthorized
Unauthorized call

Code snippets

cURL
C#
Python
HTML & JavaScript
PHP
curl -X POST "https://use.laigo.io/api/FileUpload/v1/Upload/smartDocSplit" \
-H "Authorization: Bearer my-accessToken-here" \
-F "email=my-email-here" \
-F "outputFormats=JSON" \
-F "file=@my-file-location-here"
var client = new HttpClient();
var email = "my-email-here";
var outputFormats = "JSON";
var url = $"https://use.laigo.io/api/FileUpload/v1/Upload/smartDocSplit?email={Uri.EscapeDataString(email)}&outputFormats={Uri.EscapeDataString(outputFormats)}";
var request = new HttpRequestMessage(HttpMethod.Post, url);
request.Headers.Add("Authorization", "Bearer my-accessToken-here");
var content = new MultipartFormDataContent();
content.Add(new StreamContent(File.OpenRead("my-file-location-here")), "file", "my-file-location-here");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
import requests
url = "https://use.laigo.io/api/FileUpload/v1/Upload/smartDocSplit"
headers = {
"Authorization": "Bearer my-accessToken-here"
}
files = {
"email": (None, "my-email-here"),
"outputFormats": (None, "JSON"),
"file": ("sample.pdf", open("my-file-location-here", "rb"))
}
response = requests.post(url, headers=headers, files=files)
print(response.text)
<input type="file" id="fileInput">
<button onclick="uploadFile()">Upload</button>
<script>
function uploadFile() {
var fileInput = document.getElementById('fileInput');
var file = fileInput.files[0];
var formData = new FormData();
formData.append("email", "my-email-here");
formData.append("outputFormats", "JSON");
formData.append("file", file);
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log(xhr.responseText);
} else {
console.error("Error:", xhr.statusText);
}
}
};
xhr.open("POST", "https://use.laigo.io/api/FileUpload/v1/Upload/smartDocSplit");
xhr.setRequestHeader("Authorization", "Bearer my-accessToken-here");
xhr.send(formData);
}
</script>
<?php
$ch = curl_init();
$url = "https://use.laigo.io/api/FileUpload/v1/Upload/smartDocSplit";
$headers = array(
"Authorization: Bearer my-accessToken-here"
);
$data = array(
"email" => "my-email-here",
"outputFormats" => "JSON",
"file" => new CurlFile("my-file-location-here", "application/pdf", "sample.pdf")
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
if ($response === false) {
echo 'Curl error: ' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>

Example (Step by step)

  1. 1.
    First you need to have a document sample that you want to use with smartDocSplit. It can be any document type such as: invoice, receipt, letter, email etc. For e.g you can use the receipt below:
  1. 2.
    Inorder to use our smartDocSplit tool you need to have an API key which can be generated from here.
If you don’t have an account, first you need to set up your account then you can generate the API key. Create an account here.
  1. 3.
    After you have generated your API key, then you can use smartDocSplitin any popular programming language, where you can find the code snippets here.
  2. 4.
    Run your code. You will receive a JSON response with the invoice details.

Credits (Laigo)

The calculation of processing a page:
Page
Laigos
1
1

EU-AI Act Reports

TECHNICAL DOCUMENTATION referred to in Article 11(1)
1. A general description of the AI system including:
(a) its intended purpose,
The AI system smartClassify is classifying German documents to their respective document types. It is classifying between advertisement, delivery note, email, form, handwritten, and invoice.
the person/s developing the system the date and the version of the system;
The AI system smartClassify was developed at
Laigo GmbH Eckenerstr. 65 88046 Friedrichshafen
and
Laigo DOO Cevahir Sky City, 16B Municipality Aerodrom, 1000 Skopje North Macedonia
Releasing Version 1.0 of the AI system, on the 20.12.2022.
(b) how the AI system interacts or can be used to interact with hardware or software that is not part of the AI system itself, where applicable;
The AI system is integrated on the webpage https://laigo.ai/ and can be called by using API. It is served on Laigo internal servers.
(c) the versions of relevant software or firmware and any requirement related to version update;
[…]
(d) the description of all forms in which the AI system is placed on the market or put into service;
The AI system is integrated on the webpage https://laigo.ai/ and can be called by using API. It is served on Laigo internal servers.
(e) the description of hardware on which the AI system is intended to run;
The AI system smartClassify is running on Laigo internal server, located in Germany.
(f) where the AI system is a component of products, photographs or illustrations showing external features, marking and internal layout of those products;
The AI system smartClassify is deployed on Laigos internal server, located in Germany. It is part of a Software as a Service product.
(g) instructions of use for the user and, where applicable installation instructions;
All instructions of the product usage are mentioned on Laigos homepage https://laigo.ai/docs.
2. A detailed description of the elements of the AI system and of the process for its development, including:
(a) the methods and steps performed for the development of the AI system, including, where relevant, recourse to pre-trained systems or tools provided by third parties and how these have been used, integrated or modified by the provider;
The AI system smartClassify is based on the Open Source Model LayoutLM from Microsoft. A fine tuning took place at Laigo GmbH with internal German dataset.
(b) the design specifications of the system,
No modifications has been done to the original neural network architecture. Only the output classes are changed.
namely the general logic of the AI system and of the algorithms;
Classify German document types between advertisement, delivery note, email, form, handwritten, and invoice. Algorithm and approach can be found here: https://arxiv.org/abs/1912.13318, 20.12.2022.
the key design choices including the rationale and assumptions made, also with regard to persons or groups of persons on which the system is intended to be used;
No design choices or modifications are done from the existing system by Laigo GmbH.
the main classification choices;
Laigo GmbH classifies this AI system with “no risk”, since none of the EU requirements are applicable for this use case.
what the system is designed to optimise for and the relevance of the different parameters;
The AI system is designed to classify documents automatically without any rule based approach. With this technology and approach a higher accuracy can be reached compared to classical rule based approaches.
the decisions about any possible trade-off made regarding the technical solutions adopted to comply with the requirements set out in Title III, Chapter 2;
(c) the description of the system architecture explaining how software components build on or feed into each other and integrate into the overall processing; the computational resources used to develop, train, test and validate the AI system;
The AI system “LayoutLM” by Microsoft has been fine tuned (trained) by Laigo with German dataset. Afterwards, it has been served by using model serving API. Training, validation and testing of the AI model are developed on Laigo internal servers.
[…]
[…]
[…]
[…]
3. Detailed information about the monitoring, functioning and control of the AI system, in particular with regard to:
its capabilities and limitations in performance, including the degrees of accuracy for specific persons or groups of persons on which the system is intended to be used and the overall expected level of accuracy in relation to its intended purpose;
Especially, if the quality of the image and the resolution is bad, text can be missed or misinterpreted in a wrong language. This appears also, if the orientation of the picture/PDF is not aligned to the orientation of the text. With this, it is possible that documents are classified not properly.
The overall accuracy is independent of specific persons or groups of persons which the system is intended to be used.
the foreseeable unintended outcomes and sources of risks to health and safety, fundamental rights and discrimination in view of the intended purpose of the AI system;
No risk to health and safety expected. Fundamental rights are respected and no discrimination of certain individuals considered.
[…]
[…]
5. A description of any change made to the system through its lifecycle;
As the AI system has been released with the first version, no changes appeared so far.
[…]
[…]
[…]
EU DECLARATION OF CONFORMITY
1. AI system name and type and any additional unambiguous reference allowing identification and traceability of the AI system;
The AI system is called “smartClassify” and is based on Microsoft open source model “LayoutLM”.
Information about LayoutLM can be found here:
Changes, adaptions and interaction with LayoutLM in the context of “smartClassify” can be found on https://laigo.ai/docs.
2. Name and address of the provider or, where applicable, their authorised representative;
Laigo GmbH . Eckenerstr. 65 88046 Friedrichshafen
Representative: Yvonne Gaissmaier
[…]
[…]
[…]
[…]
7. Place and date of issue of the declaration, name and function of the person who signed it as well as an indication for, and on behalf of whom, that person signed, signature.
Friedrichshafen, 20.12.2022 Yvonne Gaissmaier
INFORMATION TO BE SUBMITTED UPON THE REGISTRATION OF HIGH-RISK AI SYSTEMS IN ACCORDANCE WITH ARTICLE 51
1. Name, address and contact details of the provider;
Laigo GmbH Eckenerstr. 65 88046 Friedrichshafen
[…]
3. Name, address and contact details of the authorised representative, where applicable;
Yvonne Gaissmaier Eckenerstr. 65 88046 Friedrichshafen
4. AI system trade name and any additional unambiguous reference allowing identification and traceability of the AI system;
The AI system trade name is “smartClassify”.
5. Description of the intended purpose of the AI system;
The AI system smartClassify is classifying German documents to their respective document types. It is classifying between advertisement, delivery note, email, form, handwritten, and invoice.
6. Status of the AI system (on the market, or in service; no longer placed on the market/in service, recalled);
On the market
[…]
[…]
9. Member States in which the AI system is or has been placed on the market, put into service or made available in the Union;
The AI system is placed in Friedrichshafen, Germany.
[…]
11. Electronic instructions for use; this information shall not be provided for high-risk AI systems in the areas of law enforcement and migration, asylum and border control management referred to in Annex III, points 1, 6 and 7.
Any instructions for the usage of smartClassify can be found in https://laigo.ai/docs.
12. URL for additional information (optional).