tensorflow / tensorflow/graphics
Plan to implement Mesh Class
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 374
- PR merge metrics
- No merged PRs in 30d
Description
Currently, a mesh is expressed as a dictionary object that has numpy arrays of vertices and faces as elements. However, it is more convenient if we can deal with mesh as object. Some properties and operations related to meshes should be combined as a class, like this:
import trimesh
import numpy as np
class Mesh(object):
def __init__(self, vertices: np.ndarray, faces: np.ndarray):
self.vertices = vertices
self.faces = faces
# other variables...
@classmethod
def load_obj(cls, filepath: str):
mesh = trimesh.load(filepath)
vertices = mesh.vertices.view(np.ndarray)
faces = mesh.faces.view(np.ndarray)
return cls(vertices, faces)
# other methods...
If we implement such a class, we can use mesh objects as the arguments of the function to compute metrics and losses about the mesh (e.g., Chamfer Distance).
Do you have any idea?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current dictionary-based mesh representations and the metric and loss APIs mentioned in the issue, including Chamfer Distance. No files or tests are named; done would require an agreed mesh-object design that supports the stated vertices, faces, loading, and metric or loss integration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100