SGpirr commited on
Commit
c6ad0d9
โ€ข
1 Parent(s): 470d568

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -5
README.md CHANGED
@@ -11,9 +11,9 @@ language:
11
 
12
 
13
  ## Model Details
14
- line ๋‹จ์œ„๋กœ ์ˆ˜์‹์ด ํฌํ•จ๋œ ๊ธ€์ž๋ฅผ ์ธ์‹ ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.
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('images/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 = 'models/math_ocr'
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"/>