SYSTEM DESIGN AND IMPLEMENTATION

Một phần của tài liệu Khóa luận tốt nghiệp Kỹ thuật máy tính: Nghiên cứu tích hợp thuật toán Arcface – CNN trên vi mạch Zynq 7020 cho việc nhận diện khuôn mặt (Trang 58 - 62)

3.1. Linux Implementation

3.1.1. Overview

The first installment our group did was Linux. The source code we using consist

of around 97% of C language, 2% of C++ and 1% of Cmake code. This OS has become an obvious for our group to run the source code. However, many libraries have to be installed so as to the code to run, such as OpenCV library and NCNN.

OpenCV is a cross-platform library using which we can develop real-time computer vision applications. It mainly focuses on image processing, video capture and analysis including features like face detection and object detection. Move on to the definition of Computer Vision, this term can be defined as a discipline that explains how to reconstruct, interrupt, and understand a 3D scene from its 2D images, in terms of the properties of the structure present in the scene. It deals with modeling and replicating human vision using computer software and hardware. And about NCNN is a high-performance neutral network inference computing framework supports for convolutional networks, supports multiple input and multi-branch structure, can calculate part of the branch. Supports multi-core parallel computing acceleration, ARM, GPU acceleration,... and so on. Therefore, with some adjustment in the source code, installation of libraries, the code can be run, camera can detect and recognize the individuals.

3.1.2. System Diagram

47

Input the name

of the person

Webcam starts to detect human face

Object Human FaceObject or

human face

Webcam takes 100

Biometrics Numbers

End the

process

Figure 32: Linux implementation system diagram

Our group will briefly explain about the steps in the diagram above. After we run the code on the Linux environment, the cmd will asked

48

us to type in the name of the person we want to get the biometrics

numbers. Then the webcam will started to detect the human in the

image in front of it, this step is controlled by the code we have already have. To avoid misunderstand between faces and objects, we have

already divided into two different cases. In situation one, which is

object detection, the screen will immediately print out the sentences:

“No face found in image” and then it will stop the process. On the

other hand, if the webcam detects a face, they will capture 100 photos, which will display as order and then the screen will print out 100

biometrics numbers. With that we can compare with the number we have already set in the code, the vector sector. After that we can

define who is who. Image convert to vector of 128 numbers via face

Figure 33: Example of the biometrics numbers

49

3.2. Vivado HLS Implementation

3.2.1. Implementation Theory

After our group has finished the implementation on the Linux environment, we decided to change our focus into the hardware environment which is Vivado HLS tool as we have mentioned above. Because our source code is based on the language of C/C++; therefore, choosing Vivado HLS is one of the obvious choice. The tool can allow to synthesis our code C/C++ into Verilog and hardware system

3.2.2. Implementation Practice

Although the tool Vivado HLS sound like an advantage for our group to execute our vision to implement Arcface algorithm down into hardware, reality this has many drawbacks. First of all, Vivado doesn’t support many libraries of C or C++ language; eventhough as we have mentioned above, some libraries do exist

in the Vivado tool, but still lacks of many other support. Our group have to find many libraries on the Internet to add in order for our source code to work. Moreover, the IDE converter is not fully support C/C++ functions. And one more time, our group have to fix and find more file or libraries for the Vivado tool to understand all the functions. And some variables disspear or lost during the convert phrase, and because of this, our group have to try to look and find different holes in the and fix it.

All the steps above sound like a solutions, but this is far from completion. Because of adding more libraries in, our memories and resources are drained out. The whole project have to run a large amount of code; therefore this slow down our process of fixing and synthesis the whole project. Thus, creating more and more drawbacks for our group, but we have already fix this by try to reduce our code down into the face detection or recognition only. This proves to increase some amount of speed and also make our project shorter. However, these drawbacks still keep us away from our final desitination.

50

.. YhaeelHG 20192 -ARCHACE CAUxniosngHelAeDsaifoxnndiVamfVhsdoAfcACG - 9

[Be Gt Boje Son Window Her

Cee Tit bs xioiRi2@ i8

Sie °

+8 MACE

— fh ateringh

roars Pree panes

Pence

——

inom

Sem Soar

Samos deo

reo waregs ôORC SHEi5Iz8xE=z=s

to "xc0:838-clg4ã-T A

Seals ere brennan mm cướp: file 7 ý... Raorts/e dot nbc. cp

7 ovate iat den hese abe fate ever oe hep’ Ae wat food

[pple etter ns

nana

EE > ằ--- a =

Figure 34: Vivado HLS implemetation 3.3. Project Implementaion Process

Một phần của tài liệu Khóa luận tốt nghiệp Kỹ thuật máy tính: Nghiên cứu tích hợp thuật toán Arcface – CNN trên vi mạch Zynq 7020 cho việc nhận diện khuôn mặt (Trang 58 - 62)

Tải bản đầy đủ (PDF)

(68 trang)