Spaces:
Paused
Paused
Rename app.py to app.py Changed make3d input to support transpoed inputimages
Browse files
app.py → app.py Changed make3d input to support transpoed inputimages
RENAMED
|
@@ -228,6 +228,8 @@ def make3d(images):
|
|
| 228 |
model = model.eval()
|
| 229 |
|
| 230 |
images = np.asarray(images, dtype=np.float32) / 255.0
|
|
|
|
|
|
|
| 231 |
images = torch.from_numpy(images).permute(2, 0, 1).contiguous().float() # (3, 960, 640)
|
| 232 |
images = rearrange(images, 'c (n h) (m w) -> (n m) c h w', n=3, m=2) # (6, 3, 320, 320)
|
| 233 |
|
|
|
|
| 228 |
model = model.eval()
|
| 229 |
|
| 230 |
images = np.asarray(images, dtype=np.float32) / 255.0
|
| 231 |
+
if images.shape[0] == 640 and images.shape[1] == 960:
|
| 232 |
+
images = np.transpose(images, (1, 0, 2))
|
| 233 |
images = torch.from_numpy(images).permute(2, 0, 1).contiguous().float() # (3, 960, 640)
|
| 234 |
images = rearrange(images, 'c (n h) (m w) -> (n m) c h w', n=3, m=2) # (6, 3, 320, 320)
|
| 235 |
|