I build an Iris-Recognition system
, implemented on both Matlab and Python languages.
- Iris Recognition
- Table of contents
- I.Introduction
- II.Description
- III.Prerequisites
- IV.Folder structure
- V.MATLAB implementation
- VI.Python implementation
- In the last summer 2017, I met my teacher in the course Digital Signal Processing. He recommended me Biometrics topic. Since there, I have started exploring about Biometrics, such as Fingerprint, Iris, and Face.
- I searched on the Internet and found out an open-source Iris Recognition model, which written on Matlab. Thanks to the author of this open-source code, I can build up 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 this 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 this as a convenient software. Moreover, in my modified system, I utilized hardware to boost the runtime performance to make is faster, comparing to the original version.
- The testing experiment shows that these two forms had fairly equal accuracy. In addition, because of the C++ platform, Matlab implementation seems faster a little bit 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 will use an available image database on the Internet, called CASIA-IrisV1, to replace the costly camera. In this database, there are totally 108 people, each person has 7 eye images. All testing experiments are carried out using images in this database.
- Typically, a recognition system witnesses 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, who it belongs to.
- Finally, Matlab version is equiped a familiar GUI for convenient use, whereas, Python version is utilized all CPU cores of hardware for boosting the computation time.
- Because I write the GUI using App designer, and only update versions of Matlab (from R2016a) have this feature. Therefore, to be able to run 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, named
cv
, and install OpenCV library oncv
using this link. - Then, install some python packages inside
cv
using pip:
workon cv
pip install numpy
pip install scipy
pip install scikit-image
.
+-- 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 will use images in this folder as the input. - Folder
matlab
is the implementation on Matlab language. In which, 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 belongs to who in 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. Afterward, click button
Enroll
.
- A message show will notify that the enrollment is successful.
- At this time, I haven't develop a feature to reject accounts that exist in the database. In the future, I will fill into this blank.
- To verify an eye image to see who is is, click button
Image select...
to select an image as instructions in theEnrollment
section. - Click button
Verify
. Then, a message 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 that you hope to see its content. 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 that that 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