Spaces:
Runtime error
Runtime error
Linoy Tsaban
commited on
Commit
·
5ef9d3c
1
Parent(s):
536f1c7
Update utils.py
Browse files
utils.py
CHANGED
@@ -42,7 +42,7 @@ def video_to_frames(video_path, img_size=(512,512)):
|
|
42 |
image = T.ToPILImage()(video[i])
|
43 |
|
44 |
# get new height and width to maintain aspect ratio
|
45 |
-
height, width = image.
|
46 |
new_height = img_size[0] * height / width
|
47 |
new_width = img_size[1] * width / height
|
48 |
|
|
|
42 |
image = T.ToPILImage()(video[i])
|
43 |
|
44 |
# get new height and width to maintain aspect ratio
|
45 |
+
height, width = image.size
|
46 |
new_height = img_size[0] * height / width
|
47 |
new_width = img_size[1] * width / height
|
48 |
|