{"id":184,"date":"2022-04-17T22:40:45","date_gmt":"2022-04-18T03:40:45","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/?p=184"},"modified":"2022-04-17T22:40:46","modified_gmt":"2022-04-18T03:40:46","slug":"luckys-status-report-for-april-16-2022","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/2022\/04\/17\/luckys-status-report-for-april-16-2022\/","title":{"rendered":"Lucky&#8217;s Status Report for April 16, 2022"},"content":{"rendered":"<p><span style=\"font-weight: 400\">This week I did the following tasks:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Deeper research into more complex segmentation approaches<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Upon further research and designing of sliding window I found some disadvantages to the approach<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Fixed window size or aspect ratio can result in not capturing the full objects in windows or expensive computation<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">I learned about modern techniques that were developed to tackle that issue i.e. R CNN and Fast R CNN, Faster R CNN, and more<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Therefore, I compared K-means, Mean Shift, and Graph Based segmentation<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">K-Mean: predefined number of clusters, randomly set centroids (will be the mean(s) i.e. the average of the colors in a cluster) for each cluster, assign each point to the nearest mean thereby creating a cluster, then recompute the means and repeat until the means stop moving i.e. convergence<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Pros:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Not as complex as the other two approaches<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Very fast<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Multiple initialization methods can be used<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Cons:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Manually have to set number of clusters<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Sensitive to initialization<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Sensitive to outliers<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Mean Shift: for each pixel &#8211; first compute mean of the pixels in a surrounding window, then move the pixel\u2019s assigned centroid to the new mean location, repeat until the mean converges to the nearest mode which will be the local extrema i.e. the hill of a normalized density feature mapping. Each hill will be the centroid of the pixels around them thus separating the pixels into clusters<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Pros:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Simple algorithm<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">No initialization required<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robust to outliers<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Cons:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Computationally expensive<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Sensitive to window size parameter<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Graph Based Segmentation: each pixel is a vertex, an edge is produced between neighboring pixels, each edge is assigned a weight based on affinity \/ similarity between the pixels\/vertices, then the graph is partitioned to subgraphs where pairs of pixels in the same subgraph have a high affinity, and pairs of different subgraphs have a low affinity i.e. a min-cut<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Pros:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Complex segmentation capabilities<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Cons:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">There is a bias to cut into smaller segments<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Requires normalizing cuts to favor larger subgraphs<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">No known polynomial time solution for minimizing the cost of a normalized cut, but there are approximations<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Upon comparing all of the solution approaches I used the following constraints:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Low computational expense and latency to meet user requirements<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The camera is going to be fixed and the shelf is of a fixed size and distance from the camera<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Results in images of fixed aspect ratio<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Results in items having a constrained placement on shelf rows<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">We constrained the size of items for the scope of this project<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Therefore, I decided that given the constraints and scope of the project, an implementation of sliding window would be the feasible design solution<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Completed a functional sliding window matching algorithm<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Put together the shelf we bought<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">In terms of schedule, I think I am around where I expected to be. I would like to move faster this next week though to give some more leeway for hiccups as we get our project to something worthy of a decent final demo.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">What Next<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Set up webcam and shelf with the following specifications to begin live testing such that the frame is composed of only the shelf for speed and accuracy since there would be minimal sliding window matching segments outside of shelf area<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Distance from shelf to webcam:<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Orientation of webcam:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Using SIFT matching which is supposed to be rotation invariant, but algorithm rotates test image for the sake of user visualization while testing<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Height from floor of webcam:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Centered to shelf to allow for most forward facing camera angle of complete shelf<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Figure out a set original captured Image aspect ratio and adjust sliding window accordingly<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This week I did the following tasks: Deeper research into more complex segmentation approaches Upon further research and designing of sliding window I found some disadvantages to the approach Fixed window size or aspect ratio can result in not capturing the full objects in windows or expensive computation I learned about modern techniques that were &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/2022\/04\/17\/luckys-status-report-for-april-16-2022\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Lucky&#8217;s Status Report for April 16, 2022&#8221;<\/span><\/a><\/p>\n","protected":false},"author":574,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[5],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/posts\/184"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/users\/574"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":1,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":185,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/posts\/184\/revisions\/185"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb0\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}