mkocabas / VIBE

Official implementation of CVPR2020 paper "VIBE: Video Inference for Human Body Pose and Shape Estimation"
https://arxiv.org/abs/1912.05656
Other
2.86k stars 550 forks source link

[FEATURE]how to change code from loop to sparate thread #197

Open azuryl opened 3 years ago

azuryl commented 3 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] orig_width=640 orig_height =640 renderer = Renderer(resolution=(orig_width, orig_height), orig_img=True,wireframe=False)

def show_render(vibe_results,renderer, img_vibe): mesh_color = {k: colorsys.hsv_to_rgb(np.random.rand(), 0.5, 1.0) for k in vibe_results.keys()}

for key, vibe_result in vibe_results.items():

#print("\n key,vibe_result:\n",key,vibe_result)

frame_verts = np.squeeze(vibe_result['verts']) 
frame_cam =  np.squeeze(vibe_result['orig_cam'])
mc =  mesh_color[key]

mesh_filename = None

img_vibe = renderer.render(
            img_vibe,
            frame_verts,
            cam=frame_cam,
            color=mc,
            mesh_filename=mesh_filename,
        )

return img_vibe } Describe the solution you'd like A clear and concise description of what you want to happen. how to change the code from loop to sparate thread ,because the loop can not real time Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.