1. Trang chủ
  2. » Luận Văn - Báo Cáo

Ước lượng chỉ số bất thường của dáng đi dựa trên dữ liệu khung xương

71 24 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

ĐẠI HỌC ĐÀ NẴNG TRƯỜNG ĐẠI HỌC BÁCH KHOA LÊ LONG BẢO C C R L T ƯỚC LƯỢNG CHỈ SỐ BẤT THƯỜNG CỦA DÁNG ĐI DỰA TRÊN DỮ LIỆU KHUNG XƯƠNG DU LUẬN VĂN THẠC SĨ KHOA HỌC MÁY TÍNH Đà Nẵng – Năm 2020 ĐẠI HỌC ĐÀ NẴNG TRƯỜNG ĐẠI HỌC BÁCH KHOA LÊ LONG BẢO C C ƯỚC LƯỢNG CHỈ SỐ BẤT THƯỜNG CỦA DÁNG R L T ĐI DỰA TRÊN DỮ LIỆU KHUNG XƯƠNG DU Chuyên ngành : Khoa học máy tính Mã số : 8480101 LUẬN VĂN THẠC SĨ KHOA HỌC MÁY TÍNH Người hướng dẫn khoa học: TS Huỳnh Hữu Hưng Đà Nẵng – Năm 2020 -i- LỜI CAM ĐOAN Tôi xin cam đoan cơng trình nghiên cứu riêng tơi hướng dẫn trực tiếp TS Huỳnh Hữu Hưng Mọi tham khảo dùng luận văn trích dẫn rõ ràng tên tác giả, tên cơng trình, thời gian, địa điểm công bố Mọi chép không hợp lệ, vi phạm quy chế đào tạo, hay gian trá, tơi xin chịu hồn tồn trách nhiệm Tác giả C C DU R L T Lê Long Bảo -ii- TÓM TẮT ĐỀ TÀI ƯỚC LƯỢNG CHỈ SỐ BẤT THƯỜNG CỦA DÁNG ĐI DỰA TRÊN DỮ LIỆU KHUNG XƯƠNG Học viên: Lê Long Bảo Chuyên ngành: Khoa học máy tính Mã số: 8480101 Khóa:36 Trường Đại học Bách khoa – ĐHĐN Tóm tắt – Phân tích dáng người trở thành mối quan tâm đặc biệt với ngành cơng nghệ thị giác máy tính Trong năm gần C C phát triển công nghệ cảm biến vào thiết bị phần cứng camera giúp mang lại nhiều lợi ích lĩnh vực này, R L T Tuy nhiên có nhược điểm liệu thu nhận DU dạng video hình ảnh Trong luận văn tập trung vào việc phân tích dáng người bình thường hay bất thường dựa liệu thu nhận từ khung xương Luận văn bao gồm nội dung sau: (1) Nghiên cứu tổng quan dáng đi, giai đoạn phương pháp phân tích dáng (2) Giải pháp đề xuất (3) Triển khai nhận xét Từ khóa – dáng bất thường, phát dáng bất thường, liệu khung xương, kinect, khớp nối khung xương -iii- ESTIMATING ABNORMAL GAIT BASED ON SKELETON DATA Abstract - Human gait analysis has becomes of special interest to computer vision community in recent years The recently developed commodity depth sensors in camera bring new opportunities in this domain However, the disadvantages of this is the input data come from video or image In this paper, we focus on detecting the human gait using skeleton data in order to classify normal human gait and abnormal ones and estimate agait abnormality index based on skeletal information C C The thesis includes the following contents: (1) Research about the normal gait, gait cycle and the method (2) The solution to detect R L T abnormal gait based on skeleton data (3) Deploy, analyze and evaluate DU the results of the system Key words - abnormal gait, abnormal gait detection, skeleton data, joints skeletal -iv- MỤC LỤC LỜI CAM ĐOAN i TÓM TẮT ĐỀ TÀI ii MỤC LỤC iv DANH MỤC CÁC HÌNH ẢNH vi DANH MỤC BẢNG BIỂU viii DANH MỤC TỪ VIẾT TẮT ix MỞ ĐẦU 1 LÝ DO CHỌN ĐỀ TÀI MỤC TIÊU VÀ NHIỆM VỤ C C 2.1 Mục tiêu 2.2 Nhiệm vụ R L T ĐỐI TƯỢNG VÀ PHẠM VI NGHIÊN CỨU 3.1 Đối tượng DU 3.2 Phạm vi nghiên cứu PHƯƠNG PHÁP NGHIÊN CỨU 4.1 Phương pháp nghiên cứu tài liệu 4.2 Phương pháp nghiên cứu thực nghiệm BỐ CỤC LUẬN VĂN CHƯƠNG NGHIÊN CỨU TỔNG QUAN 1.1 GIỚI THIỆU 1.2 TỔNG QUAN VỀ DÁNG ĐI 1.2.1 Phân loại dáng bất thường 1.2.2 Biểu lâm sàng dáng 1.3 CÁC PHƯƠNG PHÁP PHÂN TÍCH DÁNG ĐI 1.3.1 Dựa vào đặc trưng 1.3.2 Dựa vào mô hình 1.4 CÁC GIAI ĐOẠN TRONG DÁNG ĐI Ở NGƯỜI 10 1.4.1 Giai đoạn tựa 12 -v- 1.4.2 Giai đoạn đu đưa 13 1.4.3 Các đặc điểm chuyển động 14 CHƯƠNG 2: GIẢI PHÁP ĐỀ XUẤT 16 2.1 TỔNG QUAN ĐỀ XUẤT 16 2.2 XÂY DỰNG DỮ LIỆU 17 2.2.1 Tổng quan Kinect 17 2.2.2 Xây dựng liệu khung xương với Kinect 18 2.3 DỮ LIỆU ĐẦU VÀO 20 2.4 TRÍCH CHỌN ĐẶC TRƯNG 22 2.5 HUẤN LUYỆN 24 2.5.1 Xây dựng mơ hình phân lớp sử dụng HMM để huấn luyện 24 C C 2.5.2 Phân lớp bình thường bất thường: 29 R L T 2.6 CHỈ SỐ VÀ CÁCH ĐO LƯỜNG CHỈ SỐ 31 2.6.1 Chỉ số 31 DU 2.6.2 Đo lường số 31 2.6.3 Bảng số áp dụng liệu huấn luyện thử nghiệm 36 CHƯƠNG 3: TRIỂN KHAI VÀ NHẬN XÉT 37 3.1 DỮ LIỆU THỬ NGHIỆM 37 3.2 NGÔN NGỮ C# VÀ THƯ VIỆN HỌC MÁY 39 3.2.1 Ngôn ngữ C# 39 3.2.2 Thư viện Accord NET 40 3.3 KẾT QUẢ THỬ NGHIỆM 41 KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN 43 TÀI LIỆU THAM KHẢO 44 PHỤ LỤC 46 -vi- DANH MỤC CÁC HÌNH ẢNH Số hiệu Tên hình vẽ Trang 1.1 Ảnh dáng bất thường 1.2 Chu kỳ bước 10 1.3 Chuyển động góc khớp chạm gót 11 1.4 Chuyển động góc khớp đáp ứng tải 12 1.5 Chuyển động góc khớp tựa 12 1.6 Chuyển động học góc đu đưa 13 1.7 Chuyển động học góc cuối đu đưa 1.8 Nhịp bước chân chu kỳ dáng 2.1 Ảnh mơ hình tổng quát 2.2 Ảnh thiết bị Kinect 17 2.3 Vị trí 15 khớp xương dùng thư viện OpenNI 18 2.4 Vị trí 20 khớp xương dùng thư viện Microsoft 19 2.5 Chuỗi hoạt động dáng leo cầu thang 19 2.6 Ảnh mô xây dựng liệu 20 2.7 Minh họa trích xuất 15 vị trí xương khớp thành raw data 21 2.8 Ví dụ nội dung file text với chuỗi khung hình 21 2.9 Số lượng chuỗi khung hình bắt đầu kết thúc 21 2.10 Nhóm chuỗi khung xương gán nhãn 22 2.11 Vị trí khớp xương dùng cho việc trích chọn đặc trưng 22 2.12 Các đặc trưng dựa vào dáng người từ khung xương 23 R L T U D C C 13 15 16 -vii- 2.13 Trích xuất đặc trưng từ liệu thơ 15 vị trí 23 2.14 Minh họa file liệu sau xử lý góc 24 2.15 Ví dụ mơ hình Markov 28 2.16 Sự tiến hóa theo thời gian mơ hình Markov ẩn 28 2.17 Đưa liệu cần quan sát dự đoán 29 2.18 Ảnh chuỗi sequence liệu huấn luyện 29 2.19 Ảnh nhãn sequence 30 2.20 Ảnh chuỗi sequence data đầu vào 30 2.21 Minh họa file liệu đầu vào 32 2.22 Kết chạy cho liệu trainning đánh giá Accuracy 33 2.23 Kết dùng ma trận chiều 34 3.1 Kết đo lường liệu huấn luyện 42 3.2 Kết đo lường liệu test 42 R L T C C DU -viii- DANH MỤC BẢNG BIỂU Số hiệu Tên bảng Trang 1.1 Bảng chu kỳ bước 11 2.1 Bảng số áp dụng 36 3.1 Bảng mô tả loại liệu 37 3.2 Mơ tả kích thước liệu bình thường dựa số frame 38 3.3 Mơ tả kích thước liệu bất thường thường dựa số frame 38 3.4 Mô tả liệu thử nghiệm DU R L T C C 41 -46- PHỤ LỤC Mẫu code tạo model để huấn luyện static readonly string[] listFileTestingAbnormalPath = new string[4]{ @"C:\AI\TestFileAfterReformat\Subject11_RL.txt", @"C:\AI\TestFileAfterReformat\Subject9_RL.txt", @"C:\AI\TestFileAfterReformat\Subject11_StopX2.txt", @"C:\AI\TrainingFileAfterReformat\Subject6_Normal3.txt"}; static int numberOfFeatures = 5; static int numberOfClass = 2; C C static int numberOfState = 2; var initialDensity = new MultivariateNormalDistribution(numberOfFeatures); R L T var classifier = new HiddenMarkovClassifier( classes: numberOfClass, topology: new Forward(numberOfState), initial: initialDensity); DU // Configure the learning algorithms to train the sequence classifier var teacher = new HiddenMarkovClassifierLearning( classifier, modelIndex => new BaumWelchLearning( classifier.Models[modelIndex]) { Tolerance = 0.0001, Iterations = 0, FittingOptions = new NormalOptions() { Diagonal = true, // only diagonal covariance matrices Regularization = 1e-5 // avoid non-positive definite errors }}); -47- Mẫu code huấn luyện đo lường số // Extract predicted label double[] predictedTrainingOutput = new double[ListTrainingSequences.Count]; for (int i = 0; i < predictedTrainingOutput.Length; i++) { double likelihood; predictedTrainingOutput[i] = classifier.Compute(ListTrainingSequences[i], out likelihood); double logLikeHood = classifier.LogLikelihood(ListTrainingSequences[i]); } // Check performance model C C R L T var roc = new ReceiverOperatingCharacteristic(Labels.ToArray(), predictedTrainingOutput); DU roc.Compute(100); // Extract predicted label double[] predictedTestingOutput = new double[ListTestingSequences.Count]; for (int i = 0; i < predictedTestingOutput.Length; i++) { double likelihood; predictedTestingOutput[i] = classifier.Compute(ListTestingSequences[i], out likelihood); double logLikeHood = classifier.LogLikelihood(ListTestingSequences[i]); } int[] predictedTestingExpected = { 1, 1, 1, }; // Check performance model var rocTesting = new ReceiverOperatingCharacteristic(predictedTestingExpected, predictedTestingOutput); rocTesting.Compute(100); // confusion matrix -48- int[] predictedTraining = new int[ListTrainingSequences.Count]; for (int i = 0; i < predictedTrainingOutput.Length; i++) { double likelihood; predictedTraining[i] = classifier.Compute(ListTrainingSequences[i], out likelihood); double logLikeHood = classifier.LogLikelihood(ListTrainingSequences[i]); } var cm = new GeneralConfusionMatrix(classes: 2, expected: Labels.ToArray(), predicted: predictedTraining); // We can obtain the proper confusion matrix using: C C int[,] matrix = cm.Matrix; R L T // And multiple performance measures: double accuracy = cm.Accuracy; DU double chanceAgreement = cm.ChanceAgreement; double geommetricAgreement = cm.GeometricAgreement; double pearson = cm.Pearson; double kappa = cm.Kappa; double tau = cm.Tau; double chiSquare = cm.ChiSquare; // and some of their standard errors: double kappaStdErr = cm.StandardError; double kappaStdErr0 = cm.StandardErrorUnderNull; double mse = new SquareLoss(Array.ConvertAll(Labels.ToArray(), x => x)).Loss(predictedTrainingOutput); double mse1 = new SquareLoss(Array.ConvertAll(predictedTestingExpected.ToArray(), x => x)).Loss(predictedTestingOutput); Console.Write(" \n"); Console.Write("Training \n"); Console.Write(" \n"); -49- // Print training data and predict with accuracy Console.WriteLine(String.Format(@"Label training data : 0: Normal and 1: Abnormal")); Console.WriteLine("[{0}]", string.Join(", ", Labels.ToArray().ToList())); Console.Write("\n"); Console.WriteLine(String.Format(@"Predicted training data : 0: Normal and 1: Abnormal")); Console.WriteLine("[{0}]", string.Join(", ", predictedTraining.ToArray().ToList())); Print2DArray(matrix); Console.WriteLine(String.Format(@"Accuracy training data :{0}", accuracy)); C C Console.Write(" \n"); R L T Console.Write(" \n"); Console.Write("Test \n"); DU Console.Write(" \n"); // Print testing data and predict with accuracy Console.WriteLine(String.Format(@"Label testing data : 0: Normal and 1: Abnormal")); Console.WriteLine("[{0}]", string.Join(", ", predictedTestingExpected)); Console.Write(" \n"); Console.WriteLine(String.Format(@"Predicted testing data : 0: Normal and 1: Abnormal")); Console.WriteLine("[{0}]", string.Join(", ", predictedTestingOutput.ToArray().ToList())); int[] predictedTestingOutputs = new int[ListTestingSequences.Count]; for (int i = 0; i < predictedTestingOutput.Length; i++) { double likelihood; predictedTestingOutputs[i] = classifier.Compute(ListTestingSequences[i], out likelihood); double logLikeHood = classifier.LogLikelihood(ListTestingSequences[i]); -50- } var cmTesting = new GeneralConfusionMatrix(classes: 2, expected: predictedTestingExpected, predicted: predictedTestingOutputs); // We can obtain the proper confusion matrix using: int[,] matrixTesting = cmTesting.Matrix; // And multiple performance measures: double accuracyTesting = cmTesting.Accuracy; Print2DArray(matrixTesting); Console.WriteLine(String.Format(@"Accuracy testing data :{0}", accuracyTesting)); C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T C C DU R L T ... TRƯỜNG ĐẠI HỌC BÁCH KHOA LÊ LONG BẢO C C ƯỚC LƯỢNG CHỈ SỐ BẤT THƯỜNG CỦA DÁNG R L T ĐI DỰA TRÊN DỮ LIỆU KHUNG XƯƠNG DU Chuyên ngành : Khoa học máy tính Mã số : 8480101 LUẬN VĂN THẠC SĨ KHOA HỌC... Tổng số frame 19 30 19 19 16 19 Bảng 3 Mơ tả kích thước liệu bất thường thường dựa số frame Đối với liệu bất thường với nhiều kiểu liệu bất thường nhỏ mơ tả cáo cáo quy dự đoán lớp bất thường. .. bình thường hay bất thường C C Dữ liệu thử nghiệm luận văn phân làm loại liệu bình thường bất bình thường với bất bình thường chia làm loại R L T mô tả sau: Loại liệu Bình thường DU Chỉ số Sequence

Ngày đăng: 15/12/2020, 00:09

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w