AbnerHqC / GaitSet

A flexible, effective and fast cross-view gait recognition network
582 stars 170 forks source link

test.py运行报错,预处理后的路径设置好了 #156

Open wangy-alt opened 2 years ago

wangy-alt commented 2 years ago

root@468c2519de72:/workspace/GaitPart# python train.py Initialzing... Initializing data source... Loading training data... libpng error: IDAT: incorrect data check Traceback (most recent call last): File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 56, in _wrapfunc return getattr(obj, method)(*args, **kwds) AttributeError: 'NoneType' object has no attribute 'reshape'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train.py", line 18, in m = initialization(conf, train=opt.cache)[0] File "/workspace/GaitPart/model/initialization.py", line 57, in initialization train_source, test_source = initialize_data(config, train, test) File "/workspace/GaitPart/model/initialization.py", line 18, in initialize_data train_source.load_all_data() File "/workspace/GaitPart/model/utils/data_set.py", line 45, in load_all_data self.load_data(i) File "/workspace/GaitPart/model/utils/data_set.py", line 48, in load_data return self.getitem(index) File "/workspace/GaitPart/model/utils/data_set.py", line 62, in getitem data = [self.loader(_path) for _path in self.seq_dir[index]] File "/workspace/GaitPart/model/utils/data_set.py", line 62, in data = [self.loader(_path) for _path in self.seq_dir[index]] File "/workspace/GaitPart/model/utils/data_set.py", line 51, in loader return self.img2xarray( File "/workspace/GaitPart/model/utils/data_set.py", line 76, in img2xarray frame_list = [np.reshape( File "/workspace/GaitPart/model/utils/data_set.py", line 76, in frame_list = [np.reshape( File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 292, in reshape return _wrapfunc(a, 'reshape', newshape, order=order) File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 66, in _wrapfunc return _wrapit(obj, method, *args, *kwds) File "/opt/conda/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 46, in _wrapit result = getattr(asarray(obj), method)(args, **kwds) ValueError: cannot reshape array of size 1 into shape (64,64,newaxis)

wyp196 commented 2 years ago

我也是这个问题,请问您解决了吗

zhang123-sys commented 2 years ago

image raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for SetNet: Missing key(s) in state_dict: "set_layer1.forward_block.conv.weight", "set_layer2.forward_block.conv.weight", "set_layer3.forward_block.conv.weight", "set_layer4.forward_block.conv.weight", "set_layer5.forward_block.conv.weight", "set_layer6.forward_block.conv.weight", "gl_layer1.conv.weight", "gl_layer2.conv.weight", "gl_layer3.conv.weight", "gl_layer4.conv.weight", "fc_bin.0". Unexpected key(s) in state_dict: "module.set_layer1.forward_block.conv.weight", "module.set_layer2.forward_block.conv.weight", "module.set_layer3.forward_block.conv.weight", "module.set_layer4.forward_block.conv.weight", "module.set_layer5.forward_block.conv.weight", "module.set_layer6.forward_block.conv.weight", "module.gl_layer1.conv.weight", "module.gl_layer2.conv.weight", "module.gl_layer3.conv.weight", "module.gl_layer4.conv.weight", "module.fc_bin.0".