mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
flavr.py: Set working dir before trying to import dataset
This enables compatibility with embedded python.
This commit is contained in:
@@ -9,8 +9,6 @@ from PIL import Image
|
||||
import numpy as np
|
||||
import _thread
|
||||
from torchvision.io import read_video, write_video
|
||||
from dataset.transforms import ToTensorVideo, Resize
|
||||
|
||||
import torch.nn.functional as F
|
||||
|
||||
abspath = os.path.abspath(__file__)
|
||||
@@ -20,6 +18,8 @@ os.chdir(os.path.dirname(dname))
|
||||
print("Added {0} to temporary PATH".format(dname))
|
||||
sys.path.append(dname)
|
||||
|
||||
from dataset.transforms import ToTensorVideo, Resize
|
||||
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
@@ -42,8 +42,6 @@ path = args.input
|
||||
base = os.path.basename(path)
|
||||
interp_input_path = os.path.join(dname, args.input)
|
||||
interp_output_path = os.path.join(dname, args.output)
|
||||
print("\interp_input_path: " + interp_input_path)
|
||||
print("\ninterp_output_path: " + interp_output_path)
|
||||
|
||||
if args.input.endswith("/"):
|
||||
video_name = args.input.split("/")[-2].split(input_ext)[0]
|
||||
|
||||
Reference in New Issue
Block a user