mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 14:20:38 +08:00
allow changes to background_color in BlendParams (#64)
Summary: BlendParams background_color is immutable , type hint as a sequence allows setting new values in constructor. Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/64 Reviewed By: bottler Differential Revision: D20068911 Pulled By: nikhilaravi fbshipit-source-id: c580a7654dca25629218513841aa16d9d1055588
This commit is contained in:
committed by
Facebook Github Bot
parent
4233c32887
commit
a0f3dc2d63
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
import numpy as np
|
||||
from typing import NamedTuple
|
||||
from typing import NamedTuple, Sequence
|
||||
import torch
|
||||
|
||||
# Example functions for blending the top K colors per pixel using the outputs
|
||||
@@ -15,7 +15,7 @@ import torch
|
||||
class BlendParams(NamedTuple):
|
||||
sigma: float = 1e-4
|
||||
gamma: float = 1e-4
|
||||
background_color = (1.0, 1.0, 1.0)
|
||||
background_color: Sequence = (1.0, 1.0, 1.0)
|
||||
|
||||
|
||||
def hard_rgb_blend(colors, fragments) -> torch.Tensor:
|
||||
|
||||
Reference in New Issue
Block a user