这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@zghera
Copy link
Collaborator

@zghera zghera commented Mar 25, 2022

Description

Implements the necessary components to compute the voxel and mesh losses.

The primary additions includes the:

  • mesh sampler
  • MeshLoss tf.keras.losses.Loss class
  • chamfer, normal, and edge losses
  • script to visualize the mesh sampler

Type of change

  • A new research paper code implementation

Tests

The tests added can be found in:

  • mesh_losses_differential_test.py: Unit tests for the mesh sampler.
  • mesh_losses_test: Unit tests for the mesh losses.
  • mesh_losses_differential_test: Differential tests for the mesh losses.

Checklist

zghera added 21 commits March 25, 2022 12:35
Created a script that is very similar to the vizualize_mesh but also includes support for displaying the normal vectors. Images displaying the normal vectors are also provided in this commit for demonstration of progress but will be deleted later.
Create voxels will also be used for testing the mesh sampler.
This was done so the mesh sampler and the utility functions/class for getting the closest points in each point cloud can both live in mesh sample while providing a clear distinction between them.
Note: this is currently a prototype. A rationale for pushing this prototyping and the TODOs are listed in the module docstring.
Added class that encompases all of the mesh based loss terms (chamfer, normals, and edge) as well as voxel BCE loss. Added option to pass batch weights to chamfer and normal loss. Refactored some code for greater modularity.
TF implementation was applying point reduction before multiplying by weights when the original implementation was doing the opposite.
Edge loss worked after merging in the cubify fixed from mesh_rcnn_mesh_refinement branch (commits 2c516d4, 0aabf68, e53189f, 8eb0106, 2ea6446).
These tests now run faster and no longer assert values for functions that depend on other random functions (i.e. the mesh sampler).
@zghera zghera self-assigned this Mar 25, 2022
Copy link
Collaborator

@davidliii davidliii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a config dataclass for the loss parameters (example YoloLoss)

@zghera zghera requested a review from davidliii March 28, 2022 14:59
@davidliii davidliii merged commit 9646684 into mesh_rcnn Mar 28, 2022
@davidliii davidliii deleted the mesh_rcnn_mesh_loss branch April 25, 2022 18:54
Wenxin-Jiang pushed a commit that referenced this pull request Jan 12, 2023
@zghera zghera restored the mesh_rcnn_mesh_loss branch May 1, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants