Skip to content

predicting of 3d landmarks using Blazepose and Detectrin2 model base on 2d video by Python

Notifications You must be signed in to change notification settings

RaziehSh1987/3D-landmarks-Pose_estimation

Repository files navigation

3D-landmarks-Pose_estimation

This below link is my thesis presentation for this repository:

https://docs.google.com/presentation/d/e/2PACX-1vRLcMyNIFnfC8-tBpZ2aBrqCC2ou3Um9MNkX2QcJwBNZ3Wa982TMSxePJaMN-mTXw/pub?start=false&loop=false&delayms=3000

image

image

"BlazePose3D_Using_2D_Keypoints.ipynb" is a correct code(but MediaPipe code doesn't have a precise output),just we must set the address of 2D video as a file_path then this code save the coordinates of all frames of video in a txt file now, we should give the address of each cordinates to Show_Skeleton.cs code to show the skelton of animation in unity application tip: drag and drop the "Show_Skeleton.cs" into a Main_Camera to show the skeletons and Camera follow the character tip: in unity --> we must add multi mini Circles in the scene with the corespond material then assigne each circle to each corespond variable of Show_Skeleton.cs script in Main_Camera the result of Predicted 3d Landmarks with Blazepose is:

show_skeleton_cam_1.mp4

comparing the ground_truth Skeleton with predicted Skeleton:

show_gt_predicted_skeleton.mp4

we can learn more about Blazepose ,here: https://github.com/google/mediapipe/blob/master/docs/solutions/pose.md https://developers.google.com/mediapipe/solutions/setup_python https://github.com/google/mediapipe/blob/master/docs/solutions/pose.md ai.googleblog.com/2020/08/on-device-real-time-body-pose-tracking.html to find a best angle and best distances of camera, I captured 750 different angles and distances of animation like below:

1234.mp4

then I've given the video to my model (BlazePose3D_Using_2D_Keypoints_all.ipynb) to predict the 3d coordinates and after that I've ploted the loss function to gain the accuarcy of model. below plot is displaying the ground truth skeleton with all loss function for all landmarks,red circle= high loss function(bad) , green=good loss function and good result:

animation_loss_skeleton_blazepose.mp4

image

Camera Configurations:

Quantifying model performance with a 3D grid of points surrounding the animation skeleton.

Points converted to spherical coordinates: Radius, Azimuth, and Elevation. Screenshot from 2023-08-29 23-18-56

Analysis of camera configurations and their impact on character joint prediction accuracy.

Optimal camera distance, elevation, and azimuth for best results

image

About

predicting of 3d landmarks using Blazepose and Detectrin2 model base on 2d video by Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published