# tfjs-posenet **Repository Path**: benjiaxu/tfjs-posenet ## Basic Information - **Project Name**: tfjs-posenet - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-08-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PoseNet and TensorFlow.js This is an example of using pre-trained models in the browser. For this particular example, this is a trained [MobileNet](https://arxiv.org/abs/1704.04861) model, an efficient CNN for mobile vision. PoseNet can detect human figures in images and videos using either a single-pose or multi-pose algorithm. For more details about this Machine Learning model, [refer to this blog post](https://medium.com/tensorflow/real-time-human-pose-estimation-in-the-browser-with-tensorflow-js-7dd0bc881cd5) for a high-level description of PoseNet running on Tensorflow.js. **See [demo here](https://jscriptcoder.github.io/tfjs-posenet/)** ![PoseNet example](posenet_fran.gif) **Notes:** 1. This code is based on [tfjs-models/posenet](https://github.com/tensorflow/tfjs-models/tree/master/posenet) model released by TensorFlow team. I borrowed, adapted and turned it into a React component. 2. Keep in mind I just tested it in Chrome. Honeslty, I don't care about other browsers for this kind of experiments. 3. You must allow, for obvious reasons, the use of your webcam. Don't worry, the images stay in your browser. Let's say it's GDPR compliance :stuck_out_tongue_winking_eye: ## PoseNet React Component ```jsx import * as React from 'react' import ReactDOM from 'react-dom' import PoseNet from './PoseNet' ReactDOM.render( , document.getElementById('app') ) ``` ## Installing and running example ``` $ npm install $ npm run example ``` Browser will open http://localhost:8080/. Have fun :wink: ## How to consume the component ``` $ npm install jscriptcoder/tfjs-posenet ``` ```js import * as React from 'react' import PoseNet from 'tfjs-posenet' const MyContainer = (props) => (

This is my container

) ```