Update README.md
Browse files
README.md
CHANGED
@@ -11,9 +11,9 @@ language:
|
|
11 |
|
12 |
|
13 |
## Model Details
|
14 |
-
|
15 |
-
ํ๊ตญ์ด + latex ๋ฐ์ดํฐ์
์ผ๋ก finetuning ํ์ต๋๋ค.
|
16 |
-
|
17 |
## Uses
|
18 |
|
19 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
@@ -28,11 +28,11 @@ import torch
|
|
28 |
import IPython.display as ipd
|
29 |
|
30 |
## ์ด๋ฏธ์ง ์ค๋น
|
31 |
-
img_path_list = sorted(glob.glob('
|
32 |
img_list = [Image.open(img_path).convert("RGB") for img_path in img_path_list]
|
33 |
|
34 |
## ๋ชจ๋ธ ๋ฐ ํ๋ก์ธ์ ์ค๋น
|
35 |
-
model_path = '
|
36 |
processor = TrOCRProcessor.from_pretrained(model_path)
|
37 |
model = VisionEncoderDecoderModel.from_pretrained(model_path)
|
38 |
model.eval()
|
@@ -60,3 +60,5 @@ for img,text in zip(img_list, generated_text):
|
|
60 |
print(text)
|
61 |
|
62 |
```
|
|
|
|
|
|
11 |
|
12 |
|
13 |
## Model Details
|
14 |
+
์ค ๋จ์๋ก ์์์ด ํฌํจ๋ ๊ธ์๋ฅผ ์ธ์ ๋ชจ๋ธ์
๋๋ค.
|
15 |
+
ํ๊ตญ์ด + latex ๋ฐ์ดํฐ์
์ผ๋ก finetuning ํ์ต๋๋ค.
|
16 |
+
์ค ๋จ์๋ก ์ด๋ฏธ์ง๋ฅผ cropํ๋ ๋ณ๋์ detector๊ฐ ํ์ํฉ๋๋ค.
|
17 |
## Uses
|
18 |
|
19 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
|
|
28 |
import IPython.display as ipd
|
29 |
|
30 |
## ์ด๋ฏธ์ง ์ค๋น
|
31 |
+
img_path_list = sorted(glob.glob('mathematical_expression_2-*.png'))
|
32 |
img_list = [Image.open(img_path).convert("RGB") for img_path in img_path_list]
|
33 |
|
34 |
## ๋ชจ๋ธ ๋ฐ ํ๋ก์ธ์ ์ค๋น
|
35 |
+
model_path = 'TeamUNIVA/23MATHQ_TrOCR-large'
|
36 |
processor = TrOCRProcessor.from_pretrained(model_path)
|
37 |
model = VisionEncoderDecoderModel.from_pretrained(model_path)
|
38 |
model.eval()
|
|
|
60 |
print(text)
|
61 |
|
62 |
```
|
63 |
+
### Result example
|
64 |
+
<img src="./result.png" alt="Result" width="1200"/>
|