diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-09 21:01:03 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-09 21:01:03 +0100 |
| commit | 80c0a878664a1ff5f2f015f866a14d9d1c5780e1 (patch) | |
| tree | 231a720ab478240ea9fa659fd984942b89aaa3c7 /cli/app/search/search_class.py | |
| parent | 062d272b5ae1417e3d77a11eacfff2f2042b493b (diff) | |
timestamp
Diffstat (limited to 'cli/app/search/search_class.py')
| -rw-r--r-- | cli/app/search/search_class.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/app/search/search_class.py b/cli/app/search/search_class.py index f290908..40801d6 100644 --- a/cli/app/search/search_class.py +++ b/cli/app/search/search_class.py @@ -24,6 +24,7 @@ from app.search.image import image_to_uint8, imconvert_uint8, imconvert_float32, from app.search.vector import truncated_z_sample, truncated_z_single, \ create_labels, create_labels_uniform from app.search.video import export_video +from app.search.params import timestamp feature_layer_names = { '1a': "InceptionV3/Conv2d_1a_3x3", @@ -199,7 +200,6 @@ def find_nearest_vector(sess, generator, opt_fp_in, opt_dims, out_images, out_la phi_guess = sess.run(output) guess_im = imgrid(imconvert_uint8(phi_guess), cols=1) fp_out_im = join(app_cfg.DIR_OUTPUTS, fp_frames, 'frame_{:04d}.png'.format(int(i / opt_snapshot_interval))) - print(fp_out_im) imwrite(fp_out_im, guess_im) except KeyboardInterrupt: pass @@ -218,7 +218,7 @@ def load_target_image(opt_fp_in): print("Loading {}".format(opt_fp_in)) fn = os.path.basename(opt_fp_in) fn_base, ext = os.path.splitext(fn) - fp_frames = "frames_{}_{}".format(fn_base, int(time.time() * 1000)) + fp_frames = "frames_{}_{}".format(fn_base, timestamp()) fp_frames_fullpath = join(app_cfg.DIR_OUTPUTS, fp_frames) print("Output to {}".format(fp_frames_fullpath)) os.makedirs(fp_frames_fullpath, exist_ok=True) |
