Comments (3)
The chamfer loss accepts both xyz point positions as well as normals and returns a loss for both.
In the demo, we sample 5k points from the surface of the mesh using the sample_points_from_meshes
function. This has a boolean argument which you can set return_normals=True
(default is False
) in order to get the normals for the sampled points.
In the optimization loop you can modify the sampling and chamfer loss section as follows:
# We sample 5k points and normals from the surface of each mesh
sample_trg, normals_trg = sample_points_from_meshes(trg_mesh, 5000, return_normals=True)
sample_src, normals_src = sample_points_from_meshes(new_src_mesh, 5000, return_normals=True)
# We compare the two sets of pointclouds by computing (a) the chamfer loss
loss_chamfer, loss_chamfer_normals = chamfer_distance(sample_trg, sample_src, normals_trg, normals_src)
from pytorch3d.
@ruslanvasylev Note that we have spent a significant amount of time documenting all of our ops. In our API docs you can find all the details regarding our implementations. For example, for chamfer you can read more details here.
from pytorch3d.
@ruslanvasylev If this answers your question please close this issue.
from pytorch3d.
Related Issues (20)
- Installing PyTorch3D with CUDA 11.3 and PyTorch 1.11.0 with Python 3.8 HOT 1
- Windows installation HOT 3
- Does pytorch3d support polygonal-light rendering? HOT 2
- Questions on Camera Configurations (Focal Length, FoV, etc) HOT 4
- Install error with wsl pytorch=2.11;cuda=11.8;python=3.10; HOT 3
- ImportError: /home/chengxuan/anaconda3/envs/DECA/lib/python3.8/site-packages/pytorch3d/_C.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl HOT 4
- Odd Behavior during Optimize Via Depth Map HOT 1
- Why the knn_points only support float32? HOT 1
- PyTorch3D Colab Tutorials - Cannot Install PyTorch3D HOT 5
- How can I export a Texture map? HOT 3
- Matrix to Quaternion function requires quaternion standardization at the end.
- Adding a plane in renderer HOT 1
- Is there a way to use my own images in "Fit a mesh via rendering"? HOT 1
- Could pulsar renderer return "weight" of spheres?
- Add Unity camera conversion HOT 1
- Installation error in Mac M3 HOT 4
- unproject image to pointcloud in pytorch3d HOT 9
- How could I ensure object is centered in rendered images (while changing viewpoints)? HOT 1
- Hi guys!Could anybody help me with the warning"integer conversion resulted in a change of sign"? HOT 1
- Add an example of warping image HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch3d.