AbnerHqC / GaitSet

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

test.py value error #41

Open Cyprusky opened 5 years ago

Cyprusky commented 5 years ago

Initialzing... Initializing data source... Data initialization complete. Initializing model... Model initialization complete. Loading the model of iteration 10000... Transforming... Traceback (most recent call last): File "test.py", line 42, in test = m.transform('test', opt.batch_size) File "/media/cyprus/Data/DL/GaitSet-master/model/model.py", line 252, in transform return np.concatenate(feature_list, 0), view_list, seq_type_list, label_list ValueError: need at least one array to concatenate

作者大大您好,我迭代设置的10000次,sid_num30,出现这个报错的原因是什么呢?

aldo3polyta commented 5 years ago

@Cyprusky So, can you solve now? Thank you. My probelm is same with you.

prb2307 commented 5 years ago

@aldotripolyta @Cyprusky Did you change anything from the preprocessed data? There are a total of 124 subjects and if you change anything from the test data then it gives you this error. How many subjects do you have in the test set??

Cyprusky commented 5 years ago

@aldotripolyta @Cyprusky Did you change anything from the preprocessed data? There are a total of 124 subjects and if you change anything from the test data then it gives you this error. How many subjects do you have in the test set?? thanks.It shows that different subjects(ST MT LT) are used for training or testing in paper.So I have different sets in test set. I dont know if I am right.

aldo3polyta commented 5 years ago

@prashant-bansod

@aldotripolyta @Cyprusky Did you change anything from the preprocessed data? There are a total of 124 subjects and if you change anything from the test data then it gives you this error. How many subjects do you have in the test set??

I'm still confused, what should I change? is it in the config.py & test.py file? I want to try training 24, and the rest for the test. Maybe @Cyprusky can help, too. Thank you.

prb2307 commented 5 years ago

@aldotripolyta I received this message from the author. "maybe,you can try to refer to model.transform to transform special person's silhouettes sequence and compare with other all person by each sequence features(you could get it by transforming person silhouettes, you may write some codes to do this) ,in this project ,it maybe will load all data set to torch.Dataset,you may read the code :model/utils/data_loader.py line:38 for detail of loading train data and test data order"

prb2307 commented 5 years ago

@aldotripolyta btw do you have any idea how to create the silhouettes from the video. I would like to test it on this code. Could you please share any source to extract the human silhouettes from the video? I tried some codes from OpenCV website but the images are a bit too noisy.

aldo3polyta commented 5 years ago

@prashant-bansod I just use dataset from readme :(

Cyprusky commented 5 years ago

@ PRASHANT-bansod

@aldotripolyta @Cyprusky您是否更改了预处理数据中的任何内容?共有124个科目,如果您从测试数据中更改了任何内容,则会出现此错误。你在测试集中有多少科目?

我还是很困惑,我应该改变什么?是在config.py和test.py文件中? 我想尝试训练24,其余的测试。也许@Cyprusky也可以提供帮助。谢谢。

Do u solve this problem?

aldo3polyta commented 5 years ago

maybe,you can try to refer to model.transform to transform special person's silhouettes sequence and compare with other all person by each sequence features(you could get it by transforming person silhouettes, you may write some codes to do this) ,in this project ,it maybe will load all data set to torch.Dataset,you may read the code

@prashant-bansod can you give some examples in writing the code? I did not know. Thank you.

Cyprusky commented 5 years ago

@aldotripolyta I received this message from the author. "maybe,you can try to refer to model.transform to transform special person's silhouettes sequence and compare with other all person by each sequence features(you could get it by transforming person silhouettes, you may write some codes to do this) ,in this project ,it maybe will load all data set to torch.Dataset,you may read the code :model/utils/data_loader.py line:38 for detail of loading train data and test data order"

If the training set is ID 0-23, 24-64, 65-124 respectively, which one should be changed?

prb2307 commented 5 years ago

maybe,you can try to refer to model.transform to transform special person's silhouettes sequence and compare with other all person by each sequence features(you could get it by transforming person silhouettes, you may write some codes to do this) ,in this project ,it maybe will load all data set to torch.Dataset,you may read the code

@prashant-bansod can you give some examples in writing the code? I did not know. Thank you. @aldotripolyta @Cyprusky I have not yet worked on the suggestions given by the author. If I get the solution I will get back to you.

zyfID commented 5 years ago

@Cyprusky 您好,我在测试的时候也碰到这个问题,请问您是怎么解决的呀?我训练的时候是直接把124个人都拿去训练了,测试的时候需要修改什么东西吗?

Cyprusky commented 5 years ago

作者论文里提到的ST MT LT,数量只需要更改config.py里的pid num,zyfiD你说的不对,不是直接把124个人拿去train

zyfID commented 5 years ago

@Cyprusky我train的时候用了74个人,也修改了config.py中的pid_num。那么我运行test.py的时候需要修改什么呢?

Catboss1999 commented 4 years ago

https://blog.csdn.net/qq_21464351/article/details/109546421 我好像知道了是什么问题并写成博文,最好还是希望原作者可以回答一下pid_list是干啥的

zhang123-sys commented 2 years ago

image test error 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".