VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY ADVANCED PROGRAM IN INFORMATION SYSTEMS VU NGOC HAO NGUYEN CONG PHUONG NAM GRADUATION THESIS DEPLOYING A FACE RECOGNITION API ON KUBERNETES AND MOBILE APPLICATION FRAME USING REACT-NATIVE Ho Chi Minh City, 2023 VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY ADVANCED PROGRAM IN INFORMATION SYSTEMS VU NGOC HAO NGUYEN CONG PHUONG NAM GRADUATION THESIS DEPLOYING A FACE RECOGNITION API ON KUBERNETES AND MOBILE APPLICATION FRAME USING REACT-NATIVE INSTRUCTOR PH.D DO TRONG HOP Ho Chi Minh City, 2023 2 ASSESSMENT COMMITTEE The Assessment Committee is established under the Decision. , date " by Rector of the University of Information Technology. ĐẠI HỌC QUỐC GIA TP. HO CHÍMINH CONG HOA XÃ HỘI CHỦ NGHĨA VIỆT NAM TRƯỜNG ĐẠI HỌC a ra Ũ CÔNG NGHỆ THÔNG TIN Độc Lập - Tự Do - Hạnh Phúc TP.
NHAN XET KHOA LUAN TOT NGHIEP CUA CAN BO HUONG DAN Tên khóa luân: DEPLOYING A FACE RECOGNITION API ON KUBERNETES AND MOBILE APPLICATION FRAME USING REACT-NATIVE Nhóm SV thực hiện: Cán bộ hướng dẫn: Vii Ngọc Hào - 17521299 TS. Đỗ Trọng Hợp Nguyễn Công Phương Nam - 17520778 Đánh giá Khóa luận 1. Vé cuôn báo cáo: Số bảng số liệu:.- Số hình vẽ: .-- Số tài liệu tha. Sản phẩm: Một số nhận xét về hình thức cuốn báo cáo: 4.
Về thái độ làm việc của sinh viên: Danh gid Chung? 0. Điểm từng sinh viên: Vũ Ngọc Hào:. /10 Nguyễn Công Phương Nam:. /10 Người nhận xét (Ký tên và ghi rõ họ tên) ĐẠI HỌC QUÓC GIA TP.
HÒ CHÍMINH CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM TRƯỜNG ĐẠI HỌC Ty. „ CÔNG NGHỆ THÔNG TIN Độc Lập - Tự Do - Hạnh Phúc TP. NHẬN XÉT KHÓA LUẬN TÓT NGHIỆP CUA CÁN BO PHAN BIEN DEPLOYING A FACE RECOGNITION API ON KUBERNETES AND MOBILE APPLICATION FRAME USING REACT-NATIVE Nhóm SV thực hiện: Cán bộ phản biện: Vũ Ngọc Hào - 17521299 TS. Lê Kim Hùng Nguyễn Công Phương Nam - 17520778 Đánh giá Khóa luận 1.
Vé cuôn báo cáo: SỐ trang:.--ccccecccccrrrrree Số chương: .-------- Số bảng số liệu:.--- Số hình vẽ:.-- Số tài liệu tham khảo. Về chương trình ứng dụng: 4. Về thái độ làm việc của sinh viên: Danh gid Chung? 0. Điểm từng sinh viên: Vũ Ngọc Hào:.
/10 Nguyễn Công Phương Nam:. /10 Người nhận xét (Ký tên và ghi rõ họ tên) Thank You The graduation thesis is the result of the author's work, research and study during his time in the lecture hall of the University of Information Technology. The author could not have completed the graduation thesis well without the care and dedicated help of teachers, friends and family. First of all, the team would like to express our sincere thanks to the staff of the University of Information Technology - Vietnam National University, Ho Chi Minh City.
Ho Chi Minh and the Faculty of Information Systems have created a favorable environment and conditions, helping the author to have the basic knowledge as a basis to carry out the thesis. In particular, the author would like to express deep gratitude and deepest gratitude to the instructor — Ph. Do Trong Hop. He directly guided, corrected and contributed many valuable comments to help the author successfully complete his graduation thesis.
Besides, the author would like to thank his family, relatives and friends of the same course for encouraging, encouraging and supporting the author mentally during the completion of the graduation thesis. During one semester of project implementation, the author has applied the accumulated background knowledge, combined with learning and researching new knowledge to complete a project report best way. However, in the implementation process, the author cannot avoid shortcomings. Therefore, the author is looking forward to receiving suggestions from the teachers in order to improve the knowledge that the author has studied and to be a preparation for the author to carry out other topics in the future.
Thank you very much, teachers! Ho Chi Minh City, February 2023 Vu Ngoc Hao Nguyen Cong Phuong Nam UNIVERSITY OF INFORMATION TECHNOLOGY Advanced ADVANCED PROGRAM Education Program IN INFORMATION SYSTEMS THESIS PROPOSAL THESIS TITLE: DEPLOYING A FACE RECOGNITION API ON KUBERNETES AND MOBILE APPLICATION FRAME USING REACT-NATIVE.D D6 Trong Hop Duration: from 05/09/2022 to 31/12/2022 Students: e@ Vũ Ngọc Hào - 17521299 e Nguyễn Công Phương Nam - 17520778 Contents: Target: - Building a frame of mobile application face recognition based on a large user face registration. - Basic functionality of the application: o Provide a demo application for the face recognition. ©_ Provide 2 options: ® Mobile application for demo. e Register and recognition api.
Scope: Based on Face Detection, Face Recognition, Minio for high performance search and saved image. Based on frameworks Tensorflow, React Native, Fastapi, py-torch, torch-lighting. Deployment environment: Docker-compose or Docker-swarm or K8s. The frame of the mobile app still be able to be export in to intalliable file in .aab format but for easy to demo, i will using expo to launch my mobile app frame.
Objective: - Selecting the suitable machine learning model. © Goal: Selecting the right model that has fast convergence rates and light-weight. o Content: Based on Triplet Loss, Arcface, Cosface for evaluating and selecting models. co Expected results: Model selected and weights saved of the model.
- Selecting the inputs is crucial. © Goal: Aim to high convergence for the model. © Content: Based on test train, famous face recognition paper. co Expected results: model extracts facial features and encodes it into vector.
- Al-Backend server will be deployed, application will be built on physical mobile device. ° Goal: Deploy AI - Backend server as a restful-api server, and application can run on a physical mobile device. o Content: ® Design AI- Backend server and deploy using Docker. ® Design Mobile applications that interact with AI-Backend servers, register, recognition face api co Expected results: Successfully building a mobile application for demonstration.
- Result: © Provide an implementable apis and tracking mobile application frame. Methodology: - Parallel research and implementation. - Distributed system design. Result: - Building a successful mobile application on a physical mobile device for demonstration.
- This system can deal with a large face register and high availability. Research timelines: - Research about Tensorflow modeling, Fastapi, py-torch, torch-lighting and integrate them together (2 weeks). - Research about flutter, building an example react native application (1,5 weeks). - Selecting machine learning model (1,5 weeks).
10 Research training input types for suggestion models, developing models for training (3 weeks). Training in data enrichment from Ifw (3 weeks). Deploy backend server using docker (1 weeks). Prepare a document for the thesis report (4 week).
References Document: o Machine learning model: * face recognition: https://arxiv. * triplet loss for face embedding: https://arxiv. Approved by the advisor Ho Chi Minh city, 05/09/2022 Signature of advisor Signature of student VU NGOC HAO NGUYEN CONG PHUONG NAM DO TRONG HOP 11 Contents THESIS PROPOSAL List of figures. Reason, Scope and Objective 1.
Implementation plan Chapter 2. LITERATURE REVIEW AND THEORETICAL BACKGROUND 2. Nginx proxy manager:. Research about React Native.
Research about Ngrok 2. Research about Expo. Research about Expo Camera. Research about Expo FaceDetector.
Research about Expo ImageManipulator 2. Research about Canvas Chapter 3. HH2 HH HH HH 1 1 11g 3. co th HH H111 re Chapter 4.
Face recognition API. HH HH gi 4. HH gà ngư 4. APT face reC0gTnÏfÏOI.
nh ngHnH ng Ho TH ng tr 4. Getting all faC€s. co co nh. Minio console UI for manager.
S1 3t >Ev tr g rngg gtrrư 4. User ÍnferÍaCe. Demo fun€fiOIS. CONCLUSION AND FUTURE VISION.
nh HH HH HT TH TH HH1 HT HH0 T1 T111 11k rkrk 5.111 REFERENCES 13 List of figures 2.1 Workflow FAISS library work 20 2.2 The components of a Kubernetes cluster 21 2.3 Dataset sample English 22 2.4 Dataset sample challenge 23 2.5 Face checking process 24 2.7 Algorithm comparison image 26 2.8 Minlo provides storage space 27 2.10 Network architecture 29 1 Example Nginx proxy manager UI usage 2 Example nginx gateway status 31 3 Example nginx route config 31 Overview system architecture 35 3.2 Restful-API-core overview 3.6 Face tracking general workflow 42 3.7 Face processing detail workflow 44 3.8 Face processing detail workflow 46 3.9 Apply nginx in Kubernetes for management 47 4.3 API logging after start service manually 50 14 4.5 Test register url 52 4.6 Test Search url 53 4.7 Test get all registered faces API 54 4.8 Test delete a registered face 55 4.9 Test delete a registered user 56 4.10 Minio manager storage 57 4.11 Minio manager storage (cont’s) 57 4.12 Function handle crops face 60 4.13 Function handle face identify 61 4.14 The main page return result 62 15 Chapter 1. Overview Nowadays, information technology is developing day by day. The application of information technology in business is very popular. Today's businesses are too familiar with the application of information technology to their activities from simple or complex jobs.
The world of technology is still changing every day and is increasingly simplifying everything, finding the fastest solution to any problem. To keep up with the times, we must constantly adapt to the world and develop ourselves. The more businesses grow, the more employees there are, gradually making the job of managing employees more and more difficult. To ensure personal interests and to control more easily.
Therefore, it is very important to build an attendance program to suit the situation. Current timekeepers mainly use fingerprints, or some places use face recognition fixed in one place. Using these technologies still has certain limitations. Therefore, we chose the research topic of face recognition that can be used on the phone to replace fixed attendance in one place.
“Deploying a face recognition api on Kubernetes and Mobile application frame using react-native. Reason, Scope and Objective 1.1 Reason: The reason this system was born is because of the inconvenience in timekeeping when businesses have flexible working areas. While it is too expensive to install a whole camera system for timekeeping, my system solves this problem by facial recognition. The reason this thesis does not use available libraries for processing for face recognition is because of limitations in personalization, management and system implementation: © Cannot separate the database and the system API separately, difficult to expand the system.
It also reduces the availability of the whole system. © It is not possible to increase or decrease local resources when a small part of the system needs excessive resources. 16 © Can't integrate faiss to find use gpu to speed up when data becomes big data. Scope With this graduate thesis, the main goal that I aim for when doing this is as follows: o Provide an implementable apis and tracking mobile application frame.
o Based on face detection, Face recognition, Minio for high performance search and saved image. o Based on frameworks Tensorflow, react native, fastapi, py-torch, torch- lighting. o Deployment environment: Docker-compose or Docker-swarm or K8s. Objective - Selecting the suitable machine learning model.
o Goal: Selecting the right model that has fast convergence rates and light- weight. o Content: Based on triplet loss, arcface, cosface for evaluating and selecting models. o Expected results: Model selection and weights saved of the model. - Selecting the inputs is crucial.
o Goal: Aim to high convergence for the model. o Content: Based on test train, famous face recognition paper. o Expected results: model extracts facial features and encodes it into vector. - AI-Backend server will be deployed, application will be built on physical mobile device.
o Goal: Deploy AT - Backend server as a restful-API server, and application can run on a physical mobile device. o Content: ® Design AI- Backend server and deploy using Docker.