
InvoiceNet: Neural network to extract information from invoice documents - homarp
https://github.com/naiveHobo/InvoiceNet
======
mmerlin
Fantastic work! I will be testing it out for sure.

Coincidentally I'm just about to begin a project intending to use the Form
Recognizer service in Azure:

[https://azure.microsoft.com/en-us/services/cognitive-
service...](https://azure.microsoft.com/en-us/services/cognitive-
services/form-recognizer/)

I will definitely do a side-by-side comparison with InvoiceNet.

Xero also has a related service: [https://www.xero.com/au/features-and-
tools/accounting-softwa...](https://www.xero.com/au/features-and-
tools/accounting-software/expenses/)

~~~
pinky07
Have a look at Odoo, you can test our engine here:
[https://www.odoo.com/page/invoice-
automation](https://www.odoo.com/page/invoice-automation)

We will open our API next week at last.

~~~
vibeeshan025
You are going to make the API available or the whole library

------
jacquesm
This really needs a dataset to go with it. Preferably one from different
countries and with different currencies and tax identification number styles.

Invoice recognition is a tricky subject, the companies that specialize in this
field have spent a large amount of time and money on the problem, it would be
great to see some kind of benchmark vs the commercial services.

~~~
enraged_camel
>> This really needs a dataset to go with it.

Addressed in the disclaimer section. :)

~~~
jacquesm
Yes. Let me outline some of the challenges in this field: invoice information
extraction is a subset of forms parsing, which is for many companies a
hellishly difficult problem to deal with. The more companies are automated the
more such information will be presented in a way that is machine readable,
which means you will only have to do field matching rather than actually
reading the field. OCR is anything but perfect resulting in errors creeping
into digitized forms requiring human review. This relegates most of these
solutions to aids for a human reviewer rather than a zero touch process.
Finally, when working with international customers and suppliers you will have
to be able to concurrently deal with a lot of different kinds of forms and
languages which may require a step prior to the forms extraction that will
decide what language the form is in and what kind of form it is.

For each form type that you intend to extract data from you will need a
substantial training database. The good news is as you use it you build up
more data but for legal reasons you may not be able to use that data to train
on.

So that's why it really needs a dataset. One way to get one is to generate it
based on a real dataset. I think that stands a much higher chance of happening
than that some company will ship their - highly confidential - invoice stack
to an unknown entity to make it world readable. That would likely cause that
company serious problems and their legal department would never sign off on
it.

------
oblib
What could an invoice app do to make this easy?

For example, what if I embed the invoice data in a JSON file in a PDF? Could
that make it easier for the user?

I really don't know much about PDF, but from what little I just read after
checking it is possible to do that.

~~~
pinky07
The invoicing standard in France and Germany (factur-x) embed the XML inside
the PDF, which is very convenient.

Here is a python lib that does it:
[https://pypi.org/project/factur-x/](https://pypi.org/project/factur-x/)

Odoo, an open source invoicing software, produces factur-x invoices
systematically (whatever the country): very convenient as it's parsed
automatically.

~~~
im3w1l
Invoices in Sweden have a design created for easy OCR-scanning. I prefer this
way because it means that there can be no discrepancy between what I see and
what the machine sees.

Another benefit is that it's really easy to recognize an invoice at a glance,
and you know exactly where all the info is.

------
jhot
Really excited to try this out. I work in document capture and the products
that the company I work for offers have absolute garbage "machine learning"
capabilities. If this works well it could save us a lot of time building out
our complex rules for extracting Invoice data.

------
agustif
If you want to do this in-house, I've some libs I can share to extract pdf's
to json/structured data

js
[https://www.npmjs.com/package/pdf2json](https://www.npmjs.com/package/pdf2json)

py [https://py-pdf-parser.readthedocs.io/en/latest/](https://py-pdf-
parser.readthedocs.io/en/latest/) or
[https://pypi.org/project/pdfminer/](https://pypi.org/project/pdfminer/)

php [https://pdfparser.org/documentation](https://pdfparser.org/documentation)

------
monkeydust
Would be nice to get some benchmarks on this e.g. vs
[https://aws.amazon.com/textract/](https://aws.amazon.com/textract/) etc

~~~
cdolan
And Azures form processing module

------
2bitencryption
I'm curious, how do you prevent overfitting, where the model will simply learn
the exact formats of the training data? Then it will not generalize to a
format it has never seen before?

Unless the training data is an extremely diverse set of invoices, maybe
randomly generated?

~~~
malux85
Look at the loss and val_loss numbers in the sample image, it's way
overfitting.

~~~
ottolin
That's exactly the first thing pop up to my mind also.

------
pinky07
Very curious to test it and compare it with other solutions.

FWIW, one can test the AI of Odoo here: [https://www.odoo.com/page/invoice-
automation](https://www.odoo.com/page/invoice-automation)

------
Frozaken
I think the by far coolest part about this, is that you dont need to tag your
dataset on a token basis. Could be interesting to see results by using the
graph convolution approach by Liu et al. as opposed to just feeding raw
images.

------
BrandiATMuhkuh
Is there a public data set with invoice photos? The best I can find is use
Google photo search. (I'm searching since about eight years). For proper
training and experimentation we would need a couple of thousand

------
fblp
Im curious what hosted software does really good invoice recognition? (eg
roger.ai)

~~~
visarga
UiPath has free community models (hosted in cloud) for invoice and receipt
processing. They integrate with RPA workflows or can be used as JSON APIs.

------
dvaun
This would be a great tool to use in-house for speeding up certain processes.

