In today's world, with the continuous progress of technology, biometric recognition has become one of the hot topics in the field of security and identity verification. Technologies such as facial recognition, fingerprint recognition, iris matching, and palm print recognition have gained significant attention. Among them, palm print recognition technology, as a method of biometric identification, is highly precise and secure, leading to increased adoption in various application areas, including finance, security, logistics, and intelligent access control. This article will explain how to deploy an open-source palm print recognition algorithm on an embedded system with X86 architecture.
In this article, we mainly describe the open source library for palmprint recognition: EDCC-Palmprint-Recognition, and it runs on the youyeetoo X1 development board (x86 development board) of Hot Wheels Technology.
youyeetoo X1 is an x86 architecture single-board computer (SBC) launched by youyeetoo Tech from Shenzhen. It can run the full-featured versions of Windows and Linux, featuring low cost and high performance with an 11th generation Intel CPU N5105. It is primarily targeted towards the AIOT (Artificial Intelligence of Things) and automatic control markets. The board has a compact size of only 115 * 75mm, yet it offers a rich set of interfaces, including 3 UART ports, 2 HDMI ports, 6 USB ports, 1 I2C port, 1 SPI port, 5 GPIO ports, and the ability to connect a 7-inch MIPI touchscreen.
EDCC-Palmprint-Recognition link: https://github.com/Leosocy/EDCC-Palmprint-Recognition
"Palmprint recognition technology has unique advantages over other biometric identification methods, making it a widely used biometric authentication method. The following are some other biometric identification methods related to fingerprints, faces, iris, DNA, signatures, and gait. Advantages over technology”
1. Advantages over fingerprints:Larger identification area: The identification area of palmprint is larger than that of fingerprints and contains richer information, which can improve accuracy.
Less susceptible to damage: Palm prints are relatively stable, not easily damaged or affected by external factors, and have long-term stability.
Lower image resolution requirements: Relatively low image resolution requirements mean that the acquisition equipment is cheaper and relatively economical.
2. Advantages over human faces:Not affected by external factors: Palm prints are not affected by factors such as glasses, expressions, makeup, etc., and their stability is higher.
User-friendly: User acceptance is higher because palmprint collection methods are usually more user-friendly and require no special preparation or cooperation.
3. Advantages over iris and DNA:Lower cost of collection equipment: Compared with iris scanners or DNA collection equipment, palmprint collection equipment is cheaper and easier to deploy.
4. Advantages over behavioral characteristics such as signature and gait:Not affected by habits: Palmprint recognition is not affected by individual behavioral habits and will not change due to people's signatures or gait habits.
Feature stability: Palmprint features do not change over time, thus improving long-term recognition accuracy.
Basic methods of palmprint recognition:The database is created by collecting registered samples, performing preprocessing and feature extraction, and then forming a database.
Feature database retrieval collects the sample to be tested, and after preprocessing and extracting features, matches it with the data in the palmprint database to obtain the category of the sample to be tested.
Palmprint feature extraction method:"Palmprint feature extraction methods are mainly divided into four categories, namely structure-based methods, statistics-based methods, subspace-based methods and coding-based methods.”
1. The structure-based method mainly uses the direction and position information of the main lines and folds in the palmprint to realize palmprint recognition. This method is the most intuitive. However, no matter which edge detection operator is used, it cannot extract all the lines, so this method has poor practicality and has been gradually abandoned.
2. Statistics-based methods mainly use statistical features, such as mean, variance, etc., to form a set of feature vectors used to describe palmprint images. They can be divided into local statistical variable methods and global statistical methods based on whether they are divided into blocks. The method based on local statistics divides the image into several small blocks, counts the statistical information of each small block separately, and then combines these statistical information to represent the statistical feature vector of the entire palmprint, such as using Fourier transform, wavelet transform, etc. This method obtains the statistical information of each block of the palmprint image and performs recognition.
3. The subspace-based method treats the original palmprint image as an ordinary picture pattern, and converts the high-dimensional matrix corresponding to the picture into a low-dimensional vector or matrix through a projection mapping operation. According to the implementation method of projection transformation, it is divided into linear subspace method and nonlinear subspace method. Commonly used subspace feature extraction methods include principal component analysis (PCA), FisherPalm method, BDPCA (Bi-directional PCA), etc.
4. The encoding-based method treats the palmprint image as a texture image and encodes the texture image according to certain rules. Zhang et al. proposed a coding method called PalmCode, which first uses 2DGabor to filter the image, and then encodes it based on the positive and negative values of the real and imaginary parts of the filtering result. Kong et al. proposed to use Gabor filters in six directions to filter palmprint images and encode the direction with the smallest amplitude, which is called competitive code. Since competitive coding examines the directional information of the palmprint image and is not sensitive to illumination, the recognition accuracy is very high.
EDCC algorithm"EDCC algorithm: It is an efficient and accurate palmprint recognition algorithm.”
- Palm prints are full of line and texture features and contain rich directional information. Therefore, orientation-based coding is considered the most effective palmprint feature extraction method. Competitive coding is one of the most recognizable coding methods. It uses filters in different directions to convolve with the palmprint image, and then encodes the palmprint image according to certain coding rules.
2. The EDCC algorithm has the following key points:
- The original palmprint image is processed by an image enhancement operator to make the lines more prominent and the extracted direction more accurate.
- The image is filtered using a set of 2DGabor wavelet filters with different orientations.
- Select the direction with the largest and second largest filter response value as the main direction and secondary direction of the ridge where the point is located, and then encode it.
The youyeetoo X1 development board needs to install the ubuntu system. For the ubuntu installation process, please refer to the article: https://cloud.tencent.com/developer/tools/blog-entry?target=https://mp.weixin.qq.com/s?__biz=MzU4NTc0ODE5OQ==&mid=2247488678&idx=1&sn=09d100f81bf14d49707f13a66901fcec&scene=21#wechat_redirect&source=article&objectId=2356978
OpenCV installation- 1.The EDCC algorithm relies on OpenCV, and the supported versions are OpenCV 3.4 or OpenCV 4.5.
2. Install OpenCV dependent libraries
1.rice@rice:~/edcc$ sudo apt-get update
2.rice@rice:~/edcc$ sudo apt-get install build-essential
3.rice@rice:~/edcc$ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
4.rice@rice:~/edcc$ sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
Download and install OpenCV, download link: https://github.com/opencv/opencv/archive/4.5.0.zip
Compile OpenCV
Execute the cmake command to generate the makefile:
1.rice@rice:~/edcc$ cd opencv-4.5.0/
2.rice@rice:~/edcc/opencv-4.5.0$ mkdir -p build && cd build
3.rice@rice:~/edcc/opencv-4.5.0/build$ cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=Release -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_ENABLE_NONFREE=True ..
Specify make to build the project:
1.rice@rice:~/edcc/opencv-4.5.0/build$ sudo make -j6
Instal OpenCV
1. rice@rice:~/edcc/opencv-4.5.0/build$ sudo make installEnvironment configuration
Modify etc/bash.bashrc
1.rice@rice:~/edcc/opencv-4.5.0/build$ sudo gedit /etc/bash.bashrc
Add some content at the end of the file and save it
1. rice@rice:~/edcc/opencv-4.5.0/build$ PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
2. rice@rice:~/edcc/opencv-4.5.0/build$ export PKG_CONFIG_PATH
Update environment configuration
1.sudo updatedb
2.source /etc/bash.bashrc
Check OpenCV installation
1.rice@rice:~/edcc/opencv-4.5.0/build$ pkg-config --modversion opencv4 #View version number
2. rice@rice:~/edcc/opencv-4.5.0/build$ pkg-config --libs opencv4 #View libs library
Environment setup
Download the source code. The code of the EDCC algorithm is hosted on github. The link is: https://github.com/Leosocy/EDCC-Palmprint-Recognition.git. We clone it through git:
1.rice@rice:~/edcc$ git clone https://github.com/Leosocy/EDCC-Palmprint-Recognition.git
2.Cloning into 'EDCC-Palmprint-Recognition'...
3.remote: Enumerating objects: 1188, done.
4.remote: Counting objects: 100% (44/44), done.
5.remote: Compressing objects: 100% (39/39), done.
6.remote: Total 1188 (delta 6), reused 23 (delta 4), pack-reused 1144
7.Receiving objects: 100% (1188/1188), 193.15 KiB | 78.00 KiB/s, done.
8.Resolving deltas: 100% (556/556), done.
9.rice@rice:~/edcc$
Create a build directory. Benefits: The files of the build process are placed in a unified directory:
1.rice@rice:~/edcc$ cd EDCC-Palmprint-Recognition
2.rice@rice:~/edcc/EDCC-Palmprint-Recognition$ mkdir -p build && cd build
3.rice@rice:~/edcc/EDCC-Palmprint-Recognition/build$
Build EDCC algorithm code
1.rice@rice:~/edcc/EDCC-Palmprint-Recognition/build$ cmake ..
2.rice@rice:~/edcc/EDCC-Palmprint-Recognition/build$ sudo make install
Install EDCC python package
1.rice@rice:~/edcc/EDCC-Palmprint-Recognition$ cd pypackage
2. rice@rice:~/edcc/EDCC-Palmprint-Recognition/pypackage$ sudo python3 setup.py install
The above steps complete the establishment of the EDCC algorithm environment.
EDCC algorithm verificationDownload the palmprint image for testing. The EDCC algorithm open source library provides a download script for our verification function.
1. rice@rice:~/edcc/EDCC-Palmprint-Recognition/$ cd palmprint_data
2. rice@rice:~/edcc/EDCC-Palmprint-Recognition/palmprint_data$ ./download.sh
1. EDCC provides three types of examples: C code examples, C++ code examples, and python code examples. We verify the functionality using EDCC's python code example.
The compared pictures in the python code example are a_01.bmp and b_01.bmp
The two pictures compared are as follows:
After executing the command verification, the comparison score of the two palmprint pictures is: 0.08799048751486326
1.rice@rice:~/edcc/EDCC-Palmprint-Recognition/$ cd ./examples/py_example
2.rice@rice:~/edcc/EDCC-Palmprint-Recognition/examples/py_example$ python3 example.py
1. The open source license of the EDCC open source library is MIT.
2. The author also provides a detailed explanation of the principle of EDCC: https://blog.leosocy.top/posts/4354/
3. Deploying AI capabilities in youyeetoo X1 is undoubtedly a good choice.
Comments
Please log in or sign up to comment.