seathiefwang / MGN-pytorch

Reproduction of paper: Learning Discriminative Features with Multiple Granularities for Person Re-Identification
285 stars 108 forks source link

Test the model #4

Closed TTMRonald closed 5 years ago

TTMRonald commented 6 years ago

Hi, seathiefwang. Your work is good, but I have a problem. If I just want to test this model on cpu, how do I need to modify demo.sh?

seathiefwang commented 6 years ago

You can add --cpu parameter.

TTMRonald commented 6 years ago

@seathiefwang If I just want to test the model_best.pt which you provided, how do I need to modify demo.sh? add --test_only parameter? where should the model_best.pt be placed?

seathiefwang commented 6 years ago

python3 main.py --datadir ../reid-mgn/Market-1501-v15.09.15/ --margin 1.2 --save sgd_0 --cpu --test_only --resume 0 --pre_train experiment/sgd_0/model/model_best.pt

TTMRonald commented 6 years ago

@seathiefwang thanks.

hsdong2012 commented 6 years ago

Hi, seathiefwang When I run the code, the following problem occurs: TypeError: '<' not supported between instances of 'slice' and 'int' I tracked the code, and find the it is invoked by the following line res_conv4 = nn.Sequential(*resnet.layer3[1:]) could you help me to solve this problem?

the environment is as follows: python 3.6, pytorch 0.4.1, torchvision, 0.21,

chj1933 commented 6 years ago

@seathiefwang, 老师,你好!请问一下如果我用你的MGN训练好模型后,我要在另外一个数据集进行微调,应该怎么做?谢谢解答。

seathiefwang commented 6 years ago

@hsdong2012 Have you modified the code? I don't know this error, can I submit a complete error log?

seathiefwang commented 6 years ago

@chj1933 这个项目没有编写针对于其它数据集的加载数据集代码,如果你需要在其它数据集上进行训练,需要在data目录下仿照market1501.py编写数据加载代码。