3.28修改人脸比对接口
This commit is contained in:
		
							parent
							
								
									7c105f2f4a
								
							
						
					
					
						commit
						26aceca82a
					
				| @ -108,22 +108,23 @@ public class CompareServiceImpl implements ICompareService { | ||||
|             throw new DkException("请上传1:1比对的两张图片"); | ||||
|         } | ||||
| //        String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl(); | ||||
|         String apiUrltest = "192.168.1.196:5403/compare"; | ||||
|         String apiUrltest = "http://192.168.1.196:5001/compare"; | ||||
|         FaceCompareVO faceCompareVO = new FaceCompareVO(); | ||||
|         faceCompareVO.setImage1(compareRequestVo.getUrlList().get(0)); | ||||
|         faceCompareVO.setImage2(compareRequestVo.getUrlList().get(1)); | ||||
|         ReturnVO returnVO = (ReturnVO)httpUtil.post(apiUrltest, faceCompareVO, ReturnVO.class); | ||||
|         // | ||||
|         ApiFaceOneSearchReturnFaceVO apiFaceOneSearchReturnFaceVO = JsonUtil.string2Obj(JsonUtil.obj2String(returnVO.getData()), new TypeReference<ApiFaceOneSearchReturnFaceVO>() {}); | ||||
|         //返回结果集 | ||||
|         OneToOneResultVo oneToOneResultVo = new OneToOneResultVo(); | ||||
|         if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO)) { | ||||
|             if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO.getFaces())) { | ||||
|                 for (ApiFaceOneSearchFaceVO apiFaceOneSearchFaceVO : apiFaceOneSearchReturnFaceVO.getFaces()) { | ||||
|                     oneToOneResultVo.getUrls().add(apiFaceOneSearchFaceVO.getUrl()); | ||||
|                 } | ||||
| //            if (UtilValidate.isNotEmpty(apiFaceOneSearchReturnFaceVO.getFaces())) { | ||||
| //                for (ApiFaceOneSearchFaceVO apiFaceOneSearchFaceVO : apiFaceOneSearchReturnFaceVO.getFaces()) { | ||||
| //                    oneToOneResultVo.getUrls().add(apiFaceOneSearchFaceVO.getUrl()); | ||||
| //                } | ||||
|                 oneToOneResultVo.getUrls().add(faceCompareVO.getImage1()); | ||||
|                 oneToOneResultVo.getUrls().add(faceCompareVO.getImage1()); | ||||
|                 oneToOneResultVo.setScore(apiFaceOneSearchReturnFaceVO.getHitSimilarity()); | ||||
|             } | ||||
| //            } | ||||
|         } | ||||
|         return oneToOneResultVo; | ||||
|     } | ||||
| @ -138,7 +139,7 @@ public class CompareServiceImpl implements ICompareService { | ||||
|             throw new DkException("文件上传失败"); | ||||
|         } | ||||
|         String imag = map1.getString("url"); | ||||
|         //人脸检测方法 | ||||
|         //人脸检测方法入口 | ||||
|         validateSingleFaceImage(imag); | ||||
|         return imag; | ||||
| 
 | ||||
| @ -163,10 +164,6 @@ public class CompareServiceImpl implements ICompareService { | ||||
|     private void validateSingleFaceImage(String image) { | ||||
|         //人脸检测url | ||||
|         //String faceSearchUrl = apiRequestPrefix + ApiUrlEnum.FACE_SEARCH.getUrl(); | ||||
| <<<<<<< HEAD | ||||
| 
 | ||||
| ======= | ||||
| >>>>>>> 2694213e787f28783bce92eaa5a3db9102554981 | ||||
|         String faceSearchUrltest ="http://192.168.3.132:5000/message/mask"; | ||||
|         //组装api请求数据 | ||||
|         ReturnVO returnVO; | ||||
|  | ||||
| @ -110,7 +110,7 @@ renren.redis.open: false | ||||
| #人脸API统一请求地址定义 | ||||
| api: | ||||
|   server: | ||||
|     prefix: http://192.168.1.161:8013/dkha/ | ||||
|     prefix: http://192.168.1.196:5001/ | ||||
|   #人脸检索最大返回值 | ||||
|   max: | ||||
|     result: 100 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user