Nosmpl

Latest version: v0.1.4

Safety actively analyzes 685507 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.1

this model using original v1.1.0 model.

inputs:


global_orient: [1, 1, 3]
body_pose: [1, 23, 3]


outputs:


vertices
joints
faces

1.0

Post some pretrained SMPLH onnx model, you can using a single onnx to generate smpl mesh for visualization.

(visualize script also provided, it's in 3D)

A simple usage:

python

import collections
import onnxruntime as rt
import torch
import numpy as np
from nosmpl.vis.vis_o3d import vis_mesh_o3d, Open3DVisualizer
import json
from alfred import print_shape
from nosmpl.utils import rot_mat_to_euler


def gen():
sess = rt.InferenceSession("smplh_sim.onnx")

for i in range(5):
body_pose = (
torch.randn([1, 63], dtype=torch.float32).clamp(0, 0.4).cpu().numpy()
)
left_hand_pose = (
torch.randn([1, 45], dtype=torch.float32).clamp(0, 0.4).cpu().numpy()
)
right_hand_pose = (
torch.randn([1, 45], dtype=torch.float32).clamp(0, 0.4).cpu().numpy()
)

outputs = sess.run(
None, {"body": body_pose, "lhand": left_hand_pose, "rhand": right_hand_pose}
)

vertices, joints, faces = outputs
vertices = vertices[0].squeeze()
joints = joints[0].squeeze()

faces = faces.astype(np.int32)
vis_mesh_o3d(vertices, faces)


As you can see, totally smpl-free, there is no SMPL related thing here, just onnx...

The `smplh_sim_w_orien.onnx` is the model with global orientation as input.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.