Spaces:
Running
Running
movie output format improvement to compare two (forward - back ) (#4)
Browse files- movie output format improvement to compare two (forward - back ) (210c95a87e3a2842268dfebc65609b2c639ec639)
Co-authored-by: Akihiko SHIRAI <DrHakase@users.noreply.huggingface.co>
app.py
CHANGED
@@ -239,9 +239,11 @@ class Model:
|
|
239 |
for i in range(0, frame_num):
|
240 |
img = self.get_img(((1 - lin[i]) * w1) + (lin[i] * w2), noise)
|
241 |
video.append_data(img)
|
|
|
|
|
|
|
242 |
video.close()
|
243 |
|
244 |
-
|
245 |
def get_thumbnail(img):
|
246 |
img_new = np.full((256, 384, 3), 200, dtype=np.uint8)
|
247 |
img_new[:, 128:256] = transform.resize(img, (256, 128), preserve_range=True)
|
|
|
239 |
for i in range(0, frame_num):
|
240 |
img = self.get_img(((1 - lin[i]) * w1) + (lin[i] * w2), noise)
|
241 |
video.append_data(img)
|
242 |
+
for i in reversed(range(0, frame_num)):
|
243 |
+
img = self.get_img(((1 - lin[i]) * w1) + (lin[i] * w2), noise)
|
244 |
+
video.append_data(img)
|
245 |
video.close()
|
246 |
|
|
|
247 |
def get_thumbnail(img):
|
248 |
img_new = np.full((256, 384, 3), 200, dtype=np.uint8)
|
249 |
img_new[:, 128:256] = transform.resize(img, (256, 128), preserve_range=True)
|