Classification of same documents but different company (logo)

Hello everyone,

probably a very noob question, I’m just started in this new magic worl of AI and ML. I’ve run every tutorial project I could find, i develop my own Dog or Cat model by transfering from MobileNet.
I’m now struggling with the classification of documents.

I have 50 companies that sends us invoices and I want to train a model in order to recognize which company sent us the invoice automatically. The document structure is basically the same (some minor differences in the structure of a table) the main difference lies in the logo of the company of course.
The images are very large, so what I’m trying right now is this:

(using Tensorflow.js if it metters)

This the network i thought it could work.

I process every image in this way:
image

Then i try to train the model with this code:

But at this point the log tells me that it will not reach 0.4 as accuracy.

Can you point me in the right direction?

@Pelonarax,

Welcome to the Tensorflow Forum,

Training with 10 images might not sufficient. Try to increase more images per class and see if accuracy improves.

Thank you!

1 Like

hi @chunduriv

Thanks for replying. I tried with more image per class (about 50), i tweaked some value, increased the epochs. What happens is this: in the first 5 epoch increase a bit until a 0.3 (0.35 sometimes but then decrease) and got stuck in that. :confused:

@Pelonarax,

If your aim is to classify the documents you can try NLP Models. If you want to use Vision models you can extract logos from the document and train the model on the logos. So that the visual information can be learned.

Trying to classify the document using vision models might not yield the best results since the document contains the text data rather than pixel level information.

Thank you!