通过labelme的json文件实现对图片的批量裁剪

时间:2025-04-09 07:15:46
{ "version": "5.0.1", "flags": {}, "shapes": [ { "label": "yang", "points": [ [ 34.09803921568627, 200.0 ], [ 79.19607843137254, 162.7450980392157 ], [ 200.76470588235293, 166.66666666666666 ], [ 418.4117647058823, 162.7450980392157 ], [ 447.82352941176475, 245.09803921568627 ], [ 426.2549019607843, 327.45098039215685 ], [ 439.98039215686276, 411.7647058823529 ], [ 706.6470588235294, 325.4901960784314 ], [ 718.4117647058823, 1788.235294117647 ], [ 32.13725490196077, 1796.078431372549 ] ], "group_id": null, "shape_type": "polygon", "flags": {} }, { "label": "yang", "points": [ [ 1043.9019607843138, 168.62745098039215 ], [ 1392.921568627451, 164.70588235294116 ], [ 1432.1372549019607, 254.90196078431373 ], [ 1406.6470588235293, 350.98039215686276 ], [ 1438.0196078431372, 1780.392156862745 ], [ 841.9411764705882, 1813.7254901960785 ], [ 743.9019607843137, 1156.862745098039 ], [ 745.8627450980392, 890.1960784313725 ], [ 857.6274509803922, 774.5098039215686 ], [ 994.8823529411764, 760.7843137254902 ], [ 983.1176470588234, 200.0 ] ], "group_id": null, "shape_type": "polygon", "flags": {} }, { "label": "yang", "points": [ [ 2416.450980392157, 164.70588235294116 ], [ 2851.7450980392155, 168.62745098039215 ], [ 2857.627450980392, 1782.3529411764705 ], [ 2189.0, 1792.156862745098 ], [ 2153.705882352941, 905.8823529411765 ], [ 2120.372549019608, 190.19607843137254 ] ], "group_id": null, "shape_type": "polygon", "flags": {} } ], "imagePath": "", "imageData": null, "imageHeight": 1901, "imageWidth": 2874 }