Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ moge_model = MoGeModel.from_pretrained("Ruicheng/moge-vitl").to(device)
|
|
| 44 |
|
| 45 |
def depth2uint16(depth):
|
| 46 |
return depth * torch.iinfo(torch.uint16).max / 10.0 # threshold is in m, convert to uint16 value
|
| 47 |
-
|
| 48 |
def save_tensor_as_png(tensor: torch.Tensor, path: str, dtype: torch.dtype | None = None):
|
| 49 |
if dtype is None:
|
| 50 |
dtype = tensor.dtype
|
|
|
|
| 44 |
|
| 45 |
def depth2uint16(depth):
|
| 46 |
return depth * torch.iinfo(torch.uint16).max / 10.0 # threshold is in m, convert to uint16 value
|
| 47 |
+
#
|
| 48 |
def save_tensor_as_png(tensor: torch.Tensor, path: str, dtype: torch.dtype | None = None):
|
| 49 |
if dtype is None:
|
| 50 |
dtype = tensor.dtype
|