From 14ff063f87005096210b205bf915ab7dc919c091 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Wed, 28 Aug 2024 11:47:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=20fix=20=20=20design=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89mask?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/api_design.py | 176 ++++++++++++++++++++++++++---------------- 1 file changed, 109 insertions(+), 67 deletions(-) diff --git a/app/api/api_design.py b/app/api/api_design.py index d4537c1..bc3d1b9 100644 --- a/app/api/api_design.py +++ b/app/api/api_design.py @@ -24,28 +24,28 @@ def design(request_data: DesignModel): "basic": { "body_point_test": { "waistband_right": [ - 203, - 249 + 200, + 241 ], "hand_point_right": [ - 229, - 343 + 223, + 297 ], "waistband_left": [ - 119, - 248 + 112, + 241 ], "hand_point_left": [ - 97, - 343 + 92, + 305 ], "shoulder_left": [ - 108, - 107 + 99, + 116 ], "shoulder_right": [ - 212, - 107 + 215, + 116 ] }, "layer_order": true, @@ -57,65 +57,33 @@ def design(request_data: DesignModel): }, "items": [ { - "businessId": 255303, - "color": "139 148 156", - "image_id": 95159, + "businessId": 270372, + "color": "30 28 28", + "image_id": 69780, "offset": [ 0, 0 ], - "path": "aida-users/89/sketch/c89d75f3-581f-4edd-9f8e-b08e84a2cbe7-3-89.png", + "path": "aida-sys-image/images/female/trousers/0825000630.jpg", + "seg_mask_url": "test/result.png", "print": { - "single": { - "location": [ - [ - 200.0, - 200.0 - ] - ], - "print_angle_list": [ - 0.0 - ], - "print_path_list": [ - "aida-users/89/slogan_image/ce0b2423-9e5a-466f-9611-c254940a7819-1-89.png" - ], - "print_scale_list": [ - 1.0 - ] + "element": { + "element_angle_list": [], + "element_path_list": [], + "element_scale_list": [], + "location": [] }, "overall": { - "location": [ - [ - 512.0, - 512.0 - ] - ], - "print_angle_list": [ - 0.0 - ], - "print_path_list": [ - "aida-users/89/print/468643b4-bc2d-41b2-9a16-79766606a2db-3-89.png" - ], - "print_scale_list": [ - 1.0 - ] + "location": [], + "print_angle_list": [], + "print_path_list": [], + "print_scale_list": [] }, - "element": { - "element_angle_list": [ - 0.0 - ], - "element_path_list": [ - "aida-users/88/designelements/Embroidery/a4d9605a-675e-4606-93e0-77ca6baaf55f.png" - ], - "element_scale_list": [ - 0.2731036750637755 - ], - "location": [ - [ - 228.63694825464364, - 406.4843844199667 - ] - ] + "single": { + "location": [], + "print_angle_list": [], + "print_path_list": [], + "print_scale_list": [] } }, "priority": 10, @@ -123,17 +91,91 @@ def design(request_data: DesignModel): 1.0, 1.0 ], - "type": "Dress" + "type": "Trousers" }, { - "body_path": "aida-sys-image/models/female/2e4815b9-1191-419d-94ed-5771239ca4a5.png", - "image_id": 67277, + "businessId": 270373, + "color": "30 28 28", + "image_id": 98243, + "offset": [ + 0, + 0 + ], + "path": "aida-sys-image/images/female/blouse/0902003811.jpg", + "seg_mask_url": "test/result.png", + "print": { + "element": { + "element_angle_list": [], + "element_path_list": [], + "element_scale_list": [], + "location": [] + }, + "overall": { + "location": [], + "print_angle_list": [], + "print_path_list": [], + "print_scale_list": [] + }, + "single": { + "location": [], + "print_angle_list": [], + "print_path_list": [], + "print_scale_list": [] + } + }, + "priority": 11, + "resize_scale": [ + 1.0, + 1.0 + ], + "type": "Blouse" + }, + { + "businessId": 270374, + "color": "172 68 68", + "image_id": 98244, + "offset": [ + 0, + 0 + ], + "path": "aida-sys-image/images/female/outwear/0825000410.jpg", + "seg_mask_url": "test/result.png", + "print": { + "element": { + "element_angle_list": [], + "element_path_list": [], + "element_scale_list": [], + "location": [] + }, + "overall": { + "location": [], + "print_angle_list": [], + "print_path_list": [], + "print_scale_list": [] + }, + "single": { + "location": [], + "print_angle_list": [], + "print_path_list": [], + "print_scale_list": [] + } + }, + "priority": 12, + "resize_scale": [ + 1.0, + 1.0 + ], + "type": "Outwear" + }, + { + "body_path": "aida-sys-image/models/female/5bdfe7ca-64eb-44e4-b03d-8e517520c795.png", + "image_id": 96090, "type": "Body" } ] } ], - "process_id": "89" + "process_id": "83" } """ logger.info(f"design request item is : @@@@@@:{json.dumps(request_data.dict())}")