Upload README.md
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ license: openrail
|
|
4 |
# trocr-old-russian
|
5 |
## Info
|
6 |
The model is trained to recognize printed texts in Old Russian language
|
7 |
-
- Use
|
8 |
- Fine-tune on 636k text images
|
9 |
|
10 |
## Usage
|
@@ -15,7 +15,7 @@ from transformers import VisionEncoderDecoderModel
|
|
15 |
|
16 |
hf_model = VisionEncoderDecoderModel.from_pretrained("Serovvans/trocr-old-russian")
|
17 |
|
18 |
-
image = Image.open("./
|
19 |
|
20 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
|
21 |
pixel_values = processor(images=image, return_tensors="pt").pixel_values
|
|
|
4 |
# trocr-old-russian
|
5 |
## Info
|
6 |
The model is trained to recognize printed texts in Old Russian language
|
7 |
+
- Use microsoft/trocr-small-printed as base model for fine-tune.
|
8 |
- Fine-tune on 636k text images
|
9 |
|
10 |
## Usage
|
|
|
15 |
|
16 |
hf_model = VisionEncoderDecoderModel.from_pretrained("Serovvans/trocr-old-russian")
|
17 |
|
18 |
+
image = Image.open("./path/to/yout/image")
|
19 |
|
20 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
|
21 |
pixel_values = processor(images=image, return_tensors="pt").pixel_values
|