Triển Khai API Nhận Diện Khuôn Mặt Trên Kubernetes và Ứng Dụng Di Động Sử Dụng React-Native

Khóa luận tốt nghiệp trình bày cách triển khai ứng dụng nhận diện khuôn mặt trên Kubernetes, tối ưu hóa hiệu suất và khả năng mở rộng.

Trường đại học

University of Information Technology

Chuyên ngành

Information Systems

Người đăng

Ẩn danh

Thể loại

graduation thesis

2023

65
1
0

Phí lưu trữ

30 Point

Mục lục chi tiết

1. CHƯƠNG 1: OVERVIEW

1.1. Reason

1.2. Scope

1.3. Objective

1.4. Thesis structure

1.5. Implementation plan

2. CHƯƠNG 2: LITERATURE REVIEW AND THEORETICAL BACKGROUND

2.1. FAISS

2.2. Kubernetes

2.3. Dataset

2.4. Face detection

2.5. Face recognition

3. CHƯƠNG 3: MODEL ARCHITECTURE

4. CHƯƠNG 4: IMPLEMENTATION

5. CHƯƠNG 5: CONCLUSION AND FUTURE VISION

REFERENCES

Tóm tắt

I. Tổng Quan Về Triển Khai API Nhận Diện Khuôn Mặt Trên Kubernetes

Triển khai API nhận diện khuôn mặt trên Kubernetes là một xu hướng công nghệ hiện đại. Việc sử dụng Kubernetes giúp quản lý và mở rộng ứng dụng một cách hiệu quả. Hệ thống này cho phép triển khai các microservices và dễ dàng tích hợp với các công nghệ khác như DockerMachine Learning.

1.1. Lợi Ích Của Việc Sử Dụng Kubernetes

Kubernetes cung cấp khả năng tự động hóa trong việc triển khai và quản lý ứng dụng. Điều này giúp giảm thiểu thời gian và công sức cho việc bảo trì hệ thống.

1.2. Tại Sao Chọn API Nhận Diện Khuôn Mặt

API nhận diện khuôn mặt mang lại nhiều ứng dụng thực tiễn trong các lĩnh vực như an ninh, quản lý nhân sự và marketing. Nó giúp tăng cường bảo mật và cải thiện trải nghiệm người dùng.

II. Thách Thức Trong Việc Triển Khai Ứng Dụng Di Động Sử Dụng React Native

Việc triển khai ứng dụng di động sử dụng React-Native gặp nhiều thách thức. Các vấn đề như hiệu suất, khả năng tương thích và bảo mật cần được xem xét kỹ lưỡng. Đặc biệt, việc tích hợp với API nhận diện khuôn mặt cũng đòi hỏi sự chú ý đến hiệu suất và độ chính xác.

2.1. Vấn Đề Về Hiệu Suất

Ứng dụng di động cần tối ưu hóa để đảm bảo hoạt động mượt mà. Việc sử dụng các thư viện nặng có thể làm giảm hiệu suất của ứng dụng.

2.2. Khả Năng Tương Thích

Đảm bảo ứng dụng hoạt động trên nhiều thiết bị và hệ điều hành khác nhau là một thách thức lớn. Cần phải kiểm tra kỹ lưỡng để tránh lỗi phát sinh.

III. Phương Pháp Triển Khai API Nhận Diện Khuôn Mặt Trên Kubernetes

Để triển khai API nhận diện khuôn mặt, cần thực hiện các bước như thiết kế kiến trúc hệ thống, lựa chọn công nghệ phù hợp và triển khai trên Kubernetes. Việc sử dụng Docker để đóng gói ứng dụng cũng là một phần quan trọng trong quy trình này.

3.1. Thiết Kế Kiến Trúc Hệ Thống

Kiến trúc hệ thống cần được thiết kế để đảm bảo tính mở rộng và khả năng phục hồi. Sử dụng các microservices giúp dễ dàng quản lý và bảo trì.

3.2. Lựa Chọn Công Nghệ Phù Hợp

Cần lựa chọn các công nghệ như TensorFlowFastAPI để phát triển API nhận diện khuôn mặt. Những công nghệ này hỗ trợ tốt cho việc xử lý hình ảnh và dữ liệu lớn.

IV. Ứng Dụng Thực Tiễn Của API Nhận Diện Khuôn Mặt

API nhận diện khuôn mặt có nhiều ứng dụng thực tiễn trong các lĩnh vực như an ninh, quản lý nhân sự và marketing. Việc tích hợp công nghệ này vào ứng dụng di động giúp nâng cao trải nghiệm người dùng và tăng cường bảo mật.

4.1. Ứng Dụng Trong An Ninh

Công nghệ nhận diện khuôn mặt được sử dụng để xác thực danh tính trong các hệ thống an ninh. Điều này giúp tăng cường bảo mật cho các khu vực nhạy cảm.

4.2. Ứng Dụng Trong Quản Lý Nhân Sự

API nhận diện khuôn mặt có thể được sử dụng để theo dõi thời gian làm việc của nhân viên, giúp cải thiện quy trình quản lý nhân sự.

V. Kết Luận Và Tương Lai Của Công Nghệ Nhận Diện Khuôn Mặt

Công nghệ nhận diện khuôn mặt đang phát triển nhanh chóng và có tiềm năng lớn trong tương lai. Việc triển khai API trên Kubernetes và ứng dụng di động sử dụng React-Native sẽ mở ra nhiều cơ hội mới cho các doanh nghiệp.

5.1. Tương Lai Của Công Nghệ Nhận Diện Khuôn Mặt

Công nghệ này sẽ tiếp tục phát triển và được áp dụng rộng rãi trong nhiều lĩnh vực khác nhau, từ an ninh đến chăm sóc sức khỏe.

5.2. Cơ Hội Cho Doanh Nghiệp

Doanh nghiệp có thể tận dụng công nghệ nhận diện khuôn mặt để cải thiện quy trình làm việc và nâng cao trải nghiệm khách hàng.

10/07/2025

Trích đoạn nội dung tài liệu

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.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ