{"id":22,"date":"2023-05-08T15:34:25","date_gmt":"2023-05-08T19:34:25","guid":{"rendered":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/?page_id=22"},"modified":"2023-12-16T23:12:34","modified_gmt":"2023-12-17T03:12:34","slug":"method","status":"publish","type":"page","link":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/","title":{"rendered":"Spring 2023 Method &amp; Experiments"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"405\" src=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png\" alt=\"\" class=\"wp-image-107\" srcset=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png 1024w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-300x119.png 300w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-768x304.png 768w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1536x608.png 1536w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-2048x811.png 2048w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><figcaption class=\"wp-element-caption\">Fig 1: Current origami state estimation pipeline<\/figcaption><\/figure>\n\n\n\n<p>We are interested in building an advanced system that can use a camera to automatically track the progress of the user in real time and provide folding instructions overlaid on the tracked paper. In order to achieve this, we exploit data-driven models to replace some machine learning algorithms used in the previous pipeline which engender restrictive set-up, impractical assumptions, and complicated data processing steps. Our system design (Fig 1 left) uses an iPad with a mirror device from Osmo attached to its front camera, which can simultaneously captures the user building origami on a table while providing some visual guidance on the screen visible to the users. From RGB image input, our system predicts the current state of the origami. Based on its prediction, if the user successfully arrives at a new step, the system will provide instructions for the next step; otherwise, it will offer tailored feedback to correct the mistake. During actual usage, when the users finish a step, they move their hands away from the paper (since it will be predicted as the transition state otherwise), and receive the feedback based on the model prediction. Subsequently, the system overlays the folding instructions on top of the paper using a projector,<br>along with some optional text. This pipeline is also shown Fig 1.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">State Estimator<\/h2>\n\n\n\n<p>The main functionality of our vision based system is to automatically recognize the user\u2019s current step in real-time. We view this step recognition problem as a multi-class classification task tackled using convolutional neural networks. Each state, either a finished step or a transition state in between two steps, of the origami paper will be established<br>by the state predicted by the convolutional neural network classifier. For the sake of accuracy, we define every image frame with hands occluding the origami paper as the transition state. Such design choice largely removes the adverse effect of hand occlusion during step recognition without large demands on the user\u2019s side.<\/p>\n\n\n\n<p><br>Our network architecture is straightforward. We initialize a ResNet18 model with weights pre-trained on ImageNet and replace the last classification layer with our own. Then we fine-tune it using our dataset explained in the following section.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Dataset<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"422\" src=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Screenshot-2023-05-09-at-1.31.04-AM-1024x422.png\" alt=\"\" class=\"wp-image-114\" srcset=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Screenshot-2023-05-09-at-1.31.04-AM-1024x422.png 1024w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Screenshot-2023-05-09-at-1.31.04-AM-300x124.png 300w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Screenshot-2023-05-09-at-1.31.04-AM-768x316.png 768w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Screenshot-2023-05-09-at-1.31.04-AM-1536x633.png 1536w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Screenshot-2023-05-09-at-1.31.04-AM.png 1816w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><figcaption class=\"wp-element-caption\">Fig 2:  Our dataset for an origami dove. Left: an instruction diagram from: <a href=\"https:\/\/www.pinterest.com\/pin\/193162271498244792\/\">https:\/\/www.pinterest.com\/pin\/193162271498244792\/<\/a>. Middle: examples of the processed image for each state. Right: examples of the augmented images with the background replaced by another texture image for each state.<\/figcaption><\/figure>\n\n\n\n<p class=\"has-text-align-left\"><br>We need a dataset to create robust computer vision models for Origami Sensei, that can accurately recognize different origami states. Another perspective to view this is that, the previous work manually records the operation detail of each fold in special data structures, while we use neural networks to implicitly remember the appearance of each fold, which requires a dataset per origami model. Another benefit from using neural networks is the ability to generalize across different paper and background pattern after training with data augmentation.<br><br>There are a few publicly available origami datasets but they were not suited for our task. We collect our own dataset by recording videos of a person making origami against a green background using an iPad with the Osmo mirror and base, just like how an actual user would use it as in Fig. 1. It is important that our collected samples are consistent in term of the distance and the angle to the paper, and use consistent lighting to capture as much detail as possible. In addition, we pre-process our videos into an image dataset by extracting frames at 10 fps, cropping out the interested area, and applying homography transformation to fix the perspective effect. The resultant images for an origami dove model is shown in Fig. 2 left and middle. For simplicity, all transition states are pooled under state 0. <\/p>\n\n\n\n<p class=\"has-text-align-left\">The time cost to collect and manually annotate hundreds of videos to build a large dataset per origami model is infeasible. To overcome this problem, we collected two videos and used green screen techniques to replace the background with other texture images to augment the dataset (Fig. 2 right). Specifically, we synthesize 10 new videos with different texture background and add into our dataset. Furthermore, during training, we also employ online color jittering along with other data augmentation techniques as well so that the trained network can generalize to a reasonable spectrum of background texture, paper colors, lighting, distance, and angles.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Experiments<\/h2>\n\n\n\n<p>After collecting our dataset, extracting and pre-processing the image frames, and synthesize data with different background texture, we fine-tune our ResNet classification model on the final dataset with various types of data augmentation. The trained model achieves 99.8% test accuracy on the test set (from the same videos), only failing at 1 out of 451 total test frames.  This experiment proves that our convolution neural network can implicitly remember the appearance and features of different steps. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/resnet_result-\u4e0a\u534812.08.26-1024x283.jpg\" alt=\"\" class=\"wp-image-152\" srcset=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/resnet_result-\u4e0a\u534812.08.26-1024x283.jpg 1024w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/resnet_result-\u4e0a\u534812.08.26-300x83.jpg 300w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/resnet_result-\u4e0a\u534812.08.26-768x212.jpg 768w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/resnet_result-\u4e0a\u534812.08.26-1536x424.jpg 1536w, https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/resnet_result-\u4e0a\u534812.08.26-2048x565.jpg 2048w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><figcaption class=\"wp-element-caption\">Fig 3:  left: dataset state frequency (excluding the transition state 0). Middle: model training loss curve. Right: model training accuracy curve.<\/figcaption><\/figure>\n\n\n\n<p>Currently, we are using PyTorch Mobile, Core ML Tools, and SwiftUI to make an iOS app and deploy the network on an iPad to run inference. It remains as the next step to test its generalization ability in real time and conduct user study on the experience.<\/p>\n\n\n\n<p class=\"has-text-align-left\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview We are interested in building an advanced system that can use a camera to automatically track the progress of the user in real time and provide folding instructions overlaid on the tracked paper. In order to achieve this, we exploit data-driven models to replace some machine learning algorithms used in the previous pipeline which &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Spring 2023 Method &amp; Experiments&#8221;<\/span><\/a><\/p>\n","protected":false},"author":181,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-22","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring 2023 Method &amp; Experiments - Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring 2023 Method &amp; Experiments - Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses\" \/>\n<meta property=\"og:description\" content=\"Overview We are interested in building an advanced system that can use a camera to automatically track the progress of the user in real time and provide folding instructions overlaid on the tracked paper. In order to achieve this, we exploit data-driven models to replace some machine learning algorithms used in the previous pipeline which &hellip; Continue reading &quot;Spring 2023 Method &amp; Experiments&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/\" \/>\n<meta property=\"og:site_name\" content=\"Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-17T03:12:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/\",\"url\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/\",\"name\":\"Spring 2023 Method &amp; Experiments - Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/wp-content\\\/uploads\\\/sites\\\/92\\\/2023\\\/05\\\/Teaser-1-1024x405.png\",\"datePublished\":\"2023-05-08T19:34:25+00:00\",\"dateModified\":\"2023-12-17T03:12:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/#primaryimage\",\"url\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/wp-content\\\/uploads\\\/sites\\\/92\\\/2023\\\/05\\\/Teaser-1-1024x405.png\",\"contentUrl\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/wp-content\\\/uploads\\\/sites\\\/92\\\/2023\\\/05\\\/Teaser-1-1024x405.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/method\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring 2023 Method &amp; Experiments\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/#website\",\"url\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/\",\"name\":\"Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mscvprojects.ri.cmu.edu\\\/f23team15\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring 2023 Method &amp; Experiments - Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/","og_locale":"en_US","og_type":"article","og_title":"Spring 2023 Method &amp; Experiments - Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses","og_description":"Overview We are interested in building an advanced system that can use a camera to automatically track the progress of the user in real time and provide folding instructions overlaid on the tracked paper. In order to achieve this, we exploit data-driven models to replace some machine learning algorithms used in the previous pipeline which &hellip; Continue reading \"Spring 2023 Method &amp; Experiments\"","og_url":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/","og_site_name":"Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses","article_modified_time":"2023-12-17T03:12:34+00:00","og_image":[{"url":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/","url":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/","name":"Spring 2023 Method &amp; Experiments - Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses","isPartOf":{"@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/#primaryimage"},"image":{"@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/#primaryimage"},"thumbnailUrl":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png","datePublished":"2023-05-08T19:34:25+00:00","dateModified":"2023-12-17T03:12:34+00:00","breadcrumb":{"@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/#primaryimage","url":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png","contentUrl":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-content\/uploads\/sites\/92\/2023\/05\/Teaser-1-1024x405.png"},{"@type":"BreadcrumbList","@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/method\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/"},{"@type":"ListItem","position":2,"name":"Spring 2023 Method &amp; Experiments"}]},{"@type":"WebSite","@id":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/#website","url":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/","name":"Mixed Reality Origami Assistant: Hand and Object Understanding for AR glasses","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/pages\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/users\/181"}],"replies":[{"embeddable":true,"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":10,"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/pages\/22\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/pages\/22\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/mscvprojects.ri.cmu.edu\/f23team15\/wp-json\/wp\/v2\/media?parent=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}