image-classification generated_from_trainer

vit_receipts_classifier

This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the cord, rvl-cdip, visual-genome and an external receipt dataset to carry out Binary Classification (ticket vs no_ticket).

Ticket here is used as a synonym to "receipt".

It achieves the following results on the evaluation set, which contain pictures from the above datasets in scanned, photography or mobile picture formats (color and grayscale):

Model description

This model is a Binary Classifier finetuned version of ViT, to predict if an input image is a picture / scan of receipts(s) o something else.

Intended uses & limitations

Use this model to classify your images into tickets or not tickers. WIth the tickets group, you can use Multimodal Information Extraction, as Visual Named Entity Recognition, to extract the ticket items, amounts, total, etc. Check the Cord dataset for more information.

Training and evaluation data

This model used 2 datasets as positive class (ticket):

For the negative class (no_ticket), the following datasets were used:

Training procedure

Datasets were loaded with different distributions of data for positive and negative classes. Then, normalization and resizing is carried out to adapt it to ViT expected input.

Different runs were carried out changing the data distribution and the hyperparameters to maximize F1.

Training hyperparameters

The following hyperparameters were used during training:

Training results

Training Loss Epoch Step Validation Loss F1
0.0026 0.28 500 0.0187 0.9982
0.0186 0.56 1000 0.0116 0.9991
0.0006 0.84 1500 0.0044 0.9997

Framework versions