pcb_rpp_for_reid's People
Forkers
liangzheng06 codes-kzhan adwardy hxl1990 sxzrt renyanfei12321 18242360613 elyor-anyvision ieee820 liviust hou-yz dengshuo x2ss december-boy ucasqcz dingrizhi yang502 lewiszhao bityangke tntant dinggd chenkaiidy lxtgh sundawei payneyong toumakazusa3 upgirlnana minygd 137996047 xiaoweihappy123 mynameischaos xjhaoren swg209 starstylesky pekemonzzx junsuilin zda920 vikiqiu tengsz cm-unit litongxin666 yuanwei0908 sft110 youngyoung611 shanrenli andy3525 chaucergit zhenpengchencode xwen99 zmldlut chrisbyd dreadlord1984 thang-dao lmy0217 yangtao-ai alan-paul sohuemily shengyupei wanyd omgteam aban77 frankchenggd erqidiy mzq308734881 hfyer lujiely zhumingxu learneasy2016 odrowsyo ahwhbc starry226 tommylitlle liangfeifei0920 yjh576 xiaomujiang prozhom pengqingxi chucy2020 chen-rjie dr-lingxiao sabrinamqq ghw2016z lmrenew iq-scm nobelvictory jong980812pcb_rpp_for_reid's Issues
RPP性能只有43.9
你好,感谢你将代码分享出来。
我在跑你的实验时发现,光是训PCB,按照你的配置是可以得到给出来的性能的,但是训练RPP的时候在market1501上只有43.9的mAP,我想确定下是第一步只训练PCB20个epoch,并且学习率不下降?(因为下降次数为20epoch);第二步训练RPP50个epoch,然后20次的时候下降一次学习率。这种默认的配置是正确的么
In the dataset CUHK03, do we use the new evaluation criteria?
In the dataset CUHK03, I experimented with the new evaluation criteria and got an accuracy rate higher than 3%. You want to know which evaluation standard you use, thank you.
PRR stage seems the same as PCB stage?
what's the difference between the PRR.py and PCB.py file ? I noted that, in PRR.py, you create model with additional parameters (T,dim), but in the resnet.py file, these two parameters seems not used ?
Error occur when run train_PCB.sh
In file reid/models/resnet.py, line131, in foward
x = F.avg_pool2d(x,kernel_size=(kx,x.size(3)),stride=(sx,x.size(3))) # H4 W8
TypeError: avg_pool2d() argument 'stride' must be tuple of ints, but found element of type float at pos1
I don't know what's going wrong with this, can some one help me?
Do you have Caffe implementation?
I implement the IDE model with caffe, but I just achieve 79.6 R@1 and 56.4 mAP on Market1501 (SQ).
Error occured when run train_RPP.sh
Traceback (most recent call last):
File "RPP.py", line 226, in
main(parser.parse_args())
File "RPP.py", line 166, in main
checkpoint = load_checkpoint(osp.join(args.logs_dir, 'checkpoint.pth.tar'))
File "/home/uers/PCB_RPP_for_reID-master/reid/utils/serialization.py", line 37, in load_checkpoint
raise ValueError("=> No checkpoint found at '{}'".format(fpath))
ValueError: => No checkpoint found at 'logs/market-1501/RPP/checkpoint.pth.tar'
CUDA error: out of memory
When I use 6G GPU to run "sh train_PCB.sh" code and get the following error:
(some one suggested that this may caused by batch_size set too big, is this the case and how to resolve this?) Thanks.
$ sh train_PCB.sh
Market dataset loaded
subset | # ids | # images
train | 751 | 12936
query | 750 | 3368
gallery | 751 | 15913
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:47: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
init.kaiming_normal(self.local_conv.weight, mode= 'fan_out')
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:50: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.feat_bn2d.weight,1) #initialize BN, may not be used
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:51: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.feat_bn2d.bias,0) # iniitialize BN, may not be used
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:55: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(self.instance0.weight, std=0.001)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:56: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.instance0.bias, 0)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:60: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(self.instance1.weight, std=0.001)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:61: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.instance1.bias, 0)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:65: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(self.instance2.weight, std=0.001)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:66: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.instance2.bias, 0)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:70: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(self.instance3.weight, std=0.001)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:71: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.instance3.bias, 0)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:75: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(self.instance4.weight, std=0.001)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:76: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.instance4.bias, 0)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:80: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(self.instance5.weight, std=0.001)
/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py:81: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.instance5.bias, 0)
Traceback (most recent call last):
File "PCB.py", line 202, in
main(parser.parse_args())
File "PCB.py", line 145, in main
trainer.train(epoch, train_loader, optimizer)
File "/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/trainers_partloss.py", line 33, in train
loss0, loss1, loss2, loss3, loss4, loss5, prec1 = self._forward(inputs, targets)
File "/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/trainers_partloss.py", line 74, in _forward
outputs = self.model(*inputs)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/parallel/data_parallel.py", line 121, in forward
return self.module(*inputs[0], **kwargs[0])
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/peter/下载/re-ID/PCB_RPP_for_reID/reid/models/resnet.py", line 121, in forward
x = module(x)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/torchvision/models/resnet.py", line 91, in forward
identity = self.downsample(x)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/batchnorm.py", line 66, in forward
exponential_average_factor, self.eps)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/functional.py", line 1254, in batch_norm
training, momentum, eps, torch.backends.cudnn.enabled
RuntimeError: CUDA error: out of memory
TypeError: forward() takes exactly 2 arguments (129 given)
Hi, when I use torch=1.1.0, I get the following error
TypeError: forward() takes exactly 2 arguments (129 given)
How can I modify the program to apply to torch=1.1.0?Thanks.
when extracting image features
When I run RPP.py for evaluation, I find that it walk through dropout to get out0(images features through RPP model) for calculating pairwise distance, I wonder if it will influence the correct of images features for testing.
Thanks
你好,借用了您的代码
复现时,出现了,market和duck数据库加载不了的情况。
python PCB.py
--dataset duke
--data-dir /home/zhangdelei/PCB_RPP_for_reID-master/
--height 256
--width 128
--resume /home/zhangdelei/PCB_RPP_for_reID-master/
这是我的训练参数,请问是否是我参数有问题,或者是路径问题
duke数据集使用train_rpp.py
Why some operations are not same in two model files?
In ./reid/models/resnet.py Line164:
- Why calulating the mean and norm the out2?
center = out1.mean(0).unsqueeze(0).expand_as(out1)
out2 = x/x.norm(2,1).unsqueeze(1).expand_as(x)
out2 is calculated without self.feat and self.feat_bn and the value of center is not used?
- But in the resnet_rpp.py:
the out2 is :
if self.has_embedding:
x = self.feat(x)
x = self.feat_bn(x)
out2 = x/ x.norm(2,1).unsqueeze(1).expand_as(x)
The operations are not same, is there some reason for such implementation?
Is this because it is not used in the model due to the self.FCN=True? So that we can ignore the following operations ?
- the model add a lot of norm operations, it seems like that when we need an output from the model, we add a norm operation, such as resnet_rpp.py Line 153,159,162, is there any reason?
A little suggestion:
>>> import torch
>>> import torch.nn.functional as F
>>> aaa=torch.rand(32,1024,8,4)
>>> feat_F_norm = F.normalize(aaa)
>>> feat_ = aaa/aaa.norm(2,1).unsqueeze(1).expand_as(aaa)
>>> torch.sum(feat_F_norm-feat_)
tensor(0.)
you can use F.normalize instead of the operations in the paper, they are same.
Error occur trainers_partloss.py
In file reid/trainers_partloss.py, line 41, in train
torch.autograd.backward([ loss0, loss1, loss2, loss3, loss4, loss5],[torch.ones(1).cuda(), torch.ones(1).cuda(), torch.ones(1).cuda(),torch.ones(1).cuda(),torch.ones(1).cuda(),torch.ones(1).cuda(),torch.ones(1).cuda()])
RuntimeError: Mismatch in shape: grad_output[0] has a shape of torch.Size([1]) and output[0] has a shape of torch.Size([]).
I don't know what's going wrong with this, can some one help me?
evaluation question
train the model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.