|
@@ -13,10 +13,10 @@ public class FaceVerifyTest {
|
|
|
@Test
|
|
|
public void demo() {
|
|
|
FaceVerifyProperties properties = new FaceVerifyProperties();
|
|
|
- properties.setFacePlusKey("VOlRKNlCSAYIOcSLDKOaZukkqpmi-Pwo");
|
|
|
- properties.setFacePlusSecret("bzMjy-JfwtVUxVDMzagFh7ggbQBC71f1");
|
|
|
- properties.setBaiduKey("WkMttisvQVrqDSSSDhU2Un9X");
|
|
|
- properties.setBaiduSecret("Zb83wGDg75yrU4oOkbkeQGW3KlOSHsMm");
|
|
|
+ properties.setFacePlusKey("xxx");
|
|
|
+ properties.setFacePlusSecret("xxx");
|
|
|
+ properties.setBaiduKey("xxx");
|
|
|
+ properties.setBaiduSecret("xxx");
|
|
|
properties.setBaiduLocalEnabled(true);
|
|
|
properties.setBaiduLocalAppId("test");
|
|
|
properties.setBaiduLocalUrlPrefix("http://192.168.10.102:8301");
|
|
@@ -26,15 +26,17 @@ public class FaceVerifyTest {
|
|
|
|
|
|
// String imageUrl = "https://img0.baidu.com/it/u=2750657437,2761718651&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=749";
|
|
|
// String imageUrl = "https://img2.baidu.com/it/u=1657567997,3247312681&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=666";
|
|
|
- String imageUrl = "http://5b0988e595225.cdn.sohucs.com/images/20171017/cbdb993563a94a45ab5f99202b0c9c52.jpeg";
|
|
|
- String imageUrl2 = "https://pix2.tvzhe.com/thumb/star/32/524/260x346.jpg";
|
|
|
+ String imageUrl = "https://img0.baidu.com/it/u=3045244088,3053373141&fm=253&fmt=auto&app=138&f=JPEG?w=200&h=200";
|
|
|
+ String imageUrl2 = "https://img2.baidu.com/it/u=529672263,3841026141&fm=253&fmt=auto&app=138&f=JPEG?w=200&h=200";
|
|
|
|
|
|
- File imageFile1 = new File("D:\\home\\test\\fds.jpg");
|
|
|
- File imageFile2 = new File("D:\\home\\test\\app100001.jpg");
|
|
|
+ File imageFile1 = new File("D:\\home\\test\\101.jpg");
|
|
|
+ File imageFile2 = new File("D:\\home\\test\\102.jpg");
|
|
|
|
|
|
- FaceResult result = faceVerifyService.faceDetectByBaidu(imageUrl);
|
|
|
+ // FaceResult result = faceVerifyService.faceVerifyByBaidu(imageUrl);
|
|
|
+ // FaceResult result = faceVerifyService.faceVerifyByBaidu(imageFile1);
|
|
|
+ // FaceResult result = faceVerifyService.faceDetectByBaidu(imageUrl);
|
|
|
// FaceResult result = faceVerifyService.faceDetectByBaidu(imageFile1);
|
|
|
- // FaceResult result = faceVerifyService.faceCompareByBaidu(imageUrl, imageUrl2);
|
|
|
+ FaceResult result = faceVerifyService.faceCompareByBaidu(imageUrl, imageUrl2);
|
|
|
// FaceResult result = faceVerifyService.faceCompareByBaidu(imageFile1, imageFile2);
|
|
|
// FaceResult result = faceVerifyService.faceDetectByFacePlus(imageUrl);
|
|
|
// FaceResult result = faceVerifyService.faceDetectByFacePlus(imageFile1);
|