From cb604b849574defa4ae95588b695fc82d0a097dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=97=B4=E7=90=89=E7=92=83=E5=A4=A7=E4=BD=BF?= <1986509808@qq.com> Date: Wed, 29 Mar 2023 01:51:07 +0000 Subject: [PATCH] update face-server/src/main/java/com/dkha/server/services/impl/CompareServiceImpl.java. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 风间琉璃大使 <1986509808@qq.com> --- .../server/services/impl/CompareServiceImpl.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/face-server/src/main/java/com/dkha/server/services/impl/CompareServiceImpl.java b/face-server/src/main/java/com/dkha/server/services/impl/CompareServiceImpl.java index f341f22..c5f145d 100644 --- a/face-server/src/main/java/com/dkha/server/services/impl/CompareServiceImpl.java +++ b/face-server/src/main/java/com/dkha/server/services/impl/CompareServiceImpl.java @@ -107,13 +107,8 @@ public class CompareServiceImpl implements ICompareService { if (compareRequestVo.getUrlList().size() != comparePicSize) { throw new DkException("请上传1:1比对的两张图片"); } -<<<<<<< HEAD - // String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl(); - String apiUrltest = "192.168.1.196:5403/compare"; -======= -// String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl(); +// String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl(); String apiUrltest = "http://192.168.1.196:5001/compare"; ->>>>>>> 26aceca82a102504f904715404a73aa391abac98 FaceCompareVO faceCompareVO = new FaceCompareVO(); faceCompareVO.setImage1(compareRequestVo.getUrlList().get(0)); faceCompareVO.setImage2(compareRequestVo.getUrlList().get(1)); @@ -121,12 +116,10 @@ public class CompareServiceImpl implements ICompareService { ApiFaceOneSearchReturnFaceVO apiFaceOneSearchReturnFaceVO = JsonUtil.string2Obj(JsonUtil.obj2String(returnVO.getData()), new TypeReference() {}); //返回结果集 OneToOneResultVo oneToOneResultVo = new OneToOneResultVo(); -<<<<<<< HEAD if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)){ oneToOneResultVo.getUrls().add(faceCompareVO.getImage1()); oneToOneResultVo.getUrls().add(faceCompareVO.getImage2()); oneToOneResultVo.setScore(apiFaceOneSearchReturnFaceVO.getHitSimilarity()); -======= if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)) { // if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO.getFaces())) { // for (ApiFaceOneSearchFaceVO apiFaceOneSearchFaceVO : apiFaceOneSearchReturnFaceVO.getFaces()) { @@ -136,7 +129,6 @@ public class CompareServiceImpl implements ICompareService { oneToOneResultVo.getUrls().add(faceCompareVO.getImage1()); oneToOneResultVo.setScore(apiFaceOneSearchReturnFaceVO.getHitSimilarity()); // } ->>>>>>> 26aceca82a102504f904715404a73aa391abac98 } // if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)) { // if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO.getFaces())) { @@ -184,11 +176,8 @@ public class CompareServiceImpl implements ICompareService { private void validateSingleFaceImage(String image) { //人脸检测url //String faceSearchUrl = apiRequestPrefix + ApiUrlEnum.FACE_SEARCH.getUrl(); -<<<<<<< HEAD String faceSearchUrltest ="http://192.168.3.134:5000/message/mask"; -======= String faceSearchUrltest ="http://192.168.3.132:5000/message/mask"; ->>>>>>> 26aceca82a102504f904715404a73aa391abac98 //组装api请求数据 ReturnVO returnVO; returnVO = (ReturnVO) httpUtil.post(faceSearchUrltest + "?url=" + image, null, ReturnVO.class);