当前位置:网站首页>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 .
边栏推荐
- [data analysis and display]
- JVM tuning related commands and explanations
- Interference source current spectrum test of current probe
- 证券开户的优惠怎样才能得到?在线开户安全?
- Esp32 things (x): other functions
- Interpretation of orientedrcnn papers
- Bottomsheetbehavior principle of realizing the home page effect of Gaode map
- Be careful of this hole in transmittable thread local
- 快应用中实现自定义抽屉组件
- QT connection to Shentong database
猜你喜欢
Qt连接神通数据库
[untitled]
Interference source current spectrum test of current probe
Using appbarlayout to realize secondary ceiling function
Opencv learning notes -day 11 (split() channel separation function and merge() channel merge function)
Summary of common pytoch APIs
VIM from dislike to dependence (21) -- cross file search
Rew acoustic test (VI): signal and measurement
Codeworks 5 questions per day (1700 for each) - the third day
Esp32 things (II): sharpening the knife without mistaking firewood - make preparations before project development
随机推荐
Redis design and Implementation (III) | interaction between server and client (event IO model)
Flink SQL custom connector
Introduction to MySQL foundation power node [Lao Du] class assignment
C#访问SQL Server数据库两种方式的比较(SqlDataReader vs SqlDataAdapter)
C # listbox how to get the selected content (search many invalid articles)
Talk about writing
Wechat development tool (applet)
Implementing custom drawer component in quick application
Esp32 things (VIII): music playing function of function development
127.0.0.1, 0.0.0.0 and localhost
Opencv learning notes -day 11 (split() channel separation function and merge() channel merge function)
Mmdet line by line deltaxywhbboxcoder
Bind threads to run on a specific CPU logical kernel
Introduction to the runner of mmcv
挖财开户安全吗?怎么有人说不靠谱。
Pytorch BERT
[untitled]
Use Huawei performance management service to configure the sampling rate on demand
Rew acoustic test (V): equipment required for test
el-input 限制只能输数字