当前位置: 首页 > news >正文

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

相关文章:

  • 【C语言】动态内存管理
  • ElementUI表格表头自定义添加checkbox,点击选中样式不生效
  • SQL-leetcode—1661. 每台机器的进程平均运行时间
  • 在 Flutter 实现下拉刷新、上拉加载更多和一键点击回到顶部的功能
  • Vulhub靶机 ActiveMQ 反序列化漏洞(CVE-2015-5254)(渗透测试详解)
  • webpack和vite打包原理及比较
  • PostgreSQL的学习心得和知识总结(一百六十八)|深入理解PostgreSQL数据库之PostgreSQL 规划器开发与调试(翻译)
  • HCIA项目实践--静态路由的综合实验
  • MySQL单表存多大的数据量比较合适
  • Flask使用JWT认证
  • 计数排序
  • 用pytorch实现一个简单的图片预测类别
  • 字符设备驱动开发
  • SpringBoot Bug 日志
  • python_excel批量插入图片
  • 数据结构——队列、哈希存储(2025.2.11)
  • 【ISO 14229-1:2023 UDS诊断全量测试用例清单系列:第十二节】
  • Git 中的 author 和 committer 有什么区别
  • DeepSeek 从入门到精通学习指南,2025清华大学《DeepSeek从入门到精通》正式发布104页pdf版超全解析
  • 通过用户名和密码登录服务器有哪些方法
  • 庆祝上海总工会成立100周年暨市模范集体劳动模范和先进工作者表彰大会举行,陈吉宁寄予这些期待
  • 蔡达峰:推动食品安全法全面有效实施,为维护人民群众身体健康提供有力法治保障
  • 涨知识|没想到吧,体育老师强调的运动恢复方法是错的?
  • 妻子藏匿一岁幼儿一年多不让丈夫见,法院发出人格权侵害禁令
  • A股26家游戏企业去年营收近1900亿元:过半净利下滑,出海成为主流选择
  • 魔都眼|上海多家商场打开绿色通道,助力外贸出口商品转内销