• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Pytorch3d的倒角损失函数Chamfer Distance Loss的用法pytorch3d.loss.chamfer_distance

武飞扬头像
hangyi2000
帮助1

API文档在这里

源码在这里

之前看到的一个干货满满的Pytorch3D安装指导与简单例子的帖子在这里

 官方tutorials中提到的用法在下面这个代码块里面,前面后面东西都挺多的就把和chamfer_distance相关的摘到了这里

  1.  
    from pytorch3d.ops import sample_points_from_meshes
  2.  
    from pytorch3d.loss import (
  3.  
    chamfer_distance,
  4.  
    mesh_edge_loss,
  5.  
    mesh_laplacian_smoothing,
  6.  
    mesh_normal_consistency,
  7.  
    )
  8.  
     
  9.  
    # We sample 5k points from the surface of each mesh
  10.  
    sample_trg = sample_points_from_meshes(trg_mesh, 5000)
  11.  
    sample_src = sample_points_from_meshes(new_src_mesh, 5000)
  12.  
     
  13.  
    # We compare the two sets of pointclouds by computing (a) the chamfer loss
  14.  
    loss_chamfer, _ = chamfer_distance(sample_trg, sample_src)

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgbegia
系列文章
更多 icon
同类精品
更多 icon
继续加载