feat : design 单品新增 镜像旋转功能
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
This commit is contained in:
@@ -15,177 +15,184 @@ logger = logging.getLogger()
|
|||||||
@router.post("/design")
|
@router.post("/design")
|
||||||
def design(request_data: DesignModel):
|
def design(request_data: DesignModel):
|
||||||
"""
|
"""
|
||||||
objects.items.transparent:
|
- **objects.items.transparent**:
|
||||||
"transparent":{
|
```json
|
||||||
"mask_url":"test/transparent_test/transparent_mask.png",
|
"transparent":{
|
||||||
"scale":0.1
|
"mask_url":"test/transparent_test/transparent_mask.png",
|
||||||
},
|
"scale":0.1
|
||||||
mask_url 为空"" -> 单件衣服透明
|
},
|
||||||
mask_url 非空"mask_url" -> 区域透明
|
```
|
||||||
|
- **mask_url** 为空"" -> 单件衣服透明
|
||||||
创建一个具有以下参数的请求体:
|
- **mask_url** 非空"mask_url" -> 区域透明
|
||||||
示例参数:
|
- **transpose** 镜像模式 ,:"top_bottom"或"left_right"
|
||||||
{
|
- **rotate** 45,
|
||||||
"objects": [
|
- 创建一个具有以下参数的请求体:
|
||||||
{
|
示例参数:
|
||||||
"basic": {
|
```json
|
||||||
"body_point_test": {
|
{
|
||||||
"waistband_right": [
|
"objects": [
|
||||||
203,
|
{
|
||||||
249
|
"basic": {
|
||||||
],
|
"body_point_test": {
|
||||||
"hand_point_right": [
|
"waistband_right": [
|
||||||
229,
|
203,
|
||||||
343
|
249
|
||||||
],
|
],
|
||||||
"waistband_left": [
|
"hand_point_right": [
|
||||||
119,
|
229,
|
||||||
248
|
343
|
||||||
],
|
],
|
||||||
"hand_point_left": [
|
"waistband_left": [
|
||||||
97,
|
119,
|
||||||
343
|
248
|
||||||
],
|
],
|
||||||
"shoulder_left": [
|
"hand_point_left": [
|
||||||
108,
|
97,
|
||||||
107
|
343
|
||||||
],
|
],
|
||||||
"shoulder_right": [
|
"shoulder_left": [
|
||||||
212,
|
108,
|
||||||
107
|
107
|
||||||
]
|
],
|
||||||
},
|
"shoulder_right": [
|
||||||
"layer_order": true,
|
212,
|
||||||
"preview_submit": "submit",
|
107
|
||||||
"scale_bag": 0.7,
|
]
|
||||||
"scale_earrings": 0.16,
|
|
||||||
"self_template": true,
|
|
||||||
"single_overall": "overall",
|
|
||||||
"switch_category": ""
|
|
||||||
},
|
},
|
||||||
"items": [
|
"layer_order": true,
|
||||||
{
|
"preview_submit": "submit",
|
||||||
"businessId": 2377945,
|
"scale_bag": 0.7,
|
||||||
"color": "209 196 171",
|
"scale_earrings": 0.16,
|
||||||
"image_id": 189410,
|
"self_template": true,
|
||||||
"offset": [
|
"single_overall": "overall",
|
||||||
0,
|
"switch_category": ""
|
||||||
0
|
},
|
||||||
],
|
"items": [
|
||||||
"path": "aida-collection-element/89/Sketchboard/53d38bd5-f77b-4034-ada2-45f1e2ebe00c.png",
|
{
|
||||||
"print": {
|
"businessId": 2377945,
|
||||||
"element": {
|
"color": "209 196 171",
|
||||||
"element_angle_list": [],
|
"image_id": 189410,
|
||||||
"element_path_list": [],
|
"offset": [
|
||||||
"element_scale_list": [],
|
0,
|
||||||
"location": []
|
0
|
||||||
},
|
],
|
||||||
"overall": {
|
"path": "aida-collection-element/89/Sketchboard/53d38bd5-f77b-4034-ada2-45f1e2ebe00c.png",
|
||||||
"location": [],
|
"transpose": "top_bottom",
|
||||||
"print_angle_list": [],
|
"rotate": 45,
|
||||||
"print_path_list": [],
|
"print": {
|
||||||
"print_scale_list": []
|
"element": {
|
||||||
},
|
"element_angle_list": [],
|
||||||
"single": {
|
"element_path_list": [],
|
||||||
"location": [],
|
"element_scale_list": [],
|
||||||
"print_angle_list": [],
|
"location": []
|
||||||
"print_path_list": [],
|
|
||||||
"print_scale_list": []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"priority": 12,
|
"overall": {
|
||||||
"resize_scale": [
|
"location": [],
|
||||||
1.0,
|
"print_angle_list": [],
|
||||||
1.0
|
"print_path_list": [],
|
||||||
],
|
"print_scale_list": []
|
||||||
"seg_mask_url": "aida-clothing/mask/mask_8e96ddb0-e466-11f0-8de2-0242ac130002.png",
|
|
||||||
"type": "Outwear"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"businessId": 2377946,
|
|
||||||
"color": "122 152 139",
|
|
||||||
"image_id": 81868,
|
|
||||||
"offset": [
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"path": "aida-sys-image/images/female/blouse/0825001443.jpg",
|
|
||||||
"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,
|
"single": {
|
||||||
"resize_scale": [
|
"location": [],
|
||||||
1.0,
|
"print_angle_list": [],
|
||||||
1.0
|
"print_path_list": [],
|
||||||
],
|
"print_scale_list": []
|
||||||
"seg_mask_url": "aida-clothing/mask/mask_8f0fab78-e466-11f0-8de2-0242ac130002.png",
|
}
|
||||||
"type": "Blouse"
|
|
||||||
},
|
},
|
||||||
{
|
"priority": 12,
|
||||||
"businessId": 2377947,
|
"resize_scale": [
|
||||||
"color": "111 78 63",
|
1.0,
|
||||||
"gradient": "aida-gradient/517c3a4d-aed7-4423-aa99-7b60d3577df1.png",
|
1.0
|
||||||
"image_id": 116494,
|
],
|
||||||
"offset": [
|
"seg_mask_url": "aida-clothing/mask/mask_8e96ddb0-e466-11f0-8de2-0242ac130002.png",
|
||||||
0,
|
"type": "Outwear"
|
||||||
0
|
},
|
||||||
],
|
{
|
||||||
"path": "aida-sys-image/images/female/skirt/0825000219.jpg",
|
"businessId": 2377946,
|
||||||
"print": {
|
"color": "122 152 139",
|
||||||
"element": {
|
"image_id": 81868,
|
||||||
"element_angle_list": [],
|
"offset": [
|
||||||
"element_path_list": [],
|
0,
|
||||||
"element_scale_list": [],
|
0
|
||||||
"location": []
|
],
|
||||||
},
|
"path": "aida-sys-image/images/female/blouse/0825001443.jpg",
|
||||||
"overall": {
|
"print": {
|
||||||
"location": [],
|
"element": {
|
||||||
"print_angle_list": [],
|
"element_angle_list": [],
|
||||||
"print_path_list": [],
|
"element_path_list": [],
|
||||||
"print_scale_list": []
|
"element_scale_list": [],
|
||||||
},
|
"location": []
|
||||||
"single": {
|
|
||||||
"location": [],
|
|
||||||
"print_angle_list": [],
|
|
||||||
"print_path_list": [],
|
|
||||||
"print_scale_list": []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"priority": 10,
|
"overall": {
|
||||||
"resize_scale": [
|
"location": [],
|
||||||
1.0,
|
"print_angle_list": [],
|
||||||
1.0
|
"print_path_list": [],
|
||||||
],
|
"print_scale_list": []
|
||||||
"seg_mask_url": "aida-clothing/mask/mask_8f6191fe-e466-11f0-8de2-0242ac130002.png",
|
},
|
||||||
"type": "Skirt"
|
"single": {
|
||||||
|
"location": [],
|
||||||
|
"print_angle_list": [],
|
||||||
|
"print_path_list": [],
|
||||||
|
"print_scale_list": []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
"priority": 11,
|
||||||
"body_path": "aida-sys-image/models/female/2e4815b9-1191-419d-94ed-5771239ca4a5.png",
|
"resize_scale": [
|
||||||
"image_id": 67277,
|
1.0,
|
||||||
"type": "Body"
|
1.0
|
||||||
}
|
],
|
||||||
]
|
"seg_mask_url": "aida-clothing/mask/mask_8f0fab78-e466-11f0-8de2-0242ac130002.png",
|
||||||
}
|
"type": "Blouse"
|
||||||
],
|
},
|
||||||
"process_id": "89"
|
{
|
||||||
}
|
"businessId": 2377947,
|
||||||
|
"color": "111 78 63",
|
||||||
|
"gradient": "aida-gradient/517c3a4d-aed7-4423-aa99-7b60d3577df1.png",
|
||||||
|
"image_id": 116494,
|
||||||
|
"offset": [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"path": "aida-sys-image/images/female/skirt/0825000219.jpg",
|
||||||
|
"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": 10,
|
||||||
|
"resize_scale": [
|
||||||
|
1.0,
|
||||||
|
1.0
|
||||||
|
],
|
||||||
|
"seg_mask_url": "aida-clothing/mask/mask_8f6191fe-e466-11f0-8de2-0242ac130002.png",
|
||||||
|
"type": "Skirt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"body_path": "aida-sys-image/models/female/2e4815b9-1191-419d-94ed-5771239ca4a5.png",
|
||||||
|
"image_id": 67277,
|
||||||
|
"type": "Body"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"process_id": "89"
|
||||||
|
}
|
||||||
|
```
|
||||||
"""
|
"""
|
||||||
# logger.info(f"design request item is : @@@@@@:{json.dumps(request_data.dict(),indent=4)}")
|
# logger.info(f"design request item is : @@@@@@:{json.dumps(request_data.dict(),indent=4)}")
|
||||||
# data = generate(request_data=request_data)
|
# data = generate(request_data=request_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user