File size: 3,715 Bytes
fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 fbf076b d8a8ff8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | ---
library_name: transformers
license: apache-2.0
base_model: TomasFAV/Pix2StructCzechInvoice
tags:
- generated_from_trainer
- invoice-processing
- information-extraction
- czech-language
- document-ai
- multimodal-model
- generative-model
- synthetic-data
- layout-augmentation
metrics:
- f1
model-index:
- name: Pix2StructCzechInvoice-V1
results: []
---
# Pix2StructCzechInvoice (V1 – Synthetic + Random Layout)
This model is a fine-tuned version of [TomasFAV/Pix2StructCzechInvoice](https://huggingface.co/TomasFAV/Pix2StructCzechInvoice) for structured information extraction from Czech invoices.
It achieves the following results on the evaluation set:
- Loss: 0.4679
- F1: 0.6432
---
## Model description
Pix2StructCzechInvoice (V1) extends the baseline generative model by introducing layout variability into the training data.
Unlike token classification models, this model:
- processes full document images
- generates structured outputs as text sequences
It is trained to extract key invoice fields:
- supplier
- customer
- invoice number
- bank details
- totals
- dates
---
## Training data
The dataset consists of:
- synthetically generated invoice images
- augmented variants with randomized layouts
- corresponding structured text outputs
Key properties:
- variable layout structure
- visual diversity (spacing, positioning, formatting)
- consistent annotation format
- fully synthetic data
This introduces **layout variability in the visual domain**, which is crucial for generative multimodal models.
---
## Role in the pipeline
This model corresponds to:
**V1 – Synthetic templates + randomized layouts**
It is used to:
- evaluate the effect of layout variability on generative models
- compare against:
- V0 (fixed templates)
- later hybrid and real-data stages (V2, V3)
- analyze robustness of end-to-end extraction
---
## Intended uses
- End-to-end invoice extraction from images
- Document VQA-style tasks
- Research in generative document understanding
- Comparison with structured prediction models
---
## Limitations
- Still trained only on synthetic data
- Sensitive to output formatting inconsistencies
- Training instability (fluctuating F1 across epochs)
- Evaluation depends on string matching quality
- Less interpretable than token classification models
---
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 8
- eval_batch_size: 1
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 0.1
- num_epochs: 10
- mixed_precision_training: Native AMP
---
### Training results
| Training Loss | Epoch | Step | Validation Loss | F1 |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 0.1978 | 1.0 | 75 | 0.3757 | 0.5804 |
| 0.1031 | 2.0 | 150 | 0.3578 | 0.6399 |
| 0.0725 | 3.0 | 225 | 0.3504 | 0.6318 |
| 0.0512 | 4.0 | 300 | 0.3929 | 0.6396 |
| 0.0500 | 5.0 | 375 | 0.4072 | 0.6394 |
| 0.0462 | 6.0 | 450 | 0.4655 | 0.4377 |
| 0.0502 | 7.0 | 525 | 0.6320 | 0.3384 |
| 0.0528 | 8.0 | 600 | 0.4835 | 0.5018 |
| 0.0393 | 9.0 | 675 | 0.4679 | 0.6432 |
| 0.0392 | 10.0 | 750 | 0.5330 | 0.4931 |
---
## Framework versions
- Transformers 5.0.0
- PyTorch 2.10.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2 |