Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vittoriopippi authored Nov 28, 2024
1 parent 9b079a0 commit 55e13d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ print(f"BKID Score: {score}")
```

## CER (Character Error Rate)
The CER evaluates the character-level accuracy of generated handwriting by comparing the predicted text against ground-truth transcriptions. By default, the model `microsoft/trocr-base-handwritten` is used.
The CER evaluates the character-level accuracy of generated handwriting by comparing the predicted text against ground-truth transcriptions. By default, the model `Microsoft/trocar-base-handwritten` is used.

```python
from hwd.scores import CERScore

# Load datasets
fakes = FolderDataset('/path/to/images/fake') # Ensure this folder contains transcriptions.json
reals = FolderDataset('/path/to/images/real') # Ensure this folder contains transcriptions.json

# Initialize CER score
cer = CERScore(height=64)
Expand Down

0 comments on commit 55e13d9

Please sign in to comment.