mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 14:20:38 +08:00
Alpha channel to return the mask
Summary: Updated the alpha channel in the `hard_rgb_blend` function to return the mask of the pixels which have overlapping mesh faces. Reviewed By: bottler Differential Revision: D29001604 fbshipit-source-id: 22a2173d769f2d3ad34892d68ceb628f073bca22
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ac6c07fa43
commit
a15c33a3cc
@@ -184,8 +184,8 @@ class TestBlending(TestCaseMixin, unittest.TestCase):
|
||||
channel_color = blend_params.background_color[i]
|
||||
self.assertTrue(images[~is_foreground][..., i].eq(channel_color).all())
|
||||
|
||||
# Examine the alpha channel is correct
|
||||
self.assertTrue(images[..., 3].eq(1).all())
|
||||
# Examine the alpha channel
|
||||
self.assertClose(images[..., 3], (pix_to_face[..., 0] >= 0).float())
|
||||
|
||||
def test_sigmoid_alpha_blend_manual_gradients(self):
|
||||
# Create dummy outputs of rasterization
|
||||
|
||||
Reference in New Issue
Block a user