mirror of
https://github.com/gaomingqi/Track-Anything.git
synced 2025-12-16 08:27:49 +01:00
Merge branch 'master' of github.com:gaomingqi/Track-Anything
This commit is contained in:
@@ -68,6 +68,7 @@ class BaseInpainter:
|
|||||||
# size: (w, h)
|
# size: (w, h)
|
||||||
if ratio == 1:
|
if ratio == 1:
|
||||||
size = None
|
size = None
|
||||||
|
binary_masks = masks
|
||||||
else:
|
else:
|
||||||
size = [int(W*ratio), int(H*ratio)]
|
size = [int(W*ratio), int(H*ratio)]
|
||||||
size = [si+1 if si%2>0 else si for si in size] # only consider even values
|
size = [si+1 if si%2>0 else si for si in size] # only consider even values
|
||||||
@@ -78,7 +79,6 @@ class BaseInpainter:
|
|||||||
binary_masks = resize_masks(masks, tuple(size))
|
binary_masks = resize_masks(masks, tuple(size))
|
||||||
frames = resize_frames(frames, tuple(size)) # T, H, W, 3
|
frames = resize_frames(frames, tuple(size)) # T, H, W, 3
|
||||||
# frames and binary_masks are numpy arrays
|
# frames and binary_masks are numpy arrays
|
||||||
|
|
||||||
h, w = frames.shape[1:3]
|
h, w = frames.shape[1:3]
|
||||||
video_length = T
|
video_length = T
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user