mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-23 15:50:39 +08:00
remove unused params + cubify note
Summary: This diff * removes the unused compositing params * adds a note describing cubify Reviewed By: nikhilaravi Differential Revision: D22426191 fbshipit-source-id: e8aa32040bb594e1dfd7d6d98e29264feefcec7c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
38eadb75e2
commit
3d7dea58e1
@@ -3,7 +3,7 @@
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
from ..compositing import CompositeParams, alpha_composite, norm_weighted_sum
|
||||
from ..compositing import alpha_composite, norm_weighted_sum
|
||||
|
||||
|
||||
# A compositor should take as input 3D points and some corresponding information.
|
||||
@@ -16,15 +16,11 @@ class AlphaCompositor(nn.Module):
|
||||
Accumulate points using alpha compositing.
|
||||
"""
|
||||
|
||||
def __init__(self, composite_params=None):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.composite_params = (
|
||||
composite_params if composite_params is not None else CompositeParams()
|
||||
)
|
||||
|
||||
def forward(self, fragments, alphas, ptclds, **kwargs) -> torch.Tensor:
|
||||
images = alpha_composite(fragments, alphas, ptclds, self.composite_params)
|
||||
images = alpha_composite(fragments, alphas, ptclds)
|
||||
return images
|
||||
|
||||
|
||||
@@ -33,12 +29,9 @@ class NormWeightedCompositor(nn.Module):
|
||||
Accumulate points using a normalized weighted sum.
|
||||
"""
|
||||
|
||||
def __init__(self, composite_params=None):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.composite_params = (
|
||||
composite_params if composite_params is not None else CompositeParams()
|
||||
)
|
||||
|
||||
def forward(self, fragments, alphas, ptclds, **kwargs) -> torch.Tensor:
|
||||
images = norm_weighted_sum(fragments, alphas, ptclds, self.composite_params)
|
||||
images = norm_weighted_sum(fragments, alphas, ptclds)
|
||||
return images
|
||||
|
||||
Reference in New Issue
Block a user