-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to render separate meshes as silhouettes with unique values #756
Comments
Some further thoughts: It's a bit of a hack to use the color channels of the |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Not stale! Still an open question. I'll try to tackle it myself in the coming days. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Hi Jim, Were you able to figure this out? |
For people looking for a way to achive this, maybe take a look at my answer in #1528 (comment) |
❓ Questions on how to use PyTorch3D
Thanks for your great work.
I have a scene with two different objects. I have a semantic segmentation model which can give me estimates of which pixels belong to these different objects. I would like to optimize the parameters of these two meshes such that the silhouettes match the segmentation outputs. To do this, I would like to use the correct shader such that object 1's silhouette has a different value than object 2's silhouette (e.g. all 1s for object 1, and 2s for object 2). Then, my loss function can be something like
loss = smooth_l1(segmentation_outputs, rendered_image)
. I don't know which shader to use or how to do this.Options, as I see them, but correct me if I'm wrong.
joining_meshes_as_batch
. That way, the separate objects are in different elements of the batch dimension. However, I cannot do this, as I am using the batch dimension for multiple camera views already.As an example base, inspired by this very helpful issue let's use
big_ball
andlittle_ball
as the two objects. I've updated the code to version0.4.0
to render these two balls . I've plotted the outputs of some of the options noted above.I am not an expert in computer graphics. I'm hoping that your expertise will help me choose which option is the best one, or if all of these ideas are wrong and there is a better way.
initialize spheres
set up rendering
render
visualize
outputs of final cell
Edits:
The text was updated successfully, but these errors were encountered: