From c7fa7350336bfdccc6d0f41d84c1c482934dfc5a Mon Sep 17 00:00:00 2001 From: Griffin98 Date: Fri, 11 Oct 2019 10:38:53 +0530 Subject: [PATCH] Fix eval.py script Since, we are already generating trimap in eval.py itself. Then, their is no need to provide trimap image as input. Signed-off-by: Griffin98 --- README.md | 2 +- eval.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 797cbb9..baf7caa 100644 --- a/README.md +++ b/README.md @@ -64,4 +64,4 @@ The training script will save a checkpoint in the `log` directory after each 100 ## Evaluate In order to try our model, we included a snapshot of our trained model (in the `log` directory). That can be used as follow: -`python3 eval.py --checkpoint -1` +`python3 eval.py --checkpoint -1` diff --git a/eval.py b/eval.py index 19b6937..bc3a053 100644 --- a/eval.py +++ b/eval.py @@ -68,8 +68,6 @@ def parse_args(): parser = argparse.ArgumentParser(description="Evalutate image") parser.add_argument("input", type=str, help="Path to a file containing input image") - parser.add_argument("object", type=str, - help="Path to a file containing trimap image") parser.add_argument("output", type=str, help="Path to the output file") parser.add_argument('--checkpoint', type=int, default=None, @@ -116,7 +114,7 @@ def main(args): input_filename = args.input image = load_image(input_filename) print(image.shape) - trimap = generate_trimap(args.object) + trimap = generate_trimap(input_filename) image = np.array(image) trimap = np.array(trimap)[..., np.newaxis]