1(self.webpackChunkvrapeutic_github_io=self.webpackChunkvrapeutic_github_io||[]).push([[5905],{3905:function(e,t,o){"use strict";o.d(t,{Zo:function(){return c},kt:function(){return h}});var a=o(7294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function i(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function s(e,t){if(null==e)return{};var o,a,n=function(e,t){if(null==e)return{};var o,a,n={},r=Object.keys(e);for(a=0;a<r.length;a++)o=r[a],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)o=r[a],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var l=a.createContext({}),p=function(e){var t=a.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):i(i({},t),e)),o},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var o=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(o),h=n,d=u["".concat(l,".").concat(h)]||u[h]||m[h]||r;return o?a.createElement(d,i(i({ref:t},c),{},{components:o})):a.createElement(d,i({ref:t},c))}));function h(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=o.length,i=new Array(r);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,i[1]=s;for(var p=2;p<r;p++)i[p]=o[p];return a.createElement.apply(null,i)}return a.createElement.apply(null,o)}u.displayName="MDXCreateElement"},2956:function(e,t,o){"use strict";o.r(t),o.d(t,{frontMatter:function(){return s},metadata:function(){return l},toc:function(){return p},default:function(){return m}});var a=o(2122),n=o(9756),r=(o(7294),o(3905)),i=["components"],s={slug:"blazepose-part-1",title:"BlazePose, the Best Model for Body keypoints Extraction [Revolutionary]",author:"Alaa Hesham",author_title:"Machine Learning Research @ VRapeutic",author_url:"https://www.linkedin.com/in/alaa-hesham-a6671b112/",author_image_url:"https://miro.medium.com/fit/c/262/262/1*HYIF3GGs-BXlAjHXJNe-dA.png",tags:["computer-vision","research","pose-estimation"]},l={permalink:"/French/blog/blazepose-part-1",source:"@site/blog/2021-01-17-blazepose-part-1.md",title:"BlazePose, the Best Model for Body keypoints Extraction [Revolutionary]",description:"A comprehensive technical guide on how to extract human body keypoints using BlazePose for Human Pose Estimation.",date:"2021-01-17T00:00:00.000Z",formattedDate:"January 17, 2021",tags:[{label:"computer-vision",permalink:"/French/blog/tags/computer-vision"},{label:"research",permalink:"/French/blog/tags/research"},{label:"pose-estimation",permalink:"/French/blog/tags/pose-estimation"}],readingTime:4.22,truncated:!1,prevItem:{title:"BlazePose for Full Body Keypoints Extraction.",permalink:"/French/blog/blazepose-part-2"}},p=[{value:"What is BlazePose?",id:"what-is-blazepose",children:[]},{value:"How its performance exceeds already existing models such as PoseNet?",id:"how-its-performance-exceeds-already-existing-models-such-as-posenet",children:[]},{value:"How to try BlazePose ?",id:"how-to-try-blazepose-",children:[]},{value:"How to easily try/infer through Blazepose for upper body pose estimation ?",id:"how-to-easily-tryinfer-through-blazepose-for-upper-body-pose-estimation-",children:[{value:"In simple terms, do the following steps:",id:"in-simple-terms-do-the-following-steps",children:[]}]},{value:"Conclusion",id:"conclusion",children:[]}],c={toc:p};function m(e){var t=e.components,s=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},c,s,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"A comprehensive technical guide on how to extract human body keypoints using BlazePose for Human Pose Estimation."),(0,r.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,r.kt)("div",{parentName:"div",className:"admonition-heading"},(0,r.kt)("h5",{parentName:"div"},(0,r.kt)("span",{parentName:"h5",className:"admonition-icon"}
1,(0,r.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,r.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,r.kt)("div",{parentName:"div",className:"admonition-content"},(0,r.kt)("p",{parentName:"div"},"You can check out the ",(0,r.kt)("a",{parentName:"p",href:"https://alaa-hesham.medium.com/blazepose-the-best-model-for-body-keypoints-extraction-efdad71d74e2"},"Original Medium Article")," here."))),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://miro.medium.com/max/2400/1*KRzZd1ofbP-FMWj1MPrvhQ.jpeg",alt:"key-points"})),(0,r.kt)("h2",{id:"what-is-blazepose"},"What is BlazePose?"),(0,r.kt)("p",null,"BlazePose is a model that extracts body keypoints from a single image. It exactly infers 33, 2D landmarks of a human body from a single frame such as shoulders, elbows, and knees as illustrated in the following figure. The user\u2019s face must be in the image to detect the pose. To have the best results, the person\u2019s entire body should be in the image. Google researchers have provided this human pose perception functionality to the broader research and development community to encourage the emergence of creative use cases, and stimulate new applications and research avenues."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Its edge is that it is more suitable for applications like fitness ,rehabilitation and dance than already existing models. Why? It is more accurate. It also localizes more keypoints than other previous models do to be more suitable for applications where the scale and orientation of hands and feet are vital information.")),(0,r.kt)("p",null,"For more theoretical information about BlazePose model, check ",(0,r.kt)("a",{parentName:"p",href:"https://ai.googleblog.com/2020/08/on-device-real-time-body-pose-tracking.html"},"Google AI Blog here"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://miro.medium.com/max/2400/1*-5YeZDrwsfHCGmOj8NFOsg.jpeg",alt:"key-points-2"}),"\n",(0,r.kt)("em",{parentName:"p"},"Body keypoints that BlazePose detects")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"In this part of ",(0,r.kt)("strong",{parentName:"em"},"Blazepose\u2019s article series"),", we will cover the following points:")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"How BlazePose\u2019s performance exceeds already existing models such as PoseNet ?"),(0,r.kt)("li",{parentName:"ul"},"How to easily try/infer through Blazepose for upper body pose estimation ?")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"In the ",(0,r.kt)("strong",{parentName:"em"},"second part"),", we will explain:")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"The exact steps you need to do to try/infer through Blazepose for full body pose estimation. It is worth mentioning that currently the full body is only available on Android and iOS through ML Kit API."),(0,r.kt)("li",{parentName:"ul"},"ML kit interface and how to use it ?")),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"In the ",(0,r.kt)("strong",{parentName:"em"},"third part"),", we will discuss:")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Some of technical problems and how to troubleshoot/solve them ?")),(0,r.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,r.kt)("div",{parentName:"div",className:"admonition-heading"},(0,r.kt)("h5",{parentName:"div"},(0,r.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,r.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,r.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.
169H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,r.kt)("div",{parentName:"div",className:"admonition-content"},(0,r.kt)("p",{parentName:"div"},"This Article is a part of a technical research project that has been conducted by R&D department at Yuram. Yuram is a product of VRapeutic\u2013 a software company specialized in therapeutic applications based in Egypt."))),(0,r.kt)("h2",{id:"how-its-performance-exceeds-already-existing-models-such-as-posenet"},"How its performance exceeds already existing models such as PoseNet?"),(0,r.kt)("p",null,"Before trying BlazePose for pose estimation, ",(0,r.kt)("strong",{parentName:"p"},"we have tried other models such as PoseNet"),". According to literature review, PoseNet is one of the best models that existed before the appearance of BlazePose. So let\u2019s see how BlazePose enhanced the performance of some cases where PoseNet does not manage to achieve good nor reliable results."),(0,r.kt)("p",null,"We have noticed that PoseNet tends to have a good performance when the picture is zoomed out as in Figure 3 . However, it performs quite poorly when the subject person in the image is near as in Figure 2 and 4 even if the image is of good quality and resolution. It also does not manage to produce some body keypoints when the subjects\u2019 clothes are fluffy such as in Figure 5."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"i1",src:o(2566).Z}),"\n",(0,r.kt)("em",{parentName:"p"},"(Left) PoseNet could not extract keypoints when image size is that big. (Right) PoseNet managed to extract keypoints when image becomes of lower\nsize and zoomed out.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"i2",src:o(1405).Z}),"\n",(0,r.kt)("em",{parentName:"p"},"(Left) PoseNet does not manage to extract all body keypoints even that the image is\nof good quality. (Right) When person\u2019s clothes are fluffy, it did not manage to detect all body\nkey points.")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Now let\u2019s see how BlazePose performs on these\nimages.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"i3",src:o(2417).Z})),(0,r.kt)("p",null,"Apparently, its performance is superior comparing to its current counterpart. ",(0,r.kt)("strong",{parentName:"p"},"Disclaimer"),", keypoints appear in white color but we changed their color to green. The reason is to make them clearer definitely with the same exact position and orientation."),(0,r.kt)("h2",{id:"how-to-try-blazepose-"},"How to try BlazePose ?"),(0,r.kt)("p",null,"Although pose estimation for ",(0,r.kt)("strong",{parentName:"p"},"upper body")," is supported on many platforms such as Android, iOS, Desktop, Python, and Web. ",(0,r.kt)("strong",{parentName:"p"},"The full body is supported only on Android and iOS. Other platforms support upper body only"),". (This is the current situation in Jan 2021)"),(0,r.kt)("h2",{id:"how-to-easily-tryinfer-through-blazepose-for-upper-body-pose-estimation-"},"How to easily try/infer through Blazepose for upper body pose estimation ?"),(0,r.kt)("p",null,"To try BlazePose performance on the upper body, the easiest way is\nthrough Python notebook developed by MediaPipe. ",(0,r.kt)("em",{parentName:"p"},"Mediapipe is an open source framework to build word-class machine learning solutions by Google"),"."),(0,r.kt)("h3",{id:"in-simple-terms-do-the-following-steps"},"In simple terms, do the following steps:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Go to the following ",(0,r.kt)("a",{parentName:"p",href:"https://colab.research.google.com/drive/1uCuA6We9T5r0WljspEHWPHXCT_2bMKUy"},"Colab notebook"))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"From File menu, choose Save a copy In Drive"))),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://miro.medium.com/max/700/1*05wWwL3XCdcMtRKmefzB3g.png",alt:"i8"})),(0,r.kt)("ol",{start:3},(0,r.kt)("li",{parentName:"ol"},"Go to the copied notebook, run the first cell. In the second cell, run it and\nclick on choose Files button to choose the image you want to try the model\non.")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://miro.medium.com/max/430/1*Cynj7U08HJOQcSnkTPFKHw.jpeg",alt:"i9"})),(0,r.kt)("ol",{start:4},(0,r.kt)("li",{parentName:"ol"},"Keep running the following cells, finally you will get the input image\nannotated with upper body keypoints.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"i4",src:o(250).Z})),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"The left image represents the input image while the right image represents the annotated output image.")),(0,r.kt)("h2",{id:"conclusion"},"Conclusion"),(0,r.kt)("p",null,"In this Article, we have just illustrated what is BlazePose, how its performance is revolutionary compared to its counterparts, and how to use BlazePose for upper body pose estimation. ",(0,r.kt)("strong",{parentName:"p"},"For Full Body Pose Estimation/Keypoints Extraction, kindly follow us to get notified when the second part is available where we explain the exact technical steps you need to do.")))}m.isMDXComponent=!0},2566:function(e,t,o){"use strict";t.Z=o.p+"assets/images/key-pts-1-47255476ea37047f1c5e02152d83d4dc.png"},1405:function(e,t,o){"use strict";t.Z=o.p+"assets/images/key-pts-2-dad40e4c73f82e28f877b5f2ec90ecab.png"},2417:function(e,t,o){"use strict";t.Z=o.p+"assets/images/key-pts-3-a919fbbc6379897d99679e3bd54c479b.png"},250:function(e,t,o){"use strict";t.Z=o.p+"assets/images/key-pts-4-7b94afd290be13aca69c6a7342fa96f2.png"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.