Build a web app that recognizes yoga poses using a model from the Model Asset eXchange hosted on the Machine Learning eXchange

Summary
This IBM Developer code pattern discusses how to find human positions in a provided image by using the Human Pose Estimator design from the Model Asset eXchange that is hosted on the Machine Learning eXchange. Utilizing collaborates, the posture lines that are created by the design are assembled into full body postures for each of the human beings that are detected in the image.
Description
The Human Pose Estimator design discovers humans and their positions in an offered image. The design first finds the human in the input image and after that recognizes the body parts, consisting of the nose, neck, eyes, shoulders, elbows, wrists, hips, knees, and ankles. Next, each pair of associated body parts is linked by a “posture line,” as revealed in the following image. A line may link the left eye to the nose, while another may link the nose to the neck.

Each position line is represented by a list [x1, y1, x2, y2], where the very first pair of collaborates (x1, y1) is the beginning
point of the line for one body part, while the 2nd set of collaborates (x2, y2) is the ending point of the line for the
other associated body part. The posture lines are put together into full body positions for each of the people found in the
image.
The model is based upon the TF execution of the OpenPose design. The code in this repository releases the design as a web service in a Docker container.
Yogait, a yoga assistant that uses the Human Pose Estimator MAX Model to guess which yoga present a user is performing, uses a pre-trained SVM to classify postures. Instead of using the Cartesian lines that the MAX design returns, Yogait uses a Polar representation to perform classification. This was done to make it a lot easier to classify presents. Instead of training the SVM on an x-y coordinate system, which would require translation and rotation when enhancing information, the polar representation relies only upon the location of the joints relative to the center of the approximated model.
The [x, y] collaborates are converted to [phi, rho] for each joint. The SVM carries out category on a flattened variation of the polar vectors. Compared to a Cartesian representation, this polar representation uses little information and can carry out category on a human in any part of a caught frame. You would have to carry out all of the positions in the center of the electronic camera frame if the Cartesian representation was to be utilized.
When you have completed the code pattern, youll comprehend how to:

Circulation

Construct a Docker image of the Human Pose Estimator MAX Model
Deploy a deep knowing design with a REST endpoint
Create a present evaluation for a person in a frame of video utilizing limit Models REST API
Run a web application that uses the designs REST API

The server sends out the recorded video frame-by-frame from the web cam to the design API.
The web UI requests the pose lines estimated for the frame from the server.
The server receives data from the design API and updates the result to the web UI.

Guidelines
Discover the detailed steps for this pattern in the README. Those actions reveal you how to:

Establish the MAX design.
Start the web app.
Run locally with a Python script.
Use a Jupyter Notebook.

The Human Pose Estimator design discovers people and their postures in a given image. Next, each pair of associated body parts is linked by a “pose line,” as revealed in the following image. Yogait, a yoga assistant that uses the Human Pose Estimator MAX Model to guess which yoga posture a user is performing, utilizes a pre-trained SVM to classify presents. Rather of using the Cartesian lines that the MAX design returns, Yogait uses a Polar representation to perform classification. If the Cartesian representation was to be utilized, then you would have to perform all of the poses in the center of the electronic camera frame.

Leave a Reply

Your email address will not be published.