ronghuaiyang / arcface-pytorch

1.72k stars 391 forks source link

test problem #47

Open gudianyue opened 4 years ago

gudianyue commented 4 years ago

when i run python test.py. the problem will come: D:\anaconda\envs\pytorch\python.exe "D:/py program/arcface-pytorch-master/test.py" read ./data/Datasets/lfw/lfw-align-128\Abel_Pacheco/Abel_Pacheco_0001.jpg error Traceback (most recent call last): File "D:/py program/arcface-pytorch-master/test.py", line 172, in lfw_test(model, img_paths, identity_list, opt.lfw_test_list, opt.test_batch_size) File "D:/py program/arcface-pytorch-master/test.py", line 143, in lfw_test features, cnt = get_featurs(model, img_paths, batch_size=batch_size) File "D:/py program/arcface-pytorch-master/test.py", line 62, in get_featurs if images.shape[0] % batch_size == 0 or i == len(test_list) - 1: AttributeError: 'NoneType' object has no attribute 'shape'

Process finished with exit code 1 why?

mengxia1994 commented 4 years ago

I met the same problem, i tested step by step and finally found the wrong place. It is an absolute path problem. The lfw_root in config.py shouldn't begin with '/data/...', it should be, e.g. '/root/arcface-pytorch/data/...' or easier, remove the '/' in front of data/...

In addition, when i run it. Several import error happened, i add a '.' before the py file names and it works. Seems that the init.py doesn't work.

Youqi970124 commented 2 years ago

I change the path but I still have this problem. Could someone help me This is my e-mail: youqi860124@alum.ccu.edu.tw

Thank you very much.