当前位置:网站首页>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 .
边栏推荐
- Find the number that appears only once in the array
- Esp32 things (V): analysis of common API of esp32 of Swiss Army knife
- Opencv learning notes-day6-7 (scroll bar operation demonstration is used to adjust image brightness and contrast, and createtrackbar() creates a scroll bar function)
- Metasploit practice - SSH brute force cracking process
- Raspberry pie 4B no screen installation system and networking using VNC wireless projection function
- C#访问SQL Server数据库两种方式的比较(SqlDataReader vs SqlDataAdapter)
- Source code interpretation of detectron2 1--engine
- Flink sql -- No factory implements ‘org.apache.flink.table.delegation.ExecutorFactory‘.
- C#訪問SQL Server數據庫兩種方式的比較(SqlDataReader vs SqlDataAdapter)
- Mmdet line by line code interpretation of positive and negative sample sampler
猜你喜欢

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

Introduction to the runner of mmcv

Opencv learning notes -day4 image pixel reading and writing operations (array traversal and pointer traversal implementation, uchar vec3b data type and mat class functions mat:: at(), mat:: ptr())

Opencv learning notes-day5 (arithmetic operation of image pixels, add() addition function, subtract() subtraction function, divide() division function, multiply() multiplication function

Opencv learning notes-day6-7 (scroll bar operation demonstration is used to adjust image brightness and contrast, and createtrackbar() creates a scroll bar function)

Flink SQL 自定义 Connector

Opencv learning notes -day8 (keyboard typing (waitkey()); Wait for typing) action: triggers some action when the appropriate character is typed using the keyboard)

Mmdet line by line deltaxywhbboxcoder

快应用中实现自定义抽屉组件

A troubleshooting of CPU bottom falling
随机推荐
Rew acoustic test (III): generate test signal
Coredata acquisition in swift sorting, ascending, descending
Conversion between map, string and JSON
C#访问SQL Server数据库两种方式的比较(SqlDataReader vs SqlDataAdapter)
Comparaison de deux façons d'accéder à la base de données SQL Server (sqldatareader vs sqldataadapter)
icon资源
[paid promotion] collection of frequently asked questions, FAQ of recommended list
Tidb v6.0.0 (DMR): initial test of cache table - tidb Book rush
mysql基础入门 day3 动力节点[老杜]课堂笔记
Detailed explanation of pipline of mmdetection
Redis design and Implementation (III) | interaction between server and client (event IO model)
el-input 限制只能输数字
Esp32 things (V): analysis of common API of esp32 of Swiss Army knife
Redis design and Implementation (II) | database (deletion strategy & expiration elimination strategy)
QT downloading files through URL
[kotlin collaboration process] complete the advanced kotlin collaboration process
[untitled]
PHP API to obtain QR code and combine to generate pictures
VIM from dislike to dependence (21) -- cross file search
Flink Sql -- toAppendStream doesn‘t support consuming update and delete changes which