class_docstr: Subdivide a triangle mesh by adding a new vertex at the center of each edge
  and dividing each face into four new faces. Vectors of vertex
  attributes can also be subdivided by averaging the values of the attributes
  at the two vertices which form each edge. This implementation
  preserves face orientation - if the vertices of a face are all ordered
  counter-clockwise, then the faces in the subdivided meshes will also have
  their vertices ordered counter-clockwise.
  
  If meshes is provided as an input, the initializer performs the relatively
  expensive computation of determining the new face indices. This one-time
  computation can be reused for all meshes with the same face topology
  but different vertex positions.
class_docstr_tok: ["Subdivide","a","triangle","mesh","by","adding","a","new","vertex","at","the","center","of","each","edge","and","dividing","each","face","into","four","new","faces",".","Vectors","of","vertex","attributes","can","also","be","subdivided","by","averaging","the","values","of","the","attributes","at","the","two","vertices","which","form","each","edge",".","This","implementation","preserves","face","orientation","-","if","the","vertices","of","a","face","are","all","ordered","counter-clockwise",",","then","the","faces","in","the","subdivided","meshes","will","also","have","their","vertices","ordered","counter-clockwise",".","If","meshes","is","provided","as","an","input",",","the","initializer","performs","the","relatively","expensive","computation","of","determining","the","new","face","indices",".","This","one-time","computation","can","be","reused","for","all","meshes","with","the","same","face","topology","but","different","vertex","positions","."]
docstr: Subdivide a batch of meshes by adding a new vertex on each edge, and
  dividing each face into four new faces. New meshes contains two types
  of vertices:
  1) Vertices that appear in the input meshes.
     Data for these vertices are copied from the input meshes.
  2) New vertices at the midpoint of each edge.
     Data for these vertices is the average of the data for the two
     vertices that make up the edge.
  
  Args:
      meshes: Meshes object representing a batch of meshes.
      feats: Per-vertex features to be subdivided along with the verts.
          Should be parallel to the packed vert representation of the
          input meshes; so it should have shape (V, D) where V is the
          total number of verts in the input meshes. Default: None.
  
  Returns:
      2-element tuple containing
  
      - **new_meshes**: Meshes object of a batch of subdivided meshes.
      - **new_feats**: (optional) Tensor of subdivided feats, parallel to the
        (packed) vertices of the subdivided meshes. Only returned
        if feats is not None.
docstr_tok: ["Subdivide","a","batch","of","meshes","by","adding","a","new","vertex","on","each","edge",",","and","dividing","each","face","into","four","new","faces",".","New","meshes","contains","two","types","of","vertices",":","1",")","Vertices","that","appear","in","the","input","meshes",".","Data","for","these","vertices","are","copied","from","the","input","meshes",".","2",")","New","vertices","at","the","midpoint","of","each","edge",".","Data","for","these","vertices","is","the","average","of","the","data","for","the","two","vertices","that","make","up","the","edge",".","Args",":","meshes",":","Meshes","object","representing","a","batch","of","meshes",".","feats",":","Per-vertex","features","to","be","subdivided","along","with","the","verts",".","Should","be","parallel","to","the","packed","vert","representation","of","the","input","meshes",";","so","it","should","have","shape","(","V",",","D",")","where","V","is","the","total","number","of","verts","in","the","input","meshes",".","Default",":","None",".","Returns",":","2-element","tuple","containing","-","*","*","new_meshes","*","*",":","Meshes","object","of","a","batch","of","subdivided","meshes",".","-","*","*","new_feats","*","*",":","(","optional",")","Tensor","of","subdivided","feats",",","parallel","to","the","(","packed",")","vertices","of","the","subdivided","meshes",".","Only","returned","if","feats","is","not","None","."]
code: def forward(self, meshes, feats=None):
      """
      Subdivide a batch of meshes by adding a new vertex on each edge, and
      dividing each face into four new faces. New meshes contains two types
      of vertices:
      1) Vertices that appear in the input meshes.
         Data for these vertices are copied from the input meshes.
      2) New vertices at the midpoint of each edge.
         Data for these vertices is the average of the data for the two
         vertices that make up the edge.
  
      Args:
          meshes: Meshes object representing a batch of meshes.
          feats: Per-vertex features to be subdivided along with the verts.
              Should be parallel to the packed vert representation of the
              input meshes; so it should have shape (V, D) where V is the
              total number of verts in the input meshes. Default: None.
  
      Returns:
          2-element tuple containing
  
          - **new_meshes**: Meshes object of a batch of subdivided meshes.
          - **new_feats**: (optional) Tensor of subdivided feats, parallel to the
            (packed) vertices of the subdivided meshes. Only returned
            if feats is not None.
  
      """
      self._N = len(meshes)
      if self.precomputed:
          return self.subdivide_homogeneous(meshes, feats)
      else:
          return self.subdivide_heterogenerous(meshes, feats)
  
file_path: pytorch3d/pytorch3d/ops/subdivide_meshes.py
imports: import torch
  import torch.nn
  from pytorch3d.structures import Meshes
label_desc: Use image node_id 3 for calling the SubdivideMeshes obj's underlying member method code with example usage: obj.forward(meshes, feats) and returns: self, self