Update README.md
Browse files
README.md
CHANGED
@@ -34,22 +34,22 @@ model = model.eval().cuda()
|
|
34 |
image_file = 'xxx.jpg'
|
35 |
|
36 |
# plain texts OCR
|
37 |
-
model.chat(tokenizer, image_file, ocr_type='ocr')
|
38 |
|
39 |
# format texts OCR:
|
40 |
# model.chat(tokenizer, image_file, ocr_type='format')
|
41 |
|
42 |
# fine-grained OCR:
|
43 |
-
# model.chat(tokenizer, image_file, ocr_type='ocr', ocr_box='')
|
44 |
-
# model.chat(tokenizer, image_file, ocr_type='format', ocr_box='')
|
45 |
-
# model.chat(tokenizer, image_file, ocr_type='ocr', ocr_color='')
|
46 |
-
# model.chat(tokenizer, image_file, ocr_type='format', ocr_color='')
|
47 |
|
48 |
# multi-crop OCR:
|
49 |
# res = model.chat_crop(tokenizer, image_file = image_file)
|
50 |
|
51 |
# render the formatted OCR results:
|
52 |
-
# model.chat(tokenizer, image_file, ocr_type='format', ocr_box='', ocr_color='', render=True, save_render_file = './demo.html')
|
53 |
|
54 |
print(res)
|
55 |
|
|
|
34 |
image_file = 'xxx.jpg'
|
35 |
|
36 |
# plain texts OCR
|
37 |
+
res = model.chat(tokenizer, image_file, ocr_type='ocr')
|
38 |
|
39 |
# format texts OCR:
|
40 |
# model.chat(tokenizer, image_file, ocr_type='format')
|
41 |
|
42 |
# fine-grained OCR:
|
43 |
+
# res = model.chat(tokenizer, image_file, ocr_type='ocr', ocr_box='')
|
44 |
+
# res = model.chat(tokenizer, image_file, ocr_type='format', ocr_box='')
|
45 |
+
# res = model.chat(tokenizer, image_file, ocr_type='ocr', ocr_color='')
|
46 |
+
# res = model.chat(tokenizer, image_file, ocr_type='format', ocr_color='')
|
47 |
|
48 |
# multi-crop OCR:
|
49 |
# res = model.chat_crop(tokenizer, image_file = image_file)
|
50 |
|
51 |
# render the formatted OCR results:
|
52 |
+
# res = model.chat(tokenizer, image_file, ocr_type='format', ocr_box='', ocr_color='', render=True, save_render_file = './demo.html')
|
53 |
|
54 |
print(res)
|
55 |
|