From 244811a3439dca9c02adce81f7a73a191bc2cddb Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 18 Jan 2019 13:30:13 +0100 Subject: log less, fix crop --- crop_frames.py | 2 +- test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crop_frames.py b/crop_frames.py index 6ce54d8..87a3a13 100644 --- a/crop_frames.py +++ b/crop_frames.py @@ -73,7 +73,7 @@ def crop_image(raw_fn, width, height, step, side, overlap, top_offset): crop_dir = "{}/crop_{}_{}_{}_{}".format(args.out_dir, x, y, w, h) # print("{}x{} {}x{}".format(x, y, w, h)) crop = img.crop((xx, yy + top_offset, xx + w, yy + h + top_offset)) - print("{}/{}".format(crop_dir, fn)) + # print("{}/{}".format(crop_dir, fn)) crop.save("{}/{}".format(crop_dir, fn)) if __name__ == "__main__": diff --git a/test.py b/test.py index ec88299..5a3da41 100644 --- a/test.py +++ b/test.py @@ -67,7 +67,8 @@ def process_dir(dir): frames_padded = np.lib.pad(frames, pad_width=((T_in//2,T_in//2),(0,0),(0,0),(0,0)), mode='constant') for i in range(frames.shape[0]): - print('Scene {}: Frame {}/{} processing'.format(tag, i+1, frames.shape[0])) + if (i % 100) == 1: + print('Scene {}: Frame {}/{} processing'.format(tag, i+1, frames.shape[0])) in_L = frames_padded[i:i+T_in] # select T_in frames in_L = in_L[np.newaxis,:,:,:,:] -- cgit v1.2.3-70-g09d2