当前位置:网站首页>To: k210 realizes face recognition (code interpretation attached)
To: k210 realizes face recognition (code interpretation attached)
2022-06-30 06:07:00 【Drunken thoughts】
be based on K210 Face recognition access control based on ( One )
Enter the official website to get the face recognition source code https://maixpy.sipeed.com/zh/
One 、 Get the machine code
Click on maixhub, Go in and click obtain key_gen Machine code 
Click to download this zip, After decompression, you will get a file named key_gen_v1.2 Of bin file , Will be bin Burn the file to the development board , Use kflash_gui Software , If you can't burn, please look for it in my last article .
https://blog.csdn.net/HuangChen666/article/details/113954656
(PS: If the following steps are not successful , Then it's best to erase the whole piece of firmware first , Then burn the firmware )
Burn well key_gen_v1.2.bin after , Use any serial port terminal software , For example, before debugging 32 When using the serial port debugging assistant 、putty、MaixPy All terminals in the are OK , Here I use putty demonstration :
Choose your own here com mouth ( There are usually two when the board is inserted com mouth , Select the previous ), Then the baud rate is changed to 115200, Press the reset key of the board after opening , The terminal will output the machine code of your board , It's best to copy it and save it to txt In the document , Because it will be used later .
Two 、 Get face recognition model
Model get link
https://www.maixhub.com/modelInfo?modelId=14
Slide to the bottom and click the download button , If you don't have an account, you need to register .
Then paste your machine code and click “ Submit ”, You can get the face model zip.
Download to get a machine code as the name of kfpkg file , Use this file directly klash_gui Software burning to the development board .
3、 ... and 、 Run face recognition code
Face recognition code acquisition
link :https://pan.baidu.com/s/1VU9ij7qnOGNLalbUCKZUiA
Extraction code :sgdv
use MaixPy Connect the development board to run the code , So far, the basic face recognition function has been completed , The above code contains Chinese comments , It is convenient for everyone to understand the code , The above is also the source code provided by the boss on the official website , But this is just to let us know about the process of face recognition .
According to the code , It is mainly divided into the following processes :
1、 Load various models
2、 function Face detection model , Find the face position in the picture and frame the face
3、 Convert the cut face image into kpu Received format
4、 function Face 5 Point key model , Get the left eye 、 Right eye 、 nose 、 Left corner of mouth 、 The position of the right corner of the mouth
5、 The original image and face image are Affine transformation , Transformation for Face image , Turn the face image into kpu Format
6、 Use Face 196 Witt eigenvalue model Calculate the... Of the face picture 196 Witt's eigenvalue , Calculate the final Facial features feature
Then compare the obtained face features with the previously saved face features to get a set of scores , Choose the largest score , And the score exceeds 85 branch ( You can set it yourself ) It is assumed that the person has been identified , And from... According to the corresponding subscript names Get the person's name in the list .
Four 、 summary
So far, the most basic face recognition function has been realized , But you will find that the functions provided by the source code are only given in advance in the code Mr.x full name , Obviously, it is impossible to realize the power-off storage of faces , If you want to realize the power-off storage of face feature values , We need to prepare one SD card , Save to flash You can also do so. , But memory is limited after all , It is recommended to save to SD card .
So let's share it here first , The next article will share how I realized the power-off storage of faces .
---------------------
author : Morning Shao hc
source :CSDN
original text :https://blog.csdn.net/HuangChen666/article/details/113995079
Copyright notice : This is the author's original article , Please attach a link to the blog post !
Content analysis By:CSDN,CNBLOG One click reprint plugin for blog posts
边栏推荐
- Related applications of priority queue
- Create uiactionsheet [duplicate] - creating uiactionsheet [duplicate]
- [GPU] basic operation
- Is it safe to open an account online? Can you open an account to speculate on the Internet?
- UE4_ Editor development: highlight the UI making method according to the assets dragged by the mouse (1)
- Leetcode56. consolidation interval
- OSPF - authentication and load balancing summary (including configuration commands)
- Who doesn't want a blog site of their own - build a blog site WordPress
- Huxiaochun came to fengshu electronics to sign a strategic cooperation agreement with Zoomlion
- MySQL高级SQL语句
猜你喜欢

MySQL index

Today, Ali came out with 35K. It's really sandpaper that wiped my ass. it showed me my hand

MySQL log management, data backup and recovery

MySQL事物

Here comes the nearest chance to Ali

Summary of redis learning notes (I)

MySQL storage system

JS prototype chain object function relationship

MySQL advanced SQL statement

Installation and initialization of MariaDB database
随机推荐
Golang之手写web框架
Cisco VXLAN配置
Develop stylelint rules from zero (plug-ins)
Is it safe to open an account online? Can you open an account to speculate on the Internet?
【数据库】事务
Multithreading advanced level
Here comes the nearest chance to Ali
Voting vault: a new primitive for defi and Governance
MySQL存储系统
[database] transaction
46. 全排列-dfs双百代码
超简单 STM32 RTC闹钟 时钟配置
How to print pthread_ t - How to print pthread_ t
Common NPM install errors
Balanced binary tree judgment of Li Kou 110 -- classic problems
Inno setup the simplest user-defined interface effect
Turn off automatic outlining in Visual Studio - turning off automatic outlining in Visual Studio
C language code record
ES6扩展运算符(...)
从底层结构开始学习FPGA----RAM IP核及关键参数介绍