A fine-tuned version of
agomberto/trocr-large-handwritten-fr for transcription of text found on European and French herbarium specimen labels.
This model was fine-tuned to handle the specific OCR challenges of herbarium digitization. Herbarium labels are particularly difficult because a single label often contains both printed institutional text and handwritten collector notes, sometimes dating back to the 19th or early 20th century.
The model was fine-tuned on a private dataset of annotated French and European herbarium label images. The dataset is not publicly available.
Benchmarks were computed on a held-out subset of the IRD/UMMISCO herbarium label dataset.
1from transformers import TrOCRProcessor, VisionEncoderDecoderModel
2from PIL import Image
3
4processor = TrOCRProcessor.from_pretrained("yeppeuda13/TrOCR_Herbiome")
5model = VisionEncoderDecoderModel.from_pretrained("yeppeuda13/TrOCR_Herbiome")
6
7image = Image.open("word_crop.jpg").convert("RGB")
8pixel_values = processor(images=image, return_tensors="pt").pixel_values
9
10generated_ids = model.generate(pixel_values)
11text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
12print(text)
If you use this model, please credit the
HERBIOME project.