相关程序如下
parser = argparse.ArgumentParser(description='evaluate.py')
parser.add_argument('INPUT', help='path to input image')
parser.add_argument('REF', default="", nargs="?", help='path to reference image, if omitted NR IQA is assumed')
parser.add_argument('--model', '-m', default='',
help='path to the trained model')
parser.add_argument('--top', choices=('patchwise', 'weighted'),
default='weighted', help='top layer and loss definition')
parser.add_argument('--gpu', '-g', default=0, type=int,
help='GPU ID')
args = parser.parse_args()
我在运行
python evaluate.py D:\PyCharm 2019.3.3\test-code\deepIQA-master\img.jpg
后提示我
Traceback (most recent call last):
File "D:/PyCharm 2019.3.3/test-code/deepIQA-master/evaluate.py", line 75, in <module>
serializers.load_hdf5(args.model, model)
File "D:\PyCharm 2019.3.3\lib\site-packages\chainer\serializers\hdf5.py", line 195, in load_hdf5
with h5py.File(filename, 'r') as f:
File "D:\PyCharm 2019.3.3\lib\site-packages\h5py\_hl\files.py", line 408, in __init__
swmr=swmr)
File "D:\PyCharm 2019.3.3\lib\site-packages\h5py\_hl\files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 88, in h5py.h5f.open
ValueError: Invalid file name (invalid file name)
是我的图片路径不对么?