Преглед на файлове

Add image and markdown documentation for coordinate system explanation and conversion

- Introduced a new image file for the 2023 annual report.
- Added a markdown file detailing the coordinate system used in image processing, including JSON data structure and examples.
- Explained the differences between image coordinate systems and Plotly's coordinate system.
- Provided a Python code snippet for converting coordinates from image to Plotly format.
- Included suggestions for fixing coordinate conversion inconsistencies in existing code.
zhch158_admin преди 2 месеца
родител
ревизия
1f11c256ba

+ 2050 - 0
image/图片操作说明/2023年度报告母公司_page_001.json

@@ -0,0 +1,2050 @@
+{
+    "input_path": "/home/ubuntu/zhch/PaddleX/zhch/data_PPStructureV3_Results/2023年度报告母公司/2023年度报告母公司_page_001.png",
+    "page_index": null,
+    "model_settings": {
+        "use_doc_preprocessor": true,
+        "use_seal_recognition": true,
+        "use_table_recognition": true,
+        "use_formula_recognition": false,
+        "use_chart_recognition": true,
+        "use_region_detection": true
+    },
+    "parsing_res_list": [
+        {
+            "block_label": "header",
+            "block_content": "广东荣德会计师事务所有限公司惠州市惠阳区淡水镇演达一路荣德楼",
+            "block_bbox": [
+                175,
+                157,
+                594,
+                219
+            ]
+        },
+        {
+            "block_label": "header",
+            "block_content": "电话:0752-33723373391981电话:0752-3382338",
+            "block_bbox": [
+                935,
+                158,
+                1295,
+                218
+            ]
+        },
+        {
+            "block_label": "doc_title",
+            "block_content": "审计报告",
+            "block_bbox": [
+                627,
+                263,
+                976,
+                325
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "广荣会表审字[2024]0157号",
+            "block_bbox": [
+                1105,
+                379,
+                1422,
+                407
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "至远彩色印刷工业(惠州)有限公司:",
+            "block_bbox": [
+                173,
+                419,
+                698,
+                450
+            ]
+        },
+        {
+            "block_label": "paragraph_title",
+            "block_content": "一、审计意见",
+            "block_bbox": [
+                225,
+                505,
+                420,
+                536
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "我们审计了至远彩色印刷工业(惠州)有限公司(以下简称“贵公司”)财务报表,包括2023年12月31日资产负债表,2023年度的利润表、现金流量表和股东权益变动表以及财务报表附注。\n",
+            "block_bbox": [
+                169,
+                569,
+                1420,
+                717
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "我们认为,后附的财务报表在所有重大方面按照《企业会计准则》的规定编制,公允反映了贵公司2023年12月31日的财务状况以及2023年度的经营成果和现金流量。",
+            "block_bbox": [
+                169,
+                752,
+                1419,
+                848
+            ]
+        },
+        {
+            "block_label": "paragraph_title",
+            "block_content": "二、形成审计意见的基础",
+            "block_bbox": [
+                222,
+                902,
+                578,
+                935
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "我们按照中国注册会计师审计准则的规定执行了审计工作。审计报告的“注册会计师对财务报表审计的责任”部分进一步阐述了我们在这些准则下的责任。按照中国注册会计师职业道德守则,我们独立于贵公司,并履行了职业道德方面的其他责任。我们相信,我们获取的审计证据是充分、适当的,为发表审计意见提供了基础。",
+            "block_bbox": [
+                165,
+                967,
+                1417,
+                1176
+            ]
+        },
+        {
+            "block_label": "paragraph_title",
+            "block_content": "三、管理层和治理层对财务报表的责任",
+            "block_bbox": [
+                218,
+                1232,
+                765,
+                1265
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "管理层负责按照企业会计准则的规定编制财务报表,使其实现公允反映,并设计、执行和维护必要的内部控制,以使财务报表不存在由于舞或错误导致的重大错报。",
+            "block_bbox": [
+                164,
+                1297,
+                1413,
+                1384
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "在编制财务报表时,管理层负责评估贵公司的持续经营能力,披露与持续经营相关的事项(如适用),并运用持续经营假设,除非管理层计划清算贵公司、终止运营或别无其他现实的选择。\n",
+            "block_bbox": [
+                163,
+                1420,
+                1410,
+                1565
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "治理层负责监督贵公司的财务报告过程。",
+            "block_bbox": [
+                223,
+                1602,
+                775,
+                1633
+            ]
+        },
+        {
+            "block_label": "paragraph_title",
+            "block_content": "四、注册会计师对财务报表审计的责任",
+            "block_bbox": [
+                215,
+                1693,
+                759,
+                1726
+            ]
+        },
+        {
+            "block_label": "text",
+            "block_content": "我们的目标是对财务报表整体是否不存在由于舞或错误导致的重大错报获取合理保证,并出具包含审计意见的审计报告。合理保证是高水平的保证,但并不能保证按照审计准则执行的审计在某一重大错报存在时总能发现。错报可能由于舞或错误导致,如果合理预期错报单独或汇总起来可能影响财务报表使用者依据财务报表作出的经济决策,则通常认为错报是重大的。\n",
+            "block_bbox": [
+                157,
+                1760,
+                1404,
+                2049
+            ]
+        },
+        {
+            "block_label": "footer",
+            "block_content": "此码用于证明该审计报告是否由具有执业许可的会计师事务所出具,您可使用手机“扫一扫”或进入“注册会计师行业统一监管平台(http://acc.mof.gov.cn)”进行查验。报告编码:粤24118H3GA6",
+            "block_bbox": [
+                527,
+                2235,
+                1411,
+                2297
+            ]
+        },
+        {
+            "block_label": "footer",
+            "block_content": "ybjieshou@eastmoney.com ",
+            "block_bbox": [
+                1427,
+                2151,
+                1570,
+                2299
+            ]
+        }
+    ],
+    "doc_preprocessor_res": {
+        "input_path": null,
+        "page_index": null,
+        "model_settings": {
+            "use_doc_orientation_classify": true,
+            "use_doc_unwarping": false
+        },
+        "angle": 0
+    },
+    "layout_det_res": {
+        "input_path": null,
+        "page_index": null,
+        "boxes": [
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9854853749275208,
+                "coordinate": [
+                    157.0225830078125,
+                    1760.874267578125,
+                    1404.6329345703125,
+                    2049.666259765625
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9849415421485901,
+                "coordinate": [
+                    165.9532470703125,
+                    967.223876953125,
+                    1417.3851318359375,
+                    1176.424560546875
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9796814918518066,
+                "coordinate": [
+                    163.0367431640625,
+                    1420.05322265625,
+                    1410.6256103515625,
+                    1565.21044921875
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9776260256767273,
+                "coordinate": [
+                    169.45758056640625,
+                    569.5971069335938,
+                    1420.624755859375,
+                    717.4202270507812
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9674015641212463,
+                "coordinate": [
+                    169.463134765625,
+                    752.9403076171875,
+                    1419.13427734375,
+                    848.222900390625
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9653800129890442,
+                "coordinate": [
+                    164.93402099609375,
+                    1297.97607421875,
+                    1413.39697265625,
+                    1384.205078125
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9232245087623596,
+                "coordinate": [
+                    223.57229614257812,
+                    1602.238525390625,
+                    775.028076171875,
+                    1633.28076171875
+                ]
+            },
+            {
+                "cls_id": 0,
+                "label": "paragraph_title",
+                "score": 0.919783353805542,
+                "coordinate": [
+                    218.24722290039062,
+                    1232.21728515625,
+                    765.482177734375,
+                    1265.45458984375
+                ]
+            },
+            {
+                "cls_id": 0,
+                "label": "paragraph_title",
+                "score": 0.919209361076355,
+                "coordinate": [
+                    215.39410400390625,
+                    1693.614501953125,
+                    759.4187622070312,
+                    1726.05322265625
+                ]
+            },
+            {
+                "cls_id": 0,
+                "label": "paragraph_title",
+                "score": 0.9153098464012146,
+                "coordinate": [
+                    222.89688110351562,
+                    902.9310302734375,
+                    578.044677734375,
+                    935.5491943359375
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.9126426577568054,
+                "coordinate": [
+                    173.28369140625,
+                    419.8507995605469,
+                    698.380859375,
+                    450.7749328613281
+                ]
+            },
+            {
+                "cls_id": 0,
+                "label": "paragraph_title",
+                "score": 0.9075404405593872,
+                "coordinate": [
+                    225.34796142578125,
+                    505.4834899902344,
+                    420.50927734375,
+                    536.9627685546875
+                ]
+            },
+            {
+                "cls_id": 2,
+                "label": "text",
+                "score": 0.8888689279556274,
+                "coordinate": [
+                    1105.6915283203125,
+                    379.9375,
+                    1422.2720947265625,
+                    407.506591796875
+                ]
+            },
+            {
+                "cls_id": 14,
+                "label": "footer",
+                "score": 0.8656627535820007,
+                "coordinate": [
+                    1427.9248046875,
+                    2151.68359375,
+                    1570.37255859375,
+                    2299.5205078125
+                ]
+            },
+            {
+                "cls_id": 12,
+                "label": "header",
+                "score": 0.834988534450531,
+                "coordinate": [
+                    175.58151245117188,
+                    157.24160766601562,
+                    594.13720703125,
+                    219.04254150390625
+                ]
+            },
+            {
+                "cls_id": 10,
+                "label": "doc_title",
+                "score": 0.7551152110099792,
+                "coordinate": [
+                    627.9777221679688,
+                    263.40283203125,
+                    976.3991088867188,
+                    325.003173828125
+                ]
+            },
+            {
+                "cls_id": 14,
+                "label": "footer",
+                "score": 0.7287880182266235,
+                "coordinate": [
+                    527.7110595703125,
+                    2235.488525390625,
+                    1411.825439453125,
+                    2297.465087890625
+                ]
+            },
+            {
+                "cls_id": 12,
+                "label": "header",
+                "score": 0.6661418080329895,
+                "coordinate": [
+                    935.5953979492188,
+                    158.8866729736328,
+                    1295.409912109375,
+                    218.90052795410156
+                ]
+            },
+            {
+                "cls_id": 12,
+                "label": "header",
+                "score": 0.5161857008934021,
+                "coordinate": [
+                    936.289306640625,
+                    158.5773162841797,
+                    1294.767822265625,
+                    183.6266632080078
+                ]
+            }
+        ]
+    },
+    "overall_ocr_res": {
+        "input_path": null,
+        "page_index": null,
+        "model_settings": {
+            "use_doc_preprocessor": false,
+            "use_textline_orientation": true
+        },
+        "dt_polys": [
+            [
+                [
+                    180,
+                    156
+                ],
+                [
+                    542,
+                    157
+                ],
+                [
+                    542,
+                    185
+                ],
+                [
+                    180,
+                    184
+                ]
+            ],
+            [
+                [
+                    939,
+                    159
+                ],
+                [
+                    1167,
+                    159
+                ],
+                [
+                    1167,
+                    186
+                ],
+                [
+                    939,
+                    186
+                ]
+            ],
+            [
+                [
+                    1199,
+                    156
+                ],
+                [
+                    1300,
+                    158
+                ],
+                [
+                    1300,
+                    190
+                ],
+                [
+                    1199,
+                    188
+                ]
+            ],
+            [
+                [
+                    179,
+                    192
+                ],
+                [
+                    595,
+                    192
+                ],
+                [
+                    595,
+                    219
+                ],
+                [
+                    179,
+                    219
+                ]
+            ],
+            [
+                [
+                    937,
+                    192
+                ],
+                [
+                    1167,
+                    192
+                ],
+                [
+                    1167,
+                    222
+                ],
+                [
+                    937,
+                    222
+                ]
+            ],
+            [
+                [
+                    629,
+                    260
+                ],
+                [
+                    979,
+                    260
+                ],
+                [
+                    979,
+                    333
+                ],
+                [
+                    629,
+                    333
+                ]
+            ],
+            [
+                [
+                    1108,
+                    379
+                ],
+                [
+                    1423,
+                    379
+                ],
+                [
+                    1423,
+                    410
+                ],
+                [
+                    1108,
+                    410
+                ]
+            ],
+            [
+                [
+                    178,
+                    418
+                ],
+                [
+                    697,
+                    420
+                ],
+                [
+                    697,
+                    453
+                ],
+                [
+                    178,
+                    451
+                ]
+            ],
+            [
+                [
+                    231,
+                    503
+                ],
+                [
+                    421,
+                    503
+                ],
+                [
+                    421,
+                    541
+                ],
+                [
+                    231,
+                    541
+                ]
+            ],
+            [
+                [
+                    241,
+                    570
+                ],
+                [
+                    1404,
+                    573
+                ],
+                [
+                    1403,
+                    604
+                ],
+                [
+                    241,
+                    601
+                ]
+            ],
+            [
+                [
+                    179,
+                    628
+                ],
+                [
+                    1419,
+                    632
+                ],
+                [
+                    1419,
+                    663
+                ],
+                [
+                    179,
+                    659
+                ]
+            ],
+            [
+                [
+                    176,
+                    686
+                ],
+                [
+                    376,
+                    686
+                ],
+                [
+                    376,
+                    721
+                ],
+                [
+                    176,
+                    721
+                ]
+            ],
+            [
+                [
+                    238,
+                    752
+                ],
+                [
+                    1418,
+                    754
+                ],
+                [
+                    1418,
+                    788
+                ],
+                [
+                    238,
+                    786
+                ]
+            ],
+            [
+                [
+                    177,
+                    818
+                ],
+                [
+                    1255,
+                    820
+                ],
+                [
+                    1255,
+                    851
+                ],
+                [
+                    177,
+                    849
+                ]
+            ],
+            [
+                [
+                    229,
+                    905
+                ],
+                [
+                    574,
+                    904
+                ],
+                [
+                    575,
+                    936
+                ],
+                [
+                    229,
+                    937
+                ]
+            ],
+            [
+                [
+                    237,
+                    967
+                ],
+                [
+                    1415,
+                    970
+                ],
+                [
+                    1415,
+                    1003
+                ],
+                [
+                    237,
+                    1000
+                ]
+            ],
+            [
+                [
+                    174,
+                    1027
+                ],
+                [
+                    1414,
+                    1031
+                ],
+                [
+                    1414,
+                    1062
+                ],
+                [
+                    174,
+                    1058
+                ]
+            ],
+            [
+                [
+                    174,
+                    1085
+                ],
+                [
+                    1415,
+                    1089
+                ],
+                [
+                    1415,
+                    1122
+                ],
+                [
+                    174,
+                    1118
+                ]
+            ],
+            [
+                [
+                    172,
+                    1145
+                ],
+                [
+                    1062,
+                    1146
+                ],
+                [
+                    1062,
+                    1180
+                ],
+                [
+                    172,
+                    1179
+                ]
+            ],
+            [
+                [
+                    225,
+                    1234
+                ],
+                [
+                    762,
+                    1234
+                ],
+                [
+                    762,
+                    1267
+                ],
+                [
+                    225,
+                    1267
+                ]
+            ],
+            [
+                [
+                    234,
+                    1296
+                ],
+                [
+                    1411,
+                    1299
+                ],
+                [
+                    1411,
+                    1333
+                ],
+                [
+                    234,
+                    1330
+                ]
+            ],
+            [
+                [
+                    171,
+                    1352
+                ],
+                [
+                    1280,
+                    1355
+                ],
+                [
+                    1280,
+                    1388
+                ],
+                [
+                    171,
+                    1385
+                ]
+            ],
+            [
+                [
+                    231,
+                    1418
+                ],
+                [
+                    1410,
+                    1422
+                ],
+                [
+                    1409,
+                    1456
+                ],
+                [
+                    231,
+                    1452
+                ]
+            ],
+            [
+                [
+                    168,
+                    1475
+                ],
+                [
+                    1410,
+                    1481
+                ],
+                [
+                    1409,
+                    1515
+                ],
+                [
+                    168,
+                    1509
+                ]
+            ],
+            [
+                [
+                    168,
+                    1534
+                ],
+                [
+                    366,
+                    1534
+                ],
+                [
+                    366,
+                    1569
+                ],
+                [
+                    168,
+                    1569
+                ]
+            ],
+            [
+                [
+                    229,
+                    1602
+                ],
+                [
+                    775,
+                    1602
+                ],
+                [
+                    775,
+                    1636
+                ],
+                [
+                    229,
+                    1636
+                ]
+            ],
+            [
+                [
+                    220,
+                    1693
+                ],
+                [
+                    755,
+                    1694
+                ],
+                [
+                    755,
+                    1728
+                ],
+                [
+                    220,
+                    1727
+                ]
+            ],
+            [
+                [
+                    227,
+                    1759
+                ],
+                [
+                    1406,
+                    1765
+                ],
+                [
+                    1405,
+                    1798
+                ],
+                [
+                    227,
+                    1792
+                ]
+            ],
+            [
+                [
+                    165,
+                    1824
+                ],
+                [
+                    1404,
+                    1829
+                ],
+                [
+                    1403,
+                    1863
+                ],
+                [
+                    165,
+                    1858
+                ]
+            ],
+            [
+                [
+                    164,
+                    1888
+                ],
+                [
+                    1404,
+                    1893
+                ],
+                [
+                    1403,
+                    1927
+                ],
+                [
+                    164,
+                    1922
+                ]
+            ],
+            [
+                [
+                    164,
+                    1952
+                ],
+                [
+                    1403,
+                    1957
+                ],
+                [
+                    1402,
+                    1991
+                ],
+                [
+                    164,
+                    1986
+                ]
+            ],
+            [
+                [
+                    164,
+                    2018
+                ],
+                [
+                    453,
+                    2018
+                ],
+                [
+                    453,
+                    2052
+                ],
+                [
+                    164,
+                    2052
+                ]
+            ],
+            [
+                [
+                    823,
+                    2234
+                ],
+                [
+                    1413,
+                    2240
+                ],
+                [
+                    1412,
+                    2263
+                ],
+                [
+                    823,
+                    2257
+                ]
+            ],
+            [
+                [
+                    531,
+                    2252
+                ],
+                [
+                    1413,
+                    2261
+                ],
+                [
+                    1412,
+                    2284
+                ],
+                [
+                    531,
+                    2275
+                ]
+            ],
+            [
+                [
+                    1192,
+                    2279
+                ],
+                [
+                    1403,
+                    2281
+                ],
+                [
+                    1402,
+                    2302
+                ],
+                [
+                    1192,
+                    2300
+                ]
+            ]
+        ],
+        "text_det_params": {
+            "limit_side_len": 736,
+            "limit_type": "min",
+            "thresh": 0.3,
+            "max_side_limit": 4000,
+            "box_thresh": 0.6,
+            "unclip_ratio": 1.5
+        },
+        "text_type": "general",
+        "textline_orientation_angles": [
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0,
+            0
+        ],
+        "text_rec_score_thresh": 0.0,
+        "return_word_box": false,
+        "rec_texts": [
+            "广东荣德会计师事务所有限公司",
+            "电话:0752-3372337",
+            "3391981",
+            "惠州市惠阳区淡水镇演达一路荣德楼",
+            "电话:0752-3382338",
+            "审计报告",
+            "广荣会表审字[2024]0157号",
+            "至远彩色印刷工业(惠州)有限公司:",
+            "一、审计意见",
+            "我们审计了至远彩色印刷工业(惠州)有限公司(以下简称“贵公司”)财务报表,",
+            "包括2023年12月31日资产负债表,2023年度的利润表、现金流量表和股东权益变动表以及",
+            "财务报表附注。",
+            "我们认为,后附的财务报表在所有重大方面按照《企业会计准则》的规定编制,公允",
+            "反映了贵公司2023年12月31日的财务状况以及2023年度的经营成果和现金流量。",
+            "二、形成审计意见的基础",
+            "我们按照中国注册会计师审计准则的规定执行了审计工作。审计报告的“注册会计师",
+            "对财务报表审计的责任”部分进一步阐述了我们在这些准则下的责任。按照中国注册会计",
+            "师职业道德守则,我们独立于贵公司,并履行了职业道德方面的其他责任。我们相信,我",
+            "们获取的审计证据是充分、适当的,为发表审计意见提供了基础。",
+            "三、管理层和治理层对财务报表的责任",
+            "管理层负责按照企业会计准则的规定编制财务报表,使其实现公允反映,并设计、执",
+            "行和维护必要的内部控制,以使财务报表不存在由于舞或错误导致的重大错报。",
+            "在编制财务报表时,管理层负责评估贵公司的持续经营能力,披露与持续经营相关的",
+            "事项(如适用),并运用持续经营假设,除非管理层计划清算贵公司、终止运营或别无其",
+            "他现实的选择。",
+            "治理层负责监督贵公司的财务报告过程。",
+            "四、注册会计师对财务报表审计的责任",
+            "我们的目标是对财务报表整体是否不存在由于舞或错误导致的重大错报获取合理保",
+            "证,并出具包含审计意见的审计报告。合理保证是高水平的保证,但并不能保证按照审计",
+            "准则执行的审计在某一重大错报存在时总能发现。错报可能由于舞或错误导致,如果合",
+            "理预期错报单独或汇总起来可能影响财务报表使用者依据财务报表作出的经济决策,则通",
+            "常认为错报是重大的。",
+            "此码用于证明该审计报告是否由具有执业许可的会计师事务所出具,",
+            "您可使用手机“扫一扫”或进入“注册会计师行业统一监管平台(http://acc.mof.gov.cn)”进行查验。",
+            "报告编码:粤24118H3GA6",
+            "ybjieshou@eastmoney.com"
+        ],
+        "rec_scores": [
+            0.9995833039283752,
+            0.9982249140739441,
+            0.999718964099884,
+            0.9970606565475464,
+            0.9981468915939331,
+            0.9998395442962646,
+            0.9734451174736023,
+            0.9970778226852417,
+            0.9973719716072083,
+            0.9943446516990662,
+            0.9992454648017883,
+            0.9996830224990845,
+            0.9978616237640381,
+            0.9989641904830933,
+            0.9989975094795227,
+            0.9977496266365051,
+            0.9966722130775452,
+            0.9985522627830505,
+            0.992033839225769,
+            0.9987771511077881,
+            0.9981499910354614,
+            0.999224841594696,
+            0.9987939596176147,
+            0.9993271231651306,
+            0.9918314218521118,
+            0.9966366291046143,
+            0.9991724491119385,
+            0.9988595247268677,
+            0.9993752837181091,
+            0.9989214539527893,
+            0.9996400475502014,
+            0.998834490776062,
+            0.9994836449623108,
+            0.9500953555107117,
+            0.9974786043167114,
+            0.8475341796875
+        ],
+        "rec_polys": [
+            [
+                [
+                    180,
+                    156
+                ],
+                [
+                    542,
+                    157
+                ],
+                [
+                    542,
+                    185
+                ],
+                [
+                    180,
+                    184
+                ]
+            ],
+            [
+                [
+                    939,
+                    159
+                ],
+                [
+                    1167,
+                    159
+                ],
+                [
+                    1167,
+                    186
+                ],
+                [
+                    939,
+                    186
+                ]
+            ],
+            [
+                [
+                    1199,
+                    156
+                ],
+                [
+                    1300,
+                    158
+                ],
+                [
+                    1300,
+                    190
+                ],
+                [
+                    1199,
+                    188
+                ]
+            ],
+            [
+                [
+                    179,
+                    192
+                ],
+                [
+                    595,
+                    192
+                ],
+                [
+                    595,
+                    219
+                ],
+                [
+                    179,
+                    219
+                ]
+            ],
+            [
+                [
+                    937,
+                    192
+                ],
+                [
+                    1167,
+                    192
+                ],
+                [
+                    1167,
+                    222
+                ],
+                [
+                    937,
+                    222
+                ]
+            ],
+            [
+                [
+                    629,
+                    260
+                ],
+                [
+                    979,
+                    260
+                ],
+                [
+                    979,
+                    333
+                ],
+                [
+                    629,
+                    333
+                ]
+            ],
+            [
+                [
+                    1108,
+                    379
+                ],
+                [
+                    1423,
+                    379
+                ],
+                [
+                    1423,
+                    410
+                ],
+                [
+                    1108,
+                    410
+                ]
+            ],
+            [
+                [
+                    178,
+                    418
+                ],
+                [
+                    697,
+                    420
+                ],
+                [
+                    697,
+                    453
+                ],
+                [
+                    178,
+                    451
+                ]
+            ],
+            [
+                [
+                    231,
+                    503
+                ],
+                [
+                    421,
+                    503
+                ],
+                [
+                    421,
+                    541
+                ],
+                [
+                    231,
+                    541
+                ]
+            ],
+            [
+                [
+                    241,
+                    570
+                ],
+                [
+                    1404,
+                    573
+                ],
+                [
+                    1403,
+                    604
+                ],
+                [
+                    241,
+                    601
+                ]
+            ],
+            [
+                [
+                    179,
+                    628
+                ],
+                [
+                    1419,
+                    632
+                ],
+                [
+                    1419,
+                    663
+                ],
+                [
+                    179,
+                    659
+                ]
+            ],
+            [
+                [
+                    176,
+                    686
+                ],
+                [
+                    376,
+                    686
+                ],
+                [
+                    376,
+                    721
+                ],
+                [
+                    176,
+                    721
+                ]
+            ],
+            [
+                [
+                    238,
+                    752
+                ],
+                [
+                    1418,
+                    754
+                ],
+                [
+                    1418,
+                    788
+                ],
+                [
+                    238,
+                    786
+                ]
+            ],
+            [
+                [
+                    177,
+                    818
+                ],
+                [
+                    1255,
+                    820
+                ],
+                [
+                    1255,
+                    851
+                ],
+                [
+                    177,
+                    849
+                ]
+            ],
+            [
+                [
+                    229,
+                    905
+                ],
+                [
+                    574,
+                    904
+                ],
+                [
+                    575,
+                    936
+                ],
+                [
+                    229,
+                    937
+                ]
+            ],
+            [
+                [
+                    237,
+                    967
+                ],
+                [
+                    1415,
+                    970
+                ],
+                [
+                    1415,
+                    1003
+                ],
+                [
+                    237,
+                    1000
+                ]
+            ],
+            [
+                [
+                    174,
+                    1027
+                ],
+                [
+                    1414,
+                    1031
+                ],
+                [
+                    1414,
+                    1062
+                ],
+                [
+                    174,
+                    1058
+                ]
+            ],
+            [
+                [
+                    174,
+                    1085
+                ],
+                [
+                    1415,
+                    1089
+                ],
+                [
+                    1415,
+                    1122
+                ],
+                [
+                    174,
+                    1118
+                ]
+            ],
+            [
+                [
+                    172,
+                    1145
+                ],
+                [
+                    1062,
+                    1146
+                ],
+                [
+                    1062,
+                    1180
+                ],
+                [
+                    172,
+                    1179
+                ]
+            ],
+            [
+                [
+                    225,
+                    1234
+                ],
+                [
+                    762,
+                    1234
+                ],
+                [
+                    762,
+                    1267
+                ],
+                [
+                    225,
+                    1267
+                ]
+            ],
+            [
+                [
+                    234,
+                    1296
+                ],
+                [
+                    1411,
+                    1299
+                ],
+                [
+                    1411,
+                    1333
+                ],
+                [
+                    234,
+                    1330
+                ]
+            ],
+            [
+                [
+                    171,
+                    1352
+                ],
+                [
+                    1280,
+                    1355
+                ],
+                [
+                    1280,
+                    1388
+                ],
+                [
+                    171,
+                    1385
+                ]
+            ],
+            [
+                [
+                    231,
+                    1418
+                ],
+                [
+                    1410,
+                    1422
+                ],
+                [
+                    1409,
+                    1456
+                ],
+                [
+                    231,
+                    1452
+                ]
+            ],
+            [
+                [
+                    168,
+                    1475
+                ],
+                [
+                    1410,
+                    1481
+                ],
+                [
+                    1409,
+                    1515
+                ],
+                [
+                    168,
+                    1509
+                ]
+            ],
+            [
+                [
+                    168,
+                    1534
+                ],
+                [
+                    366,
+                    1534
+                ],
+                [
+                    366,
+                    1569
+                ],
+                [
+                    168,
+                    1569
+                ]
+            ],
+            [
+                [
+                    229,
+                    1602
+                ],
+                [
+                    775,
+                    1602
+                ],
+                [
+                    775,
+                    1636
+                ],
+                [
+                    229,
+                    1636
+                ]
+            ],
+            [
+                [
+                    220,
+                    1693
+                ],
+                [
+                    755,
+                    1694
+                ],
+                [
+                    755,
+                    1728
+                ],
+                [
+                    220,
+                    1727
+                ]
+            ],
+            [
+                [
+                    227,
+                    1759
+                ],
+                [
+                    1406,
+                    1765
+                ],
+                [
+                    1405,
+                    1798
+                ],
+                [
+                    227,
+                    1792
+                ]
+            ],
+            [
+                [
+                    165,
+                    1824
+                ],
+                [
+                    1404,
+                    1829
+                ],
+                [
+                    1403,
+                    1863
+                ],
+                [
+                    165,
+                    1858
+                ]
+            ],
+            [
+                [
+                    164,
+                    1888
+                ],
+                [
+                    1404,
+                    1893
+                ],
+                [
+                    1403,
+                    1927
+                ],
+                [
+                    164,
+                    1922
+                ]
+            ],
+            [
+                [
+                    164,
+                    1952
+                ],
+                [
+                    1403,
+                    1957
+                ],
+                [
+                    1402,
+                    1991
+                ],
+                [
+                    164,
+                    1986
+                ]
+            ],
+            [
+                [
+                    164,
+                    2018
+                ],
+                [
+                    453,
+                    2018
+                ],
+                [
+                    453,
+                    2052
+                ],
+                [
+                    164,
+                    2052
+                ]
+            ],
+            [
+                [
+                    823,
+                    2234
+                ],
+                [
+                    1413,
+                    2240
+                ],
+                [
+                    1412,
+                    2263
+                ],
+                [
+                    823,
+                    2257
+                ]
+            ],
+            [
+                [
+                    531,
+                    2252
+                ],
+                [
+                    1413,
+                    2261
+                ],
+                [
+                    1412,
+                    2284
+                ],
+                [
+                    531,
+                    2275
+                ]
+            ],
+            [
+                [
+                    1192,
+                    2279
+                ],
+                [
+                    1403,
+                    2281
+                ],
+                [
+                    1402,
+                    2302
+                ],
+                [
+                    1192,
+                    2300
+                ]
+            ],
+            [
+                [
+                    1427,
+                    2151
+                ],
+                [
+                    1570,
+                    2151
+                ],
+                [
+                    1570,
+                    2299
+                ],
+                [
+                    1427,
+                    2299
+                ]
+            ]
+        ],
+        "rec_boxes": [
+            [
+                180.0,
+                156.0,
+                542.0,
+                185.0
+            ],
+            [
+                939.0,
+                159.0,
+                1167.0,
+                186.0
+            ],
+            [
+                1199.0,
+                156.0,
+                1300.0,
+                190.0
+            ],
+            [
+                179.0,
+                192.0,
+                595.0,
+                219.0
+            ],
+            [
+                937.0,
+                192.0,
+                1167.0,
+                222.0
+            ],
+            [
+                629.0,
+                260.0,
+                979.0,
+                333.0
+            ],
+            [
+                1108.0,
+                379.0,
+                1423.0,
+                410.0
+            ],
+            [
+                178.0,
+                418.0,
+                697.0,
+                453.0
+            ],
+            [
+                231.0,
+                503.0,
+                421.0,
+                541.0
+            ],
+            [
+                241.0,
+                570.0,
+                1404.0,
+                604.0
+            ],
+            [
+                179.0,
+                628.0,
+                1419.0,
+                663.0
+            ],
+            [
+                176.0,
+                686.0,
+                376.0,
+                721.0
+            ],
+            [
+                238.0,
+                752.0,
+                1418.0,
+                788.0
+            ],
+            [
+                177.0,
+                818.0,
+                1255.0,
+                851.0
+            ],
+            [
+                229.0,
+                904.0,
+                575.0,
+                937.0
+            ],
+            [
+                237.0,
+                967.0,
+                1415.0,
+                1003.0
+            ],
+            [
+                174.0,
+                1027.0,
+                1414.0,
+                1062.0
+            ],
+            [
+                174.0,
+                1085.0,
+                1415.0,
+                1122.0
+            ],
+            [
+                172.0,
+                1145.0,
+                1062.0,
+                1180.0
+            ],
+            [
+                225.0,
+                1234.0,
+                762.0,
+                1267.0
+            ],
+            [
+                234.0,
+                1296.0,
+                1411.0,
+                1333.0
+            ],
+            [
+                171.0,
+                1352.0,
+                1280.0,
+                1388.0
+            ],
+            [
+                231.0,
+                1418.0,
+                1410.0,
+                1456.0
+            ],
+            [
+                168.0,
+                1475.0,
+                1410.0,
+                1515.0
+            ],
+            [
+                168.0,
+                1534.0,
+                366.0,
+                1569.0
+            ],
+            [
+                229.0,
+                1602.0,
+                775.0,
+                1636.0
+            ],
+            [
+                220.0,
+                1693.0,
+                755.0,
+                1728.0
+            ],
+            [
+                227.0,
+                1759.0,
+                1406.0,
+                1798.0
+            ],
+            [
+                165.0,
+                1824.0,
+                1404.0,
+                1863.0
+            ],
+            [
+                164.0,
+                1888.0,
+                1404.0,
+                1927.0
+            ],
+            [
+                164.0,
+                1952.0,
+                1403.0,
+                1991.0
+            ],
+            [
+                164.0,
+                2018.0,
+                453.0,
+                2052.0
+            ],
+            [
+                823.0,
+                2234.0,
+                1413.0,
+                2263.0
+            ],
+            [
+                531.0,
+                2252.0,
+                1413.0,
+                2284.0
+            ],
+            [
+                1192.0,
+                2279.0,
+                1403.0,
+                2302.0
+            ],
+            [
+                1427.9248046875,
+                2151.68359375,
+                1570.37255859375,
+                2299.5205078125
+            ]
+        ]
+    }
+}

BIN
image/图片操作说明/2023年度报告母公司_page_001.png


+ 232 - 0
图片操作说明.md

@@ -0,0 +1,232 @@
+通过分析图片和JSON数据,我可以明确说明坐标系的起始位置和具体规则:
+![2023年度报告母公司_page_001](image/图片操作说明/2023年度报告母公司_page_001.png)
+[2023年度报告母公司_page_001.json](image/图片操作说明/2023年度报告母公司_page_001.json)
+
+```json
+{
+	"blocks": [
+		{
+			"block_label": "header",
+			"block_content": "广东荣德会计师事务所有限公司",
+			"block_bbox": [175, 157, 594, 219]
+		},
+		{
+			"block_label": "doc_title",
+			"block_content": "审计报告",
+			"block_bbox": [627, 263, 976, 325]
+		},
+		{
+			"block_label": "footer",
+			"block_content": "此码用于证明该审计报告是否由具有执业许可的会计师事务所出具...",
+			"block_bbox": [527, 2235, 1411, 2297]
+		}
+	]
+}
+```
+
+## 坐标系说明
+
+### **坐标原点位置**
+
+坐标系以**图片左上角为原点 (0,0)**:
+
+- **X轴**:从左到右递增
+- **Y轴**:从上到下递增
+
+### **具体举例说明**
+
+#### 1. **标题"审计报告"的坐标**
+
+```json
+{
+    "block_label": "doc_title",
+    "block_content": "审计报告",
+    "block_bbox": [627, 263, 976, 325]
+}
+```
+
+- `[627, 263, 976, 325]` 表示:
+  - 左上角:(627, 263) - 距离图片左边627像素,距离顶部263像素
+  - 右下角:(976, 325) - 距离图片左边976像素,距离顶部325像素
+
+#### 2. **页眉公司名称的坐标**
+
+```json
+{
+    "block_label": "header",
+    "block_content": "广东荣德会计师事务所有限公司",
+    "block_bbox": [175, 157, 594, 219]
+}
+```
+
+- `[175, 157, 594, 219]` 表示:
+  - 左上角:(175, 157) - 很靠近图片顶部
+  - 右下角:(594, 219)
+
+#### 3. **底部页脚的坐标**
+
+```json
+{
+    "block_label": "footer",
+    "block_content": "此码用于证明该审计报告是否由具有执业许可的会计师事务所出具...",
+    "block_bbox": [527, 2235, 1411, 2297]
+}
+```
+
+- `[527, 2235, 1411, 2297]` 表示:
+  - Y坐标2235、2297很大,说明位于图片底部
+
+### **坐标格式规律**
+
+所有的 `bbox` 都采用 **[x1, y1, x2, y2]** 格式:
+
+- `x1, y1`:矩形框的左上角坐标
+- `x2, y2`:矩形框的右下角坐标
+
+### **验证方法**
+
+从JSON中可以看出:
+
+- 页眉元素的Y坐标都在150-220范围(顶部)
+- 标题的Y坐标在260-330范围(偏上)
+- 正文内容Y坐标逐渐增大
+- 页脚元素Y坐标在2200+(底部)
+
+这完全符合**左上角为原点,Y轴向下递增**的坐标系统。
+
+# Plotly坐标系
+
+## 坐标系差异
+
+### **1. JSON中的坐标系(图像坐标系)**
+- **原点**:左上角 (0,0)
+- **Y轴方向**:向下递增
+- **示例**:`"block_bbox": [627, 263, 976, 325]`
+  - 627, 263 = 左上角坐标
+  - 976, 325 = 右下角坐标
+
+### **2. Plotly的坐标系(数学坐标系)**
+- **原点**:左下角 (0,0) 
+- **Y轴方向**:向上递增
+- **这是标准的笛卡尔坐标系**
+
+## 代码中的坐标转换
+
+````python
+fig.add_layout_image(
+    dict(
+        source=image,
+        xref="x", yref="y",
+        x=0, y=image.height,  # ← 这里是关键!
+        sizex=image.width, 
+        sizey=image.height,
+        sizing="stretch", 
+        opacity=1.0, 
+        layer="below"
+    )
+)
+````
+
+### **`y=image.height` 的含义**
+
+- **不是**从左上角开始
+- 这是**Plotly坐标系**中的位置,表示图像的**左下角**位置
+- 因为Plotly原点在左下角,所以:
+  - `y=0` 是图像底部
+  - `y=image.height` 是图像顶部
+
+## 坐标转换示例
+
+假设图像高度为2000像素:
+
+````python
+# JSON坐标(图像坐标系)
+json_bbox = [627, 263, 976, 325]  # [x1, y1, x2, y2]
+
+# 转换为Plotly坐标系
+def convert_to_plotly_coords(bbox, image_height):
+    x1, y1, x2, y2 = bbox
+    # X坐标不变
+    plot_x1 = x1
+    plot_x2 = x2
+    # Y坐标需要翻转
+    plot_y1 = image_height - y2  # 原来的底部 -> Plotly的底部
+    plot_y2 = image_height - y1  # 原来的顶部 -> Plotly的顶部
+    return [plot_x1, plot_y1, plot_x2, plot_y2]
+
+# 示例转换
+image_height = 2000
+plotly_coords = convert_to_plotly_coords([627, 263, 976, 325], image_height)
+# 结果:[627, 1675, 976, 1737]
+````
+
+## 修复建议
+
+您的代码中有坐标转换不一致的问题:
+
+````python
+def create_resized_interactive_plot(self, image: Image.Image, selected_bbox: Optional[List[int]], zoom_level: float, all_boxes: list[tuple]) -> go.Figure:
+    """创建可调整大小的交互式图片"""
+    fig = go.Figure()
+    
+    # 添加图片 - Plotly坐标系,原点在左下角
+    fig.add_layout_image(
+        dict(
+            source=image,
+            xref="x", yref="y",
+            x=0, y=image.height,  # 图片左下角在Plotly坐标系中的位置
+            sizex=image.width, 
+            sizey=image.height,
+            sizing="stretch", 
+            opacity=1.0, 
+            layer="below"
+        )
+    )
+    
+    # 显示所有bbox - 需要坐标转换
+    if len(all_boxes) > 0:
+        for bbox in all_boxes:
+            if len(bbox) >= 4:
+                x1, y1, x2, y2 = bbox[:4]
+                
+                # 转换为Plotly坐标系(翻转Y轴)
+                plot_x1 = x1
+                plot_x2 = x2
+                plot_y1 = image.height - y2  # JSON的y2 -> Plotly的底部
+                plot_y2 = image.height - y1  # JSON的y1 -> Plotly的顶部
+                
+                color = "rgba(0, 100, 200, 0.2)"
+                
+                fig.add_shape(
+                    type="rect",
+                    x0=plot_x1, y0=plot_y1,
+                    x1=plot_x2, y1=plot_y2,
+                    line=dict(color="blue", width=1),
+                    fillcolor=color,
+                )
+
+    # 高亮显示选中的bbox
+    if selected_bbox and len(selected_bbox) >= 4:
+        x1, y1, x2, y2 = selected_bbox[:4]
+        
+        # 转换为Plotly坐标系
+        plot_x1 = x1
+        plot_x2 = x2
+        plot_y1 = image.height - y2  # 翻转Y坐标
+        plot_y2 = image.height - y1  # 翻转Y坐标
+        
+        fig.add_shape(
+            type="rect",
+            x0=plot_x1, y0=plot_y1,
+            x1=plot_x2, y1=plot_y2,
+            line=dict(color="red", width=3),
+            fillcolor="rgba(255, 0, 0, 0.3)",
+        )
+    
+    # ...existing code...
+````
+
+**关键点**:
+- `y=image.height` 表示图像在Plotly坐标系中的顶部位置
+- 所有bbox坐标都需要进行Y轴翻转:`plotly_y = image_height - json_y`
+- 这样才能确保图像和标注框正确对齐