Skip to content

Commit ae471c6

Browse files
authored
fix image bind after torchvision upgrade and videpth with empty depth map (#1688)
1 parent 3794586 commit ae471c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

notebooks/239-image-bind/239-image-bind-convert.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
" %pip install -q \"eva-decord\"\n",
8383
"\n",
8484
"if sys.platform != \"linux\":\n",
85-
" %pip install -q \"torch>=2.0.1\" \"torchvision>=0.15.2\" \"torchaudio>=2.0.2\"\n",
85+
" %pip install -q \"torch>=2.0.1\" \"torchvision>=0.15.2,<0.17.0\" \"torchaudio>=2.0.2\"\n",
8686
"else:\n",
87-
" %pip install -q \"torch>=2.0.1\" \"torchvision>=0.15.2\" \"torchaudio>=2.0.2\" --index-url https://download.pytorch.org/whl/cpu"
87+
" %pip install -q \"torch>=2.0.1\" \"torchvision>=0.15.2,<0.17.0\" \"torchaudio>=2.0.2\" --index-url https://download.pytorch.org/whl/cpu"
8888
]
8989
},
9090
{

notebooks/246-depth-estimation-videpth/vi_depth_utils/modules/midas/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def write_depth(path, depth, bits=1):
181181
if depth_max - depth_min > np.finfo("float").eps:
182182
out = max_val * (depth - depth_min) / (depth_max - depth_min)
183183
else:
184-
out = np.zeros(depth.shape, dtype=depth.type)
184+
out = np.zeros(depth.shape, dtype=depth.dtype)
185185

186186
if bits == 1:
187187
cv2.imwrite(path + ".png", out.astype("uint8"))

0 commit comments

Comments
 (0)