Spaces:
Running on Zero
Running on Zero
do not clip negative Z, it is valid in the current normals formulation (we can see normals pointing negative z with wide FoV cameras)
Browse files
marigold_normals_estimation.py
CHANGED
|
@@ -405,9 +405,6 @@ class MarigoldNormalsPipeline(DiffusionPipeline):
|
|
| 405 |
# clip prediction
|
| 406 |
pixels = torch.clip(pixels, -1.0, 1.0)
|
| 407 |
|
| 408 |
-
# clip negative Z-axis
|
| 409 |
-
pixels[:, 2, :, :] = torch.clip(pixels[:, 2, :, :], 0.0, 1.0)
|
| 410 |
-
|
| 411 |
# renormalize prediction
|
| 412 |
norm = torch.norm(pixels, dim=1, keepdim=True)
|
| 413 |
pixels = pixels / norm.clamp(min=1e-6)
|
|
|
|
| 405 |
# clip prediction
|
| 406 |
pixels = torch.clip(pixels, -1.0, 1.0)
|
| 407 |
|
|
|
|
|
|
|
|
|
|
| 408 |
# renormalize prediction
|
| 409 |
norm = torch.norm(pixels, dim=1, keepdim=True)
|
| 410 |
pixels = pixels / norm.clamp(min=1e-6)
|