fixes for paddle ocr
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,4 +2,4 @@ weights/icon_caption_blip2
|
|||||||
weights/icon_caption_florence
|
weights/icon_caption_florence
|
||||||
weights/icon_detect/
|
weights/icon_detect/
|
||||||
.gradio
|
.gradio
|
||||||
__pycache__
|
__pycache__/
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
249
demo.ipynb
249
demo.ipynb
File diff suppressed because one or more lines are too long
@@ -90,7 +90,7 @@ with gr.Blocks() as demo:
|
|||||||
iou_threshold_component = gr.Slider(
|
iou_threshold_component = gr.Slider(
|
||||||
label='IOU Threshold', minimum=0.01, maximum=1.0, step=0.01, value=0.1)
|
label='IOU Threshold', minimum=0.01, maximum=1.0, step=0.01, value=0.1)
|
||||||
use_paddleocr_component = gr.Checkbox(
|
use_paddleocr_component = gr.Checkbox(
|
||||||
label='Use PaddleOCR', default=True)
|
label='Use PaddleOCR', value=True)
|
||||||
submit_button_component = gr.Button(
|
submit_button_component = gr.Button(
|
||||||
value='Submit', variant='primary')
|
value='Submit', variant='primary')
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 341 KiB After Width: | Height: | Size: 219 KiB |
2
utils.py
2
utils.py
@@ -411,7 +411,7 @@ def check_ocr_box(image_path, display_img = True, output_bb_format='xywh', goal_
|
|||||||
elif output_bb_format == 'xyxy':
|
elif output_bb_format == 'xyxy':
|
||||||
bb = [get_xyxy(item) for item in coord]
|
bb = [get_xyxy(item) for item in coord]
|
||||||
# print('bounding box!!!', bb)
|
# print('bounding box!!!', bb)
|
||||||
return (text, bb), is_goal_filtered
|
return (text, bb), goal_filtering
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user