
* support image/webp file type Signed-off-by: Elwin <61868295+hzhaoy@users.noreply.github.com> Signed-off-by: Elwin <hzywong@gmail.com> * docs: add webp image format in supported_formats.md Signed-off-by: Elwin <61868295+hzhaoy@users.noreply.github.com> Signed-off-by: Elwin <hzywong@gmail.com> * test: add a test case for `image/webp` file Signed-off-by: Elwin <hzywong@gmail.com> * style: apply styling Signed-off-by: Elwin <hzywong@gmail.com> * test: update test case of converting `image/webp` file with more ocr engines Signed-off-by: Elwin <hzywong@gmail.com> * style: apply styling Signed-off-by: Elwin <hzywong@gmail.com> * rename test file Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> --------- Signed-off-by: Elwin <61868295+hzhaoy@users.noreply.github.com> Signed-off-by: Elwin <hzywong@gmail.com> Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
1 line
6.7 KiB
JSON
1 line
6.7 KiB
JSON
[{"page_no": 0, "size": {"width": 595.201171875, "height": 841.9216918945312}, "cells": [{"index": 0, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 71.33333333333333, "r_y0": 99.33333333333333, "r_x1": 506.6666666666667, "r_y1": 99.33333333333333, "r_x2": 506.6666666666667, "r_y2": 74.66666666666667, "r_x3": 71.33333333333333, "r_y3": 74.66666666666667, "coord_origin": "TOPLEFT"}, "text": "Docling bundles PDF document conversion to", "orig": "Docling bundles PDF document conversion to", "text_direction": "left_to_right", "confidence": 0.9555703127793324, "from_ocr": true}, {"index": 1, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 69.0, "r_y0": 126.66666666666667, "r_x1": 506.6666666666667, "r_y1": 126.66666666666667, "r_x2": 506.6666666666667, "r_y2": 100.66666666666667, "r_x3": 69.0, "r_y3": 100.66666666666667, "coord_origin": "TOPLEFT"}, "text": "JSON and Markdown in an easy self contained", "orig": "JSON and Markdown in an easy self contained", "text_direction": "left_to_right", "confidence": 0.9741098171752292, "from_ocr": true}, {"index": 2, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 70.66666666666667, "r_y0": 153.33333333333334, "r_x1": 154.0, "r_y1": 153.33333333333334, "r_x2": 154.0, "r_y2": 128.66666666666666, "r_x3": 70.66666666666667, "r_y3": 128.66666666666666, "coord_origin": "TOPLEFT"}, "text": "package", "orig": "package", "text_direction": "left_to_right", "confidence": 0.6702765056141881, "from_ocr": true}], "parsed_page": null, "predictions": {"layout": {"clusters": [{"id": 0, "label": "text", "bbox": {"l": 69.0, "t": 74.66666666666667, "r": 506.6666666666667, "b": 153.33333333333334, "coord_origin": "TOPLEFT"}, "confidence": 0.9715733528137207, "cells": [{"index": 0, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 71.33333333333333, "r_y0": 99.33333333333333, "r_x1": 506.6666666666667, "r_y1": 99.33333333333333, "r_x2": 506.6666666666667, "r_y2": 74.66666666666667, "r_x3": 71.33333333333333, "r_y3": 74.66666666666667, "coord_origin": "TOPLEFT"}, "text": "Docling bundles PDF document conversion to", "orig": "Docling bundles PDF document conversion to", "text_direction": "left_to_right", "confidence": 0.9555703127793324, "from_ocr": true}, {"index": 1, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 69.0, "r_y0": 126.66666666666667, "r_x1": 506.6666666666667, "r_y1": 126.66666666666667, "r_x2": 506.6666666666667, "r_y2": 100.66666666666667, "r_x3": 69.0, "r_y3": 100.66666666666667, "coord_origin": "TOPLEFT"}, "text": "JSON and Markdown in an easy self contained", "orig": "JSON and Markdown in an easy self contained", "text_direction": "left_to_right", "confidence": 0.9741098171752292, "from_ocr": true}, {"index": 2, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 70.66666666666667, "r_y0": 153.33333333333334, "r_x1": 154.0, "r_y1": 153.33333333333334, "r_x2": 154.0, "r_y2": 128.66666666666666, "r_x3": 70.66666666666667, "r_y3": 128.66666666666666, "coord_origin": "TOPLEFT"}, "text": "package", "orig": "package", "text_direction": "left_to_right", "confidence": 0.6702765056141881, "from_ocr": true}], "children": []}]}, "tablestructure": {"table_map": {}}, "figures_classification": null, "equations_prediction": null, "vlm_response": null}, "assembled": {"elements": [{"label": "text", "id": 0, "page_no": 0, "cluster": {"id": 0, "label": "text", "bbox": {"l": 69.0, "t": 74.66666666666667, "r": 506.6666666666667, "b": 153.33333333333334, "coord_origin": "TOPLEFT"}, "confidence": 0.9715733528137207, "cells": [{"index": 0, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 71.33333333333333, "r_y0": 99.33333333333333, "r_x1": 506.6666666666667, "r_y1": 99.33333333333333, "r_x2": 506.6666666666667, "r_y2": 74.66666666666667, "r_x3": 71.33333333333333, "r_y3": 74.66666666666667, "coord_origin": "TOPLEFT"}, "text": "Docling bundles PDF document conversion to", "orig": "Docling bundles PDF document conversion to", "text_direction": "left_to_right", "confidence": 0.9555703127793324, "from_ocr": true}, {"index": 1, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 69.0, "r_y0": 126.66666666666667, "r_x1": 506.6666666666667, "r_y1": 126.66666666666667, "r_x2": 506.6666666666667, "r_y2": 100.66666666666667, "r_x3": 69.0, "r_y3": 100.66666666666667, "coord_origin": "TOPLEFT"}, "text": "JSON and Markdown in an easy self contained", "orig": "JSON and Markdown in an easy self contained", "text_direction": "left_to_right", "confidence": 0.9741098171752292, "from_ocr": true}, {"index": 2, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 70.66666666666667, "r_y0": 153.33333333333334, "r_x1": 154.0, "r_y1": 153.33333333333334, "r_x2": 154.0, "r_y2": 128.66666666666666, "r_x3": 70.66666666666667, "r_y3": 128.66666666666666, "coord_origin": "TOPLEFT"}, "text": "package", "orig": "package", "text_direction": "left_to_right", "confidence": 0.6702765056141881, "from_ocr": true}], "children": []}, "text": "Docling bundles PDF document conversion to JSON and Markdown in an easy self contained package"}], "body": [{"label": "text", "id": 0, "page_no": 0, "cluster": {"id": 0, "label": "text", "bbox": {"l": 69.0, "t": 74.66666666666667, "r": 506.6666666666667, "b": 153.33333333333334, "coord_origin": "TOPLEFT"}, "confidence": 0.9715733528137207, "cells": [{"index": 0, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 71.33333333333333, "r_y0": 99.33333333333333, "r_x1": 506.6666666666667, "r_y1": 99.33333333333333, "r_x2": 506.6666666666667, "r_y2": 74.66666666666667, "r_x3": 71.33333333333333, "r_y3": 74.66666666666667, "coord_origin": "TOPLEFT"}, "text": "Docling bundles PDF document conversion to", "orig": "Docling bundles PDF document conversion to", "text_direction": "left_to_right", "confidence": 0.9555703127793324, "from_ocr": true}, {"index": 1, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 69.0, "r_y0": 126.66666666666667, "r_x1": 506.6666666666667, "r_y1": 126.66666666666667, "r_x2": 506.6666666666667, "r_y2": 100.66666666666667, "r_x3": 69.0, "r_y3": 100.66666666666667, "coord_origin": "TOPLEFT"}, "text": "JSON and Markdown in an easy self contained", "orig": "JSON and Markdown in an easy self contained", "text_direction": "left_to_right", "confidence": 0.9741098171752292, "from_ocr": true}, {"index": 2, "rgba": {"r": 0, "g": 0, "b": 0, "a": 255}, "rect": {"r_x0": 70.66666666666667, "r_y0": 153.33333333333334, "r_x1": 154.0, "r_y1": 153.33333333333334, "r_x2": 154.0, "r_y2": 128.66666666666666, "r_x3": 70.66666666666667, "r_y3": 128.66666666666666, "coord_origin": "TOPLEFT"}, "text": "package", "orig": "package", "text_direction": "left_to_right", "confidence": 0.6702765056141881, "from_ocr": true}], "children": []}, "text": "Docling bundles PDF document conversion to JSON and Markdown in an easy self contained package"}], "headers": []}}] |