summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-01-15 19:40:02 +0100
committerJules Laplace <julescarbon@gmail.com>2019-01-15 19:40:02 +0100
commit8e06e61f3fd4cfab3f16f66e186abeee7a4cabf1 (patch)
treeb2324111e8abfc5717e96e6c752648f37c804f39 /test.py
parent1e545a8a40b289123570ade0dd871c2beb1e43d2 (diff)
dir
Diffstat (limited to 'test.py')
-rw-r--r--test.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test.py b/test.py
index 57779ff..3b3db01 100644
--- a/test.py
+++ b/test.py
@@ -17,9 +17,9 @@ parser = argparse.ArgumentParser()
parser.add_argument('--L', metavar='L', type=int, default=choice([16, 28, 52]), help='Network depth: One of 16, 28, 52')
parser.add_argument('--T', metavar='T', default='L', help='Input type: L(Low-resolution) or G(Ground-truth)')
parser.add_argument('--in_dir', metavar='in_dir', default=None, help='Directory to process')
-parser.add_argument('--out_dir', metavar='out_dir', default='/media/blue/uprez', help='Directory to output to')
+parser.add_argument('--out_dir', metavar='out_dir', default='/media/blue/uprez/results', help='Directory to output to')
parser.add_argument('--network_dir', default='.', help='Path to networks')
-parser.add_argument('--no_mov', action='store_true')
+parser.add_argument('--mov_from_dirs', action='store_true')
args = parser.parse_args()
# Size of input temporal radius
@@ -46,13 +46,13 @@ def process_dir(dir):
dataset = dir_partz[-2]
part = dir_partz[-1]
tag = '_'.join([dataset, str(args.L) + 'L', part])
- out_path = os.path.join(args.out_dir, 'results', dataset, str(args.L) + 'L', part)
+ out_path = os.path.join(args.out_dir, dataset, str(args.L) + 'L', part)
render_path = os.path.join(args.out_dir, 'renders')
os.makedirs(out_path, exist_ok=True)
os.makedirs(render_path, exist_ok=True)
dir_frames = sorted(glob.glob(os.path.join(dir, '*.png')))
- print(dir_frames)
+ # print(dir_frames)
frames = []
for f in dir_frames:
@@ -70,7 +70,7 @@ def process_dir(dir):
Image.fromarray(np.around(out_H[0,0]*255).astype(np.uint8)).save('{}/frame_{:05d}.png'.format(out_path, i+1))
- if not args.no_mov:
+ if args.mov_from_dirs:
subprocess.call([
'ffmpeg',
'-hide_banner',