How to use PaddlePaddle/PP-DocLayoutV3 with PaddleOCR:
# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle # 2. pip install paddleocr from paddleocr import LayoutDetection model = LayoutDetection(model_name="PP-DocLayoutV3") output = model.predict(input="path/to/image.png", batch_size=1) for res in output: res.print() res.save_to_img(save_path="./output/") res.save_to_json(save_path="./output/res.json")
What does the last dimension of the output represent?
The final output is a mask of the target area (coordinates of the pixels), which can be post-processed to convert the mask into a rectangle, quadrilateral, or polygon.
· Sign up or log in to comment