TRƯỜNG ĐẠ I H Ọ C NAM C ẦN THƠ KHOA K Ỹ THU Ậ T – CÔNG NGH Ệ NGUY ỄN VĂN ĐIỀ U MSSV 176289 S Ử D Ụ NG GI Ả I THU Ậ T ANN (ARTIFICIAL NEURAL NETWORK) ĐỂ XÂY D Ự NG H Ệ TH Ố NG NH Ậ N DI Ệ N CH Ữ S Ố VI Ế T TAY ĐỒ ÁN T Ố T NGHI Ệ P Ngành Công Ngh ệ Thông tin Mã s ố Ngành: 7480201 05-2021 TRƯỜNG ĐẠ I H Ọ C NAM C ẦN THƠ KHOA K Ỹ THU Ậ T – CÔNG NGH Ệ NGUY ỄN VĂN ĐIỀ U MSSV: 176289 S Ử D Ụ NG GI Ả I THU Ậ T ANN (ARTIFICIAL NEURAL NETWORK) ĐỂ XÂY D Ự NG H Ệ TH Ố NG NH Ậ N DI Ệ N CH Ữ S Ố VI Ế T TAY ĐỒ ÁN T Ố T NGHI Ệ P Ngành Công Ngh ệ Thông tin Mã s ố Ngành: 7480201 GI ẢNG VIÊN HƯỚ NG D Ẫ N TS NGÔ H Ồ ANH KHÔI 05-2021 i CH Ấ P THU Ậ N C Ủ A H ỘI ĐỒ NG Bài báo cáo đồ án th ự c t ậ p, do sinh viên Nguy ễn Văn Điề u th ự c hi ện dướ i s ự hướ ng d ẫ n c ủ a TS Ngô H ồ Anh Khôi Bài báo cáo này đã báo cáo và đượ c H ộ i đồ ng ch ấ m khóa lu ậ n thông qua Ủ y viên Thư ký (Ký tên) (Ký Tên) --------------------------------------- --------------------------------------- GHI CH Ứ C DANH, H Ọ , TÊN GHI CH Ứ C DANH, H Ọ , TÊN Ph ả n bi ệ n 1 Ph ả n bi ệ n 2 (Ký tên) (Ký tên) --------------------------------------- --------------------------------------- GHI CH Ứ C DANH, H Ọ , TÊN GHI CH Ứ C DANH, H Ọ , TÊN Cán b ộ hướ ng d ẫ n Ch ủ t ị ch H ội đồ ng (Ký tên) (Ký tên) --------------------------------------- -------------------------------------- GHI CH Ứ C DANH, H Ọ , TÊN GHI CH Ứ C DANH, H Ọ , TÊN ii NH Ậ N XÉT C ỦA GIÁO VIÊN HƯỚ NG D Ẫ N ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ C ần Thơ, Ngày… tháng… năm 2021 Giáo viên hướ ng d ẫ n (Ký tên) TS NGÔ H Ồ ANH KHÔI ii NH Ậ N XÉT C Ủ A GIÁO VIÊN PH Ả N BI Ệ N ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· C ần Thơ, Ngày… tháng… năm 2021 Giáo viên ph ả n bi ệ n (Ký tên) ThS HU Ỳ NH BÁ L Ộ C iii L Ờ I C Ả M T Ạ L ời đầ u tiên em xin chân thành c ảm ơn đế n quý Th ầ y, Cô Trong th ờ i gian qua, th ầy đã rấ t t ận tình hướ ng d ẫn để chúng em hoàn thành đồ án này Em xin c ảm ơn quý thầ y cô Khoa K ỹ thu ậ t – Công ngh ệ Trường Đạ i h ọ c Nam C ần Thơ đã tậ n tâm gi ả ng d ạ y và truy ền đạ t cho em nh ữ ng ki ế n th ức quý báu để em hoàn thi ện chương trình họ c t ại trường Đồ ng th ời, em cũng rấ t c ảm ơn Chủ t ị ch H ội đồ ng qu ả n tr ị , Ban Giám hi ệ u Trường Đạ i h ọ c Nam C ần Thơ đã tạo điề u ki ệ n v ề th ời gian, không gian để em có th ể hoàn thành nhi ệ m v ụ h ọ c t ậ p c ủ a mình M ặc dù, em đã có rấ t nhi ề u c ố g ắ ng n ỗ l ực để hoàn thành đồ án nhưng vẫ n không tránh kh ỏ i nh ữ ng thi ế u sót Kính mong nh ận đượ c s ự đóng g óp ý ki ế n c ủ a quý th ầ y cô Em xin chân thành c ảm ơn! C ầ n T hơ, ngày … tháng … năm 2021 Ngườ i th ự c hi ệ n IV L ỜI CAM ĐOAN Tôi xin cam k ế t khóa lu ận này đượ c hoàn thành d ự a trên các k ế t qu ả nghiên c ứ u c ủ a tôi và các k ế t qu ả nghiên c ứu này chưa đượ c dùng cho b ấ t c ứ khóa lu ậ n cùng c ấ p nào khác C ầ n T hơ, ngày … tháng … năm 2021 Ngườ i th ự c hi ệ n V M Ụ C L Ụ C CHƯƠNG 1 GIỚ I THI Ệ U 1 1 1 Gi ớ i thi ệ u v ề công ty 1 1 1 1 Thông tin v ề công ty 1 1 1 2 Tr ụ s ở chính 1 1 1 3 Người đạ i di ệ n theo pháp lu ậ t: 1 1 1 4 Thông tin li ệ n h ệ 1 1 1 5 Ngành ngh ề kinh doanh 2 1 1 6 S ả n ph ẩ m và d ị ch v ụ đang kinh doanh 3 1 2 Đặ t v ấn đề nghiên c ứ u 6 1 3 M ụ c tiêu nghiên c ứ u 7 1 3 1 M ụ c tiêu chung 7 1 3 2 M ụ c tiêu c ụ th ể 8 CHƯƠNG 2 CƠ SỞ LÝ LU ẬN VÀ PHƯƠNG PHÁP NGHIÊN CỨ U 9 2 1 Cơ sở lý lu ậ n 9 2 2 Phương p háp nghiên c ứ u 9 2 2 1 Phương pháp nghiên cứ u lý thuy ế t 9 2 2 2 Phương pháp nghiên cứ u th ự c nghi ệ m 9 2 2 3 Phương pháp điề u tra 10 2 3 Gi ớ i thi ệ u v ề b ộ cơ sở d ữ li ệ u Mnist 10 2 3 1 Gi ớ i thi ệ u 10 2 3 2 L ị ch s ử 11 2 4 Gi ớ i thi ệ u v ề ngôn ng ữ Python 11 CHƯƠNG 3 GI Ả I THU Ậ T ANN TRONG NH Ậ N D Ạ NG CH Ữ S Ố VI Ế T TAY 14 3 1 Gi ớ i thi ệ u v ề v ề gi ả i thu ậ t ANN ( Neural Network) 14 3 1 1 Gi ớ i thi ệ u chung 14 3 1 2 Neural nhân t ạ o 15 3 1 3 Mô hình m ạ ng neural nhân t ạo và phương thứ c làm vi ệ c 17 VI 3 1 4 Các lu ậ t h ọ c 21 3 2 Gi ớ i thi ệ u v ề nh ậ n d ạ ng ANN 25 3 3 Xây d ự ng mô hình d ự báo ANN 26 3 4 Phương pháp MLP 27 3 5 Sơ đồ Use case chương trình 28 3 6 Quá trính nh ậ n d ạ ng ch ữ s ố vi ế t tay 28 3 6 1 Đưa dữ li ệu đầ u vào 28 3 6 2 Cá c thư việ n 28 3 6 3 S ử d ụ ng gi ả i thu ật ANN để nh ậ n d ạ ng 28 CHƯƠNG 4 KẾ T QU Ả NGHIÊN C Ứ U 31 4 1 Xu ấ t k ế t qu ả 31 4 2 Giao di ệ n 33 4 3 Hướ ng d ẫ n s ử d ụ ng 34 4 4 Hướ ng d ẫn cài đặ t 41 CHƯƠNG 5 KẾ T LU Ậ N 42 DANH SÁCH HÌNH Hình 2 1 B ộ cơ sở d ữ li ệ u mnist 10 Hình 3 1 Mô hình m ộ t neuron nhân t ạ o 15 Hình 3 2 Đồ th ị các d ạ ng hàm truy ề n 17 Hình 3 3 M ạ ng neural ba l ớ p 18 Hình 3 4 M ạ ng truy ề n th ẳ ng m ộ t l ớ p 20 Hình 3 5 M ạ ng truy ề n th ẳ ng nhi ề u l ớ p 20 VII Hình 3 6 M ạ ng h ồ i ti ế p m ộ t l ớ p 21 Hình 3 7 M ạ ng neural h ồ i quy 21 Hình 3 8 C ấ u trúc hu ấ n luy ệ n m ạ ng neural 22 Hình 3 9 H ọ c có giám sát 23 Hình 3 10 H ọ c không có giám sát 23 Hình 3 11 Sơ đồ c ấ u trúc chung c ủ a quá trình h ọ c 24 Hình 4 3 Bi ểu đồ test 31 Hình 5 5 Giao di ệ n chính 33 VIII DANH M Ụ C T Ừ VI Ế T T Ắ T ANN Artificial Neural Network MLP Multilayer Perceptrons LR Learning Rate
TRƯỜNG ĐẠI HỌC NAM CẦN THƠ KHOA KỸ THUẬT – CÔNG NGHỆ NGUYỄN VĂN ĐIỀU MSSV 176289 SỬ DỤNG GIẢI THUẬT ANN (ARTIFICIAL NEURAL NETWORK) ĐỂ XÂY DỰNG HỆ THỐNG NHẬN DIỆN CHỮ SỐ VIẾT TAY ĐỒ ÁN TỐT NGHIỆP Ngành Công Nghệ Thông tin Mã số Ngành: 7480201 05-2021 TRƯỜNG ĐẠI HỌC NAM CẦN THƠ KHOA KỸ THUẬT – CÔNG NGHỆ NGUYỄN VĂN ĐIỀU MSSV: 176289 SỬ DỤNG GIẢI THUẬT ANN (ARTIFICIAL NEURAL NETWORK) ĐỂ XÂY DỰNG HỆ THỐNG NHẬN DIỆN CHỮ SỐ VIẾT TAY ĐỒ ÁN TỐT NGHIỆP Ngành Công Nghệ Thông tin Mã số Ngành: 7480201 GIẢNG VIÊN HƯỚNG DẪN TS.NGÔ HỒ ANH KHÔI 05-2021 CHẤP THUẬN CỦA HỘI ĐỒNG Bài báo cáo đồ án thực tập, sinh viên Nguyễn Văn Điều thực hướng dẫn TS.Ngô Hồ Anh Khôi Bài báo cáo báo cáo Hội đồng chấm khóa luận thông qua Ủy viên Thư ký (Ký tên) (Ký Tên) - - GHI CHỨC DANH, HỌ, TÊN GHI CHỨC DANH, HỌ, TÊN Phản biện Phản biện (Ký tên) (Ký tên) - - GHI CHỨC DANH, HỌ, TÊN GHI CHỨC DANH, HỌ, TÊN Cán hướng dẫn Chủ tịch Hội đồng (Ký tên) (Ký tên) - GHI CHỨC DANH, HỌ, TÊN GHI CHỨC DANH, HỌ, TÊN i NHẬN XÉT CỦA GIÁO VIÊN HƯỚNG DẪN ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ ······································································································ Cần Thơ, Ngày… tháng… năm 2021 Giáo viên hướng dẫn (Ký tên) TS NGÔ HỒ ANH KHÔI ii NHẬN XÉT CỦA GIÁO VIÊN PHẢN BIỆN ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· ······························································································· Cần Thơ, Ngày….tháng… năm 2021 Giáo viên phản biện (Ký tên) ThS HUỲNH BÁ LỘC ii LỜI CẢM TẠ Lời em xin chân thành cảm ơn đến quý Thầy, Cô Trong thời gian qua, thầy tận tình hướng dẫn để chúng em hồn thành đồ án Em xin cảm ơn quý thầy cô Khoa Kỹ thuật – Công nghệ Trường Đại học Nam Cần Thơ tận tâm giảng dạy truyền đạt cho em kiến thức quý báu để em hoàn thiện chương trình học trường Đồng thời, em cảm ơn Chủ tịch Hội đồng quản trị, Ban Giám hiệu Trường Đại học Nam Cần Thơ tạo điều kiện thời gian, khơng gian để em hồn thành nhiệm vụ học tập Mặc dù, em có nhiều cố gắng nỗ lực để hồn thành đồ án khơng tránh khỏi thiếu sót Kính mong nhận đóng góp ý kiến quý thầy cô Em xin chân thành cảm ơn! Cần Thơ, ngày … tháng … năm 2021 Người thực iii LỜI CAM ĐOAN Tôi xin cam kết khóa luận hồn thành dựa kết nghiên cứu kết nghiên cứu chưa dùng cho khóa luận cấp khác Cần Thơ, ngày … tháng … năm 2021 Người thực IV MỤC LỤC CHƯƠNG GIỚI THIỆU 1.1 Giới thiệu công ty 1.1.1 Thông tin công ty 1.1.2 Trụ sở .1 1.1.3 Người đại diện theo pháp luật: 1.1.4 Thông tin liện hệ 1.1.5 Ngành nghề kinh doanh 1.1.6 Sản phẩm dịch vụ kinh doanh 1.2 Đặt vấn đề nghiên cứu 1.3 Mục tiêu nghiên cứu 1.3.1 Mục tiêu chung 1.3.2 Mục tiêu cụ thể CHƯƠNG CƠ SỞ LÝ LUẬN VÀ PHƯƠNG PHÁP NGHIÊN CỨU 2.1 Cơ sở lý luận 2.2 Phương pháp nghiên cứu 2.2.1 Phương pháp nghiên cứu lý thuyết 2.2.2 Phương pháp nghiên cứu thực nghiệm 2.2.3 Phương pháp điều tra 10 2.3 Giới thiệu sở liệu Mnist 10 2.3.1 Giới thiệu 10 2.3.2 Lịch sử .11 2.4 Giới thiệu ngôn ngữ Python 11 CHƯƠNG GIẢI THUẬT ANN TRONG NHẬN DẠNG CHỮ SỐ VIẾT TAY 14 3.1 Giới thiệu về giải thuật ANN ( Neural Network) 14 3.1.1 Giới thiệu chung 14 3.1.2 Neural nhân tạo .15 3.1.3 Mơ hình mạng neural nhân tạo phương thức làm việc .17 V 3.1.4.Các luật học .21 3.2 Giới thiệu nhận dạng ANN 25 3.3 Xây dựng mơ hình dự báo ANN 26 3.4 Phương pháp MLP 27 3.5 Sơ đồ Use case chương trình 28 3.6 Quá trính nhận dạng chữ số viết tay .28 3.6.1 Đưa liệu đầu vào 28 3.6.2 Các thư viện .28 3.6.3 Sử dụng giải thuật ANN để nhận dạng 28 CHƯƠNG KẾT QUẢ NGHIÊN CỨU 31 4.1 Xuất kết 31 4.2.Giao diện 33 4.3 Hướng dẫn sử dụng 34 4.4 Hướng dẫn cài đặt 41 CHƯƠNG KẾT LUẬN 42 DANH SÁCH HÌNH Hình 2.1 Bộ sở liệu mnist 10 Hình 3.1 Mơ hình neuron nhân tạo 15 Hình 3.2 Đồ thị dạng hàm truyền 17 Hình 3.3 Mạng neural ba lớp 18 Hình 3.4 Mạng truyền thẳng lớp 20 Hình 3.5 Mạng truyền thẳng nhiều lớp 20 VI Hình 3.6 Mạng hồi tiếp lớp 21 Hình 3.7 Mạng neural hồi quy .21 Hình 3.8 Cấu trúc huấn luyện mạng neural .22 Hình 3.9 Học có giám sát 23 Hình 3.10 Học khơng có giám sát 23 Hình 3.11 Sơ đồ cấu trúc chung trình học 24 Hình 4.3 Biểu đồ test 31 Hình 5.5 Giao diện 33 VII DANH MỤC TỪ VIẾT TẮT ANN Artificial Neural Network MLP Multilayer Perceptrons LR Learning Rate VIII