Comments (2)
You can follow the code in the forward_step to see how we calculate the 3D joints and project them to the image.
In what way were the 3D and 2D joints different from the ones you calculated?
from 4d-humans.
Thank for your reply. This is the code i use to visualize the first 25 predicted 2d joints on the original frame.
`import joblib
import cv2
import matplotlib.pyplot as plt
import numpy as np
data = joblib.load('/home/markusc/Videos/panda_test/video/output2/webvid/medium/3/4dhumans/3_4dhumans.pkl')
first_key = next(iter(data.keys()))
joints_2d_1 = data[first_key]['2d_joints'][0][:252]
joints_2d_2 = data[first_key]['2d_joints'][1][:252]
image_path = '/home/markusc/Videos/panda_test/video/3/json_files/multiple/3/0_pose.png'
image = cv2.imread(image_path)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
img_height, img_width, _ = image.shape
joints_2d_1 = joints_2d_1.reshape(-1, 2)
joints_2d_2 = joints_2d_2.reshape(-1, 2)
joints_2d_1[:, 0] *= img_width
joints_2d_1[:, 1] *= img_height
joints_2d_2[:, 0] *= img_width
joints_2d_2[:, 1] *= img_height
print("Joints 2D 1 positions:")
print(joints_2d_1)
print("Joints 2D 2 positions:")
print(joints_2d_2)
plt.figure(figsize=(10, 10))
plt.imshow(image)
for idx, joint in enumerate(joints_2d_1):
if idx == 0:
plt.scatter(joint[0], joint[1], s=100, c='yellow', marker='o')
else:
plt.scatter(joint[0], joint[1], s=30, c='red', marker='o')
plt.text(joint[0], joint[1], str(idx), fontsize=12, color='red')
for idx, joint in enumerate(joints_2d_2):
if idx == 0:
plt.scatter(joint[0], joint[1], s=100, c='green', marker='o')
else:
plt.scatter(joint[0], joint[1], s=30, c='blue', marker='o')
plt.text(joint[0], joint[1], str(idx), fontsize=12, color='blue')
plt.title('2D Joints on Image - First Frame')
plt.axis('off')
plt.show()`
from 4d-humans.
Related Issues (20)
- the effect of running tracking was not good HOT 1
- [MISSING FILE] SMPL_NEUTRAL.pkl HOT 1
- DDP has slower training speed HOT 2
- perspective projection HOT 5
- After testing, I found out the code work when `basicModel_neutral_lbs_10_207_0_v1.0.0.pkl` is put on the root of the directory. Maybe bug in the PHALP? HOT 5
- Can't download model checkpoints and data HOT 1
- EGL canβt create context
- [FUNC] cam_crop_to_full HOT 2
- Keypoints Matching for Multiple People during Evaluation HOT 4
- PW3D Evaluation with HMR 2.0a HOT 1
- hmr2_data.tar.gz HOT 1
- Meaning of keys in .pkl after running track.py HOT 5
- OpenGL issue on Windows while rendering HOT 1
- LSP-Extended and PoseTrack Images Link HOT 1
- I want to change the epoch during training, where should I change it? HOT 3
- 4D-Humans root vs SMPL root HOT 2
- Slow training with DDP HOT 1
- something wrong with hmr2_data.tar.gz HOT 3
- Source of demo video
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 4d-humans.