|
@@ -33,8 +33,8 @@ public class AiDigitalAvatarHelper { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static AiCheckPhotoResult checkPhoto(AiCheckPhotoParam param) { |
|
|
public static AiCheckPhotoResult checkPhoto(AiCheckPhotoParam param) { |
|
|
// String response = HttpUtil.doAiVideoPost("http://nas.pucao.cn:2005/dec_face", JSONObject.toJSONString(param)); |
|
|
|
|
|
String response = HttpUtil.doAiVideoPost(digital_avatar + "/dec_face", JSONObject.toJSONString(param)); |
|
|
|
|
|
|
|
|
String response = HttpUtil.doAiVideoPost("http://nas.pucao.cn:2005/dec_face", JSONObject.toJSONString(param)); |
|
|
|
|
|
// String response = HttpUtil.doAiVideoPost(digital_avatar + "/dec_face", JSONObject.toJSONString(param)); |
|
|
log.info("图片人脸检测 end response:" + response); |
|
|
log.info("图片人脸检测 end response:" + response); |
|
|
AiCheckPhotoResult result = new AiCheckPhotoResult(); |
|
|
AiCheckPhotoResult result = new AiCheckPhotoResult(); |
|
|
|
|
|
|
|
@@ -70,8 +70,8 @@ public class AiDigitalAvatarHelper { |
|
|
param.setCallback_url("https://phototest.metavatar.cc/C/callback/photo/speak"); |
|
|
param.setCallback_url("https://phototest.metavatar.cc/C/callback/photo/speak"); |
|
|
// param.setCallback_url(callbackUrl + "/callback/photo/speak"); |
|
|
// param.setCallback_url(callbackUrl + "/callback/photo/speak"); |
|
|
// log.info("生成照片start request:" + param.getBg_img()); |
|
|
// log.info("生成照片start request:" + param.getBg_img()); |
|
|
// String response = HttpUtil.doAiVideoPost("http://nas.pucao.cn:2005/make_face", JSONObject.toJSONString(param)); |
|
|
|
|
|
String response = HttpUtil.doAiVideoPost(digital_avatar + "/make_face", JSONObject.toJSONString(param)); |
|
|
|
|
|
|
|
|
String response = HttpUtil.doAiVideoPost("http://nas.pucao.cn:2005/make_face", JSONObject.toJSONString(param)); |
|
|
|
|
|
// String response = HttpUtil.doAiVideoPost(digital_avatar + "/make_face", JSONObject.toJSONString(param)); |
|
|
log.info("生成照片end response:"+response); |
|
|
log.info("生成照片end response:"+response); |
|
|
|
|
|
|
|
|
DigitalAvatarResult result = new DigitalAvatarResult(); |
|
|
DigitalAvatarResult result = new DigitalAvatarResult(); |
|
@@ -182,21 +182,21 @@ public class AiDigitalAvatarHelper { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
public static void main(String[] args) { |
|
|
// AiCheckPhotoParam param = new AiCheckPhotoParam(); |
|
|
|
|
|
// String img = Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personmould/16760216806604820_cSHoijDX_grace_1080.jpg"); |
|
|
|
|
|
// param.setImg(img); |
|
|
|
|
|
// AiCheckPhotoResult result = AiDigitalAvatarHelper.checkPhoto(param); |
|
|
|
|
|
// System.out.println(result); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DigitalAvatarParam param = new DigitalAvatarParam(); |
|
|
|
|
|
param.setBg_img("style_threeface"); |
|
|
|
|
|
|
|
|
AiCheckPhotoParam param = new AiCheckPhotoParam(); |
|
|
String img = Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personmould/16760216806604820_cSHoijDX_grace_1080.jpg"); |
|
|
String img = Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personmould/16760216806604820_cSHoijDX_grace_1080.jpg"); |
|
|
param.setImg_lift(img); |
|
|
|
|
|
param.setImg_middle(img); |
|
|
|
|
|
param.setImg_right(img); |
|
|
|
|
|
DigitalAvatarResult result = AiDigitalAvatarHelper.digitalAvatarPhoto(param,100001l); |
|
|
|
|
|
|
|
|
param.setImg(img); |
|
|
|
|
|
AiCheckPhotoResult result = AiDigitalAvatarHelper.checkPhoto(param); |
|
|
System.out.println(result); |
|
|
System.out.println(result); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// DigitalAvatarParam param = new DigitalAvatarParam(); |
|
|
|
|
|
// param.setBg_img("style_threeface"); |
|
|
|
|
|
// String img = Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personmould/16760216806604820_cSHoijDX_grace_1080.jpg"); |
|
|
|
|
|
// param.setImg_lift(img); |
|
|
|
|
|
// param.setImg_middle(img); |
|
|
|
|
|
// param.setImg_right(img); |
|
|
|
|
|
// DigitalAvatarResult result = AiDigitalAvatarHelper.digitalAvatarPhoto(param,100001l); |
|
|
|
|
|
// System.out.println(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|