pyrender smpl 渲染
目录
multi_hmr渲染:
hmr2渲染:
4d_humans
champ渲染
multi_hmr渲染:
multi-hmr/utils/render.py at master · naver/multi-hmr · GitHub
class Multi_Hmr2Smpl_Handler(GigaBaseHandler):
class Params:
pass
model_cfg = self.Params()
model_cfg.MODEL = self.Params()
model_cfg.EXTRA = self.Params()
# model_cfg.EXTRA.FOCAL_LENGTH=1800
model_cfg.EXTRA.FOCAL_LENGTH = 776
model_cfg.MODEL.IMAGE_SIZE = 896
model_cfg.MODEL.IMAGE_MEAN = [0.485, 0.456, 0.406]
model_cfg.MODEL.IMAGE_STD = [0.229, 0.224, 0.225]
model_cfg.MODEL.BBOX_SHAPE = [192, 256]
self.hmr2_model_cfg = model_cfg
def overlay_human_meshes(self,humans, K, img_pil, unique_color=False):
_color = [color[0] for _ in range(len(humans))] if unique_color else color
# Get focal and princpt for rendering.
focal = np.asarray([K[0,0,0].cpu().numpy(),K[0,1,1].cpu().numpy()])
princpt = np.asarray([K[0,0,-1].cpu().numpy(),K[0,1,-1].cpu().numpy()])
# Get the vertices produced by the model.
verts_list = [humans[j]['vertices3d'].cpu().numpy() for j in range(len(humans))]
faces_list = [self.model.smpl_layer['neutral_10'].bm_x.faces for j in range(len(humans))]
# Render the meshes onto the image.
pred_rend_array = render_meshes(np.asarray(img_pil),
verts_list,
faces_list,
{'focal': focal, 'princpt': princpt},
alpha=1.0,
color=_color)
return pred_rend_array, _color
hmr2渲染:
hmr/src/util/renderer.py at master · akanazawa/hmr · GitHub
4d_humans
GitHub - shubham-goel/4D-Humans: 4DHumans: Reconstructing and Tracking Humans with Transformers
4D-Humans/hmr2/utils/semantic_renderer.py at 8514117dc78083e0f64f59dfe6d3b07f79c69839 · Leoooo333/4D-Humans · GitHub
champ渲染
champ/scripts/data_processors/smpl/smpl_visualizer.py at 4d0cad2ca23990a26a0c2f69d4ecb1b55f5df140 · fudan-generative-vision/champ · GitHub