{"id":94,"date":"2024-02-22T09:44:48","date_gmt":"2024-02-22T14:44:48","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/?p=94"},"modified":"2024-02-22T09:44:48","modified_gmt":"2024-02-22T14:44:48","slug":"karens-status-report-for-2-24","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/2024\/02\/22\/karens-status-report-for-2-24\/","title":{"rendered":"Karen&#8217;s Status Report for 2\/24"},"content":{"rendered":"<p><span style=\"font-weight: 400\">This week I implemented head pose estimation. My implementation involves solving the perspective-n-point pose computation problem. The goal is to find the rotation that minimizes the reprojection error from 3D-2D point correspondences. I am using 5 points on the face for these point correspondences: I have the 3D points of a face that is looking forward without any points obtained using MediaPipe\u2019s facial landmarks. I then solve for the Euler angles given the rotation matrix. This gives the roll, pitch, and yaw of the head, which tells us if the user\u2019s head is pointed away from the screen or looking around the room. The head pose estimator module is on GitHub <\/span><a href=\"https:\/\/github.com\/karenjennyli\/focus-tracker\/blob\/main\/video_processing\/head_pose_estimator.py\"><span style=\"font-weight: 400\">here<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">I also began experimenting with phone pick-up detection. My idea is to use a combination of hand detection and phone object detection to detect the user picking up and using their phone. I am using MediaPipe\u2019s hand landmark detection that can detect where a phone is detected in the frame. For object detection, I looked into various algorithms, including SSD (Single-Shot object Detection) and YOLO (You Only Look Once). After reviewing some papers [<\/span><a href=\"https:\/\/www.ijert.org\/object-detection-using-yolo-and-mobilenet-ssd-a-comparative-study\"><span style=\"font-weight: 400\">1<\/span><\/a><span style=\"font-weight: 400\">, <\/span><a href=\"https:\/\/arxiv.org\/pdf\/2109.02119.pdf\"><span style=\"font-weight: 400\">2<\/span><\/a><span style=\"font-weight: 400\">] on these algorithms, I decided to go with YOLO for its higher performance.<\/span><\/p>\n<p><span style=\"font-weight: 400\">I was able to find some pre-trained YOLOv5 models for mobile phone detection on Roboflow. Roboflow is a platform that streamlines the process of building and deploying computer vision models and allows for the sharing of models and datasets. One of the models and datasets is linked <\/span><a href=\"https:\/\/universe.roboflow.com\/m17865515473-163-com\/mobilephone-wusj2\"><span style=\"font-weight: 400\">here<\/span><\/a><span style=\"font-weight: 400\">. Using Roboflow\u2019s <\/span><a href=\"https:\/\/inference.roboflow.com\/using_inference\/native_python_api\/\"><span style=\"font-weight: 400\">inference Python API<\/span><\/a><span style=\"font-weight: 400\">, I can load this model and use it to perform inference on images. Two other models [<\/span><a href=\"https:\/\/universe.roboflow.com\/phone-detection-dmdak\/phone-f7l35\/model\/1?webcam=true\"><span style=\"font-weight: 400\">1<\/span><\/a><span style=\"font-weight: 400\">, <\/span><a href=\"https:\/\/universe.roboflow.com\/vodafone-proyect\/mobile-detector-perfector\/model\/1?webcam=true\"><span style=\"font-weight: 400\">2<\/span><\/a><span style=\"font-weight: 400\">] performed pretty similarly. They all had trouble recognizing the phone when it was tilted in the hand. I think I will need a better dataset with images of people holding the phone in hand rather than just the phone by itself. I was able to find this <\/span><a href=\"https:\/\/www.kaggle.com\/datasets\/lakshyataragi\/mobilephoneusagedatasetiitr\/data\"><span style=\"font-weight: 400\">dataset<\/span><\/a><span style=\"font-weight: 400\"> on Kaggle.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Overall, my progress is on schedule. In the following week, I hope to train and test a smartphone object detection model that performs better than the pre-trained models I found online. I will then try to integrate it with the hand landmark detector to detect phone pick-ups.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the screenshots below, the yaw is negative when looking left and the yaw is positive when looking right.<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-96\" style=\"font-size: 1rem\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/left-300x190.png\" alt=\"\" width=\"300\" height=\"190\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/left-300x190.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/left-768x487.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/left-1024x649.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/left.png 1440w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-98\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/right-300x190.png\" alt=\"\" width=\"300\" height=\"190\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/right-300x190.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/right-768x487.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/right-1024x649.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/right.png 1440w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><span style=\"font-weight: 400\">Below are screenshots of the pre-trained mobile phone object detector and MediaPipe\u2019s hand landmark detector.<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-97\" style=\"font-size: 1rem\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/phone-300x181.png\" alt=\"\" width=\"300\" height=\"181\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/phone-300x181.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/phone-768x463.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/phone-1024x617.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/phone.png 1440w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-95\" style=\"font-size: 1rem\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/hand-300x181.png\" alt=\"\" width=\"300\" height=\"181\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/hand-300x181.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/hand-768x463.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/hand-1024x617.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-content\/uploads\/sites\/302\/2024\/02\/hand.png 1440w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<div id=\"accel-snackbar\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This week I implemented head pose estimation. My implementation involves solving the perspective-n-point pose computation problem. The goal is to find the rotation that minimizes the reprojection error from 3D-2D point correspondences. I am using 5 points on the face for these point correspondences: I have the 3D points of a face that is looking &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/2024\/02\/22\/karens-status-report-for-2-24\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Karen&#8217;s Status Report for 2\/24&#8221;<\/span><\/a><\/p>\n","protected":false},"author":842,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[3],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/posts\/94"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/users\/842"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":2,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":100,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/posts\/94\/revisions\/100"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s24-teame0\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}