squeeze
Browse files
dronescapes_reader/dronescapes_representations.py
CHANGED
@@ -41,7 +41,7 @@ class DepthRepresentation(NpzRepresentation):
|
|
41 |
return y.astype(np.uint8)
|
42 |
|
43 |
def load_from_disk(self, path: Path) -> tr.Tensor:
|
44 |
-
res = super().load_from_disk(path)
|
45 |
res = res.float().clip(self.min_depth, self.max_depth)
|
46 |
res = (res - self.min_depth) / (self.max_depth - self.min_depth)
|
47 |
return res
|
|
|
41 |
return y.astype(np.uint8)
|
42 |
|
43 |
def load_from_disk(self, path: Path) -> tr.Tensor:
|
44 |
+
res = super().load_from_disk(path).squeeze().unsqueeze(-1)
|
45 |
res = res.float().clip(self.min_depth, self.max_depth)
|
46 |
res = (res - self.min_depth) / (self.max_depth - self.min_depth)
|
47 |
return res
|