Skip to content
Discussion options

You must be logged in to vote

This looks good.

Try this code.

import os
import cv2
from paddleocr import PPStructure,draw_structure_result,save_structure_res
from PIL import Image

table_engine = PPStructure(show_log=True, image_orientation=True, lang="en")

save_folder = './output'
img_path = '338506733-1399c041-a326-41b9-83a8-60d7200a1958.png'
img = cv2.imread(img_path)
result = table_engine(img)
save_structure_res(result, save_folder,os.path.basename(img_path).split('.')[0])

for line in result:
    line.pop('img')
    print(line)


font_path = 'doc/fonts/simfang.ttf' # PaddleOCR下提供字体包
image = Image.open(img_path).convert('RGB')
im_show = draw_structure_result(image, result,font_path=font_path)
im_show = Image.fro…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@adnanshafi99
Comment options

Comment options

You must be logged in to vote
5 replies
@adnanshafi99
Comment options

@GreatV
Comment options

Answer selected by adnanshafi99
@adnanshafi99
Comment options

@adnanshafi99
Comment options

@GreatV
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants