|
@@ -83,18 +83,17 @@ class ImageMattingController extends Controller {
|
|
|
"token": params.token,
|
|
"token": params.token,
|
|
|
"image_type": 2, //图像类型;0非服装;1服装 2人台
|
|
"image_type": 2, //图像类型;0非服装;1服装 2人台
|
|
|
"output_mode": params.output_type, //出图模式 ;0透明;1白底
|
|
"output_mode": params.output_type, //出图模式 ;0透明;1白底
|
|
|
- "size_model": params.size, // 0=>指定大小;1=>最小边框;2原图尺寸
|
|
|
|
|
|
|
+ "size_mode": params.size, // 0=>指定大小;1=>最小边框;2原图尺寸
|
|
|
"out_width": params.customWidth, // 宽度
|
|
"out_width": params.customWidth, // 宽度
|
|
|
"out_height": params.customHeight, // 高度
|
|
"out_height": params.customHeight, // 高度
|
|
|
"need_cutout_images": res.data.data
|
|
"need_cutout_images": res.data.data
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- if(modelParams.size_model !== 0){
|
|
|
|
|
|
|
+ if(modelParams.size_mode !== 0){
|
|
|
delete modelParams.out_width
|
|
delete modelParams.out_width
|
|
|
delete modelParams.out_height
|
|
delete modelParams.out_height
|
|
|
}
|
|
}
|
|
|
const img = await modelFormSegment(modelParams)
|
|
const img = await modelFormSegment(modelParams)
|
|
|
- console.log(img)
|
|
|
|
|
|
|
|
|
|
if(img.data){
|
|
if(img.data){
|
|
|
return img.data
|
|
return img.data
|