Skip to content

Commit

Permalink
remove redundant arg
Browse files Browse the repository at this point in the history
  • Loading branch information
yunxiaoshi committed Aug 30, 2020
1 parent 654511c commit f288a8d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
file - test.py
Simple quick script to evaluate model on test images.
Copyright (C) Yunxiao Shi 2017 - 2020
NIMA is released under the MIT license. See LICENSE for the fill license text.
"""

import argparse
import os
import numpy as np
Expand All @@ -11,19 +19,14 @@

from model.model import *


parser = argparse.ArgumentParser()
parser.add_argument('--model', type=str, help='path to pretrained model')
parser.add_argument('--test_csv', type=str, help='test csv file')
parser.add_argument('--test_images', type=str, help='path to folder containing images')
parser.add_argument('--out', type=str, help='dest for images with predicted score')
parser.add_argument('--workers', type=int, default=4, help='number of workers')
parser.add_argument('--predictions', type=str, help='output file to store predictions')
args = parser.parse_args()

if not os.path.exists(args.out):
os.makedirs(args.out)

base_model = models.vgg16(pretrained=True)
model = NIMA(base_model)

Expand Down Expand Up @@ -78,6 +81,3 @@
f.write(str(img) + ' mean: %.3f | std: %.3f | GT: %.3f\n' % (mean, std, gt_mean))
mean, std = 0.0, 0.0
pbar.update()



0 comments on commit f288a8d

Please sign in to comment.