I have made Iris-Recognition system
, implemented in both Matlab and Python.
🎉🎉🎉 21/08/2019: I have already created a new repository for solving Iris Recognition by using Deep Learning in https://github.com/AntiAegis/Iris-Recognition-PyTorch.
- Iris Recognition
- Table of contents
- I.Introduction
- II.Description
- III.Prerequisites
- IV.Folder structure
- V.MATLAB implementation
- VI.Python implementation
- During summer in 2017, I met my teacher in Digital Signal Processing course. He recommended me Biometrics topic. Since then, I have started exploring about Biometrics, such as Fingerprint, Iris, and Face.
- I searched on Internet and found out an open-source Iris Recognition model, which was written on Matlab. Thanks to the author of this open-source code, I could make my own system. Here is information about the author:
Libor Masek, Peter Kovesi. MATLAB Source Code for a Biometric Identification System Based on Iris Patterns. The School of Computer Science and Software Engineering, The University of Western Australia. 2003.
- Based on the available functions, I have modified, connected, and designed my individual system on Matlab. Subsequently, I have also converted Matlab version into Python one.
- My contribution is creating a GUI so that user can use it as a convenient software. Moreover, in my modified system, I utilized hardware to boost runtime performance in order to make it faster than the original version.
- The testing experiment shows that these two forms had fairly equal accuracy. In addition, because of the C++ platform, Matlab implementation is faster than Python.
- I notice that this system is not a real-world application. Clearly, a complete system must have a specific camera to capture iris inside eyes. However, these ones are extremely expensive. Therefore, I used an available image database on the Internet, called CASIA-IrisV1, to replace the costly camera. In this database, there are 108 people, each person has 7 eye images. All testing experiments are carried out using images in this database.
- Typically, a recognition system involves two operation modes, namely Enrollment and Verification. The former is extracting features from an eye image and save it into a template database, while the latter allows users extract their features and match with existing entities in the template database to identify the origination of the input image.
- Finally, Matlab version is equiped with a familiar GUI for convenient use, whereas, Python version is utilized all CPU cores of hardware for boosting the computation time.
- Since I made the GUI using App designer, and only updated versions of Matlab (from R2016a) have this feature, therefore to be able to run the code, your Matlab version must be R0216a or higher.
- The OS, which I'm using, is Ubuntu 16.04. In addition, the Python interpreter is Python 3.5.
- First, create a virtual environment using this link. In my case, the virtual environment is iris.
- Then, change the current working directory to "project_dir/python/" and install some python packages for the created virtual environment.
workon iris
cd Iris-Recognition/python/
pip install -r requirements.txt
.
+-- CASIA-database/
| +-- 001_1_1.jpg
| +-- ...
| +-- 108_2_4.jpg
|
+-- matlab/
| +-- fnc/
| +-- addcircle.m
| +-- ...
| +-- template-database/
| +-- 1.mat
| +-- ...
| +-- IrisRecognitionGUI.mlapp
|
+-- python/
| +-- fnc/
| +-- boundary.py
| +-- ...
| +-- template-database/
| +-- 1.mat
| +-- ...
| +-- path.py
| +-- enroll-all.py
| +-- enroll-single.py
| +-- verify.py
- Folder
CASIA-database
includes original eye images. My system uses images in this folder as the input. - Folder
matlab
is the implementation on Matlab language. Folderfnc
contains back-end functions for the GUI. Foldertemplate-database
stores registered template extracted from eye images. FileIrisRecognitionGUI.mlapp
is the GUI configuration for my system. - Folder
python
is the implemtation on Python language. In which, folderfnc
contains back-end functions. Foldertemplate-database
stores registered template extracted from eye images. Filepath.py
defines some essential paths. Fileenroll-all.py
is responsible for registering 108 accounts. Fileenroll-single.py
registers for a person, which is indicated by user. Fileverify.py
is used to verify an eye image.
- The picture below is the GUI of MATLAB.
- There are 3 modes:
Enrollment
,Verification
, andAccount infomation view
.Enrollment
means register an account template to the database so that you can verify a different eye image from the database in theVerification
mode. All account templates are anonymous that the name of template file doesn't reveal who owns it. Therefore,Account infomation view
can be used to see the information inside a template file.
- Select button
Image select...
, a select browser will appear for you to select an eye image for enrollment.
- Then, input the name and basic information that you want to store. Then, click button
Enroll
.
- A message will notify that the enrollment is successful.
- At this time, I haven't developed a feature to reject accounts that exist in the database. In future, I will fill into this blank.
- To verify an eye image, click button
Image select...
to select an image as instructions in theEnrollment
section. - Click button
Verify
. Then, a message will notify the verification state. In addition, information about the matched account will be shown as the following picture.
- Click button
View account...
to select the template file whose content you want to review. The result will be same as the picture below.
- First, change the current directory into foler
python
. Afterward, activate the virtual environment that has been installed OpenCV. Assume virtual environment namedcv
.
cd python/
workon cv
- To register the whole of 108 people in the CASIA database:
python3 enroll-all.py
- To register a specific person:
python3 enroll-single.py 099_1_3.jpg
- To verify a specific person:
python3 verify.py 008_2_2.jpg