当前位置:网站首页>Use of Baidu face recognition API
Use of Baidu face recognition API
2022-06-30 09:02:00 【Silent Pinocchio】
Baidu face recognition API Use
Baidu face recognition API It's a third party SDK, Before that , I have searched other face recognition , By comparison , I think Baidu is more convenient .
Next in , This is a photograph comparison demo, To teach you how to use Baidu face recognition API.
* First step , Need to establish a baidu account , Apply for your own AppID, API Key and Secret Key
The second step , It is downloaded on the official website SDK, Import jar Package into project .
The third step , Just check Baidu API Documentation of , Next, I use face comparison as an example .*
AipFace clien =new AipFace(AppID, API Key,Secret Key)
//AppID, API Key,Secret Key When creating an application in Baidu , Baidu will assign you .
String imagePath1 = "test1.jpg";
String imagePath2 = "test2.jpg";
ArrayList<String> pathArray = new ArrayList<String>();
pathArray.add(imagePath1);
pathArray.add(imagePath2);
JSONObject response = client.match(pathArray, new HashMap<String, String>());
System.out.println(response.toString());imagePath1 and imagePath2 Are the addresses of pictures .
And then back to json The format is
{
“log_id”: 73473737,
“result_num”:1,
“result”: [
{
“index_i”: 0,
“index_j”: 1,
“score”: 44.3
}
]
}
The data we want , Namely result Medium “score”, This data
That is to say
The degree of similarity between the two photos can be calculated according to this value , To determine whether it is the same person . I suggest that the critical value is 80.
demo Address :https://github.com/WngYilei/Face/tree/master/FaceDemo
Reprint please indicate the source , Hopefully that helped , If you don't understand , You can add me QQ
1064902365 Consultation .
边栏推荐
- Flink 数据偶尔数据积压导致checkpoint失败
- Comparison of two ways for C to access SQL Server database (SqlDataReader vs SqlDataAdapter)
- C#访问MongoDB并执行CRUD操作
- CUDA realizes L2 European distance
- Detectron2 source code reading 3-- encapsulating dataset with mapper
- Enhance the add / delete operation of for loop & iterator delete collection elements
- C # listbox how to get the selected content (search many invalid articles)
- Does the oscilloscope probe affect the measurement of capacitive load?
- TiDB 6.0:让 TSO 更高效丨TiDB Book Rush
- Be careful of this hole in transmittable thread local
猜你喜欢

Flink 数据偶尔数据积压导致checkpoint失败

Rew acoustic test (VI): signal and measurement

技术管理进阶——管理者如何进行梯队设计及建设

El input limit can only input numbers

Detailed explanation of pytoch's scatter function

Redis design and Implementation (IV) | master-slave replication

Esp32 things (II): sharpening the knife without mistaking firewood - make preparations before project development

Use Huawei performance management service to configure the sampling rate on demand

Implementing custom drawer component in quick application

Explanation on the use of password profiteering cracking tool Hydra
随机推荐
[untitled]
Unsupportedclassversionerror is reported when starting jar package. How to repair it
Mmcv expanding CUDA operator beginner level chapter
100 lines of code and a voice conversation assistant
Mmdet line by line code interpretation of positive and negative sample sampler
Source code interpretation of detectron2 1--engine
Detailed explanation of pytoch's scatter function
vim 从嫌弃到依赖(21)——跨文件搜索
Opencv learning notes -day1 (image reading display imread, imshow, namedwindow)
Detailed explanation of rect class
vite項目require語法兼容問題解决require is not defined
Redis design and Implementation (V) | sentinel sentry
Opencv learning notes -day 12 (ROI region extraction and inrange() function operation)
Detailed explanation of pipline of mmdetection
Does the oscilloscope probe affect the measurement of capacitive load?
基于Svelte3.x桌面端UI组件库Svelte UI
启动jar包报错UnsupportedClassVersionError,如何修复
[untitled]
Opencv learning notes -day10 logical operation of image pixels (usage of rectangle function and rect function and bit related operation in openCV)
Is it safe to open an account? How can anyone say that it is not reliable.