CoolFace
Modelpublic

ernie-ai/finetuned-vit-image-text-classifier

sourceHugging Faceapache-2.0updated 4y agoView on Hugging Face
0likes16downloads
Model Card

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

finetuned-vit-doc-text-classifer

This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the ernie-ai/image-text-examples-ar-cn-latin-notext dataset. It achieves the following results on the evaluation set:

  • Loss: 0.3107
  • Accuracy: 0.9030

Model description

It is an image classificatin model fine-tuned to predict whether an images contains text and if that text is Latin script, Chinese or Arabic. It also classifies non-text images.

Training and evaluation data

Dataset: [ernie-ai/image-text-examples-ar-cn-latin-notext]

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 0.0002
  • trainbatchsize: 16
  • evalbatchsize: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lrschedulertype: linear
  • num_epochs: 8
  • mixedprecisiontraining: Native AMP

Training results

Training LossEpochStepValidation LossAccuracy
0.27192.081000.41200.8657
0.10274.172000.39070.8881
0.07236.253000.31070.9030

Framework versions

  • Transformers 4.26.0
  • Pytorch 1.13.1+cu116
  • Datasets 2.9.0
  • Tokenizers 0.13.2