facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

VolumeSampler: expose padding_mode for inside out rendering #1638

Closed d4l3k closed 1 year ago

d4l3k commented 1 year ago

This exposes a setting on VolumeSampler so you can change the padding_mode. This is very useful when using cameras inside a volume that doesn't cover the entire world. By setting the value to border you can get much better behavior than zeros which causes edge effects for things like the sky. Border emulates infinitely tall buildings instead.

Test plan:

Tested with torchdrive

Example before: image

Example after: image

d4l3k commented 1 year ago

@bottler can you review this when you get a chance? Thanks!

facebook-github-bot commented 1 year ago

@bottler has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 year ago

@bottler merged this pull request in facebookresearch/pytorch3d@b7f4ba097cebab303471119fdaac97b50a72e7d0.

bottler commented 1 year ago

Thanks!