Skip to content

Commit

Permalink
use tqdm for progress
Browse files Browse the repository at this point in the history
  • Loading branch information
matpalm committed Oct 19, 2020
1 parent e181815 commit 49d1d77
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions run_model_on_full_res.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import util as u
import tensorflow as tf
from tensorflow.data.experimental import AUTOTUNE
import sys
import re
import tqdm

parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
Expand All @@ -29,7 +29,7 @@


def fnames():
for fname in open(opts.manifest, 'r').readlines():
for fname in tqdm.tqdm(open(opts.manifest, 'r').readlines()):
yield fname.strip()


Expand Down Expand Up @@ -61,6 +61,3 @@ def just_fname(full_name):
dither_pil = u.dither_to_pil(dither)
dither_pil = u.center_crop(dither_pil, 1448, 1072)
dither_pil.save("%s/%s" % (opts.output_dir, dest_fname))
sys.stdout.write("%s \r" % dest_fname)
sys.stdout.flush()
print()

0 comments on commit 49d1d77

Please sign in to comment.