File size: 4,144 Bytes
1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 1ac1099 7c20624 |
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 |
---
library_name: transformers
license: gpl-3.0
datasets:
- phunc20/nj_biergarten_captcha_v2
base_model:
- microsoft/trocr-base-handwritten
---
# Model Card for trocr-base-handwritten_nj_biergarten_captcha_v2
This is a model for CAPTCHA OCR.
## Model Details
### Model Description
This is a simple model finetuned from `microsoft/trocr-base-handwritten` on a dataset
I created at `phunc20/nj_biergarten_captcha_v2`.
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
## Bias, Risks, and Limitations
Although the model seems to perform well on the dataset `phunc20/nj_biergarten_captcha_v2`,
it does not exhibit such good performance across all CAPTCHA images. In this respect, this
model is worse than Human.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details
### Training Data
Like I mentioned, I trained this model on `phunc20/nj_biergarten_captcha_v2`.
In particular, I trained on the `train` split and evalaute on `validation` split,
without touching the `test` split.
### Training Procedure
Please refer to
<https://gitlab.com/phunc20/captchew/-/blob/main/colab_notebooks/train_from_pretrained_Seq2SeqTrainer_torchDataset.ipynb?ref_type=heads>
which is adapted from
<https://github.com/NielsRogge/Transformers-Tutorials/blob/master/TrOCR/Fine_tune_TrOCR_on_IAM_Handwriting_Database_using_Seq2SeqTrainer.ipynb>
## Evaluation
### Testing Data, Factors & Metrics
#### Testing Data
1. The `test` split of `phunc20/nj_biergarten_captcha_v2`
2. This Kaggle dataset <https://www.kaggle.com/datasets/fournierp/captcha-version-2-images/data>
(we shall call this dataset by the name of `kaggle_test_set` in this model card.)
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
CER, exact match and average length difference. The former two can be found in HuggingFace's
documentation. The last one is just one metric I care a little about. It is quite easy to
understand and, if need be, explanation could be found at the source code:
<https://gitlab.com/phunc20/captchew/-/blob/v0.1/average_length_difference.py>
### Results
On the `test` split of `phunc20/nj_biergarten_captcha_v2`
| Model | cer | exact match | avg len diff |
| --------------------------------------------------------- | -------- | ----------- | ------------ |
| `phunc20/trocr-base-handwritten_nj_biergarten_captcha_v2` | 0.001333 | 496/500 | 1/500 |
| `microsoft/trocr-base-handwritten` | 0.9 | 5/500 | 2.4 |
On `kaggle_test_set`
| Model | cer | exact match | avg len diff |
| --------------------------------------------------------- | -------- | ----------- | ------------ |
| `phunc20/trocr-base-handwritten_nj_biergarten_captcha_v2` | 0.4381 | 69/1070 | 0.1289 |
| `microsoft/trocr-base-handwritten` | 1.0112 | 17/1070 | 2.4439 |
## Environmental Impact
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed] |