automan000 / camera-based-person-reid Goto Github PK
View Code? Open in Web Editor NEWThe official code for ECCV2020 "Rethinking the Distribution Gap of Person Re-identification with Camera-based Batch Normalization"
The official code for ECCV2020 "Rethinking the Distribution Gap of Person Re-identification with Camera-based Batch Normalization"
CBN是一个非常棒的idea,他在更新少量的参数情况下就能取得非常卓越的性能提升。为了复现你们论文的baseline,我在你们的test_mdel.py的49行之后,为每个camera更新BN之前增加了一个正常测试的函数,然而我发现这样子跑出来的性能会低于你们的baseline 10几个点以上。我想问一下,在copy模型的state dict的时候或者之后,是不是没有copy到某个东西?还是保存的模型的state dict有问题?
代码如下
`
def _normal_testing( data ):
data_loader = DataLoader(
data_manager.init_datafolder(opt.testset_name, data, TestTransform(opt.height, opt.width)),
batch_size=opt.test_batch, num_workers=opt.workers,
pin_memory=pin_memory, shuffle=False
)
fs, pids, camids = reid_evaluator.produce_features(data_loader, normalize=True)
return fs, pids, camids
print('Processing query features...')
qf, q_pids, q_camids = _normal_testing(dataset.query )
print( qf.shape )
print('Processing gallery features...')
gf, g_pids, g_camids = _normal_testing(dataset.gallery )
print( gf.shape )
print('Computing CMC and mAP...')
reid_evaluator.get_final_results_with_features(qf, q_pids, q_camids, gf, g_pids, g_camids)`
Hello,I find that when using multi gpu to test the trained model, mAP and rank-1 descended. Is this normal?Could you provide some possible explanations?
Hi,
First and foremost, Thanks for your code!
As shown in your code, you set the Momentum of BN to None. While in the testing stage, it means that :
running mean = mean of the last mini-bath
running var = var of the last mini-bath
So I wonder why the number of mini-batch influences your results.
I think this is a random problem that if you choose the best mini-batch, you will get the best results, even if you only choose one mini-batch to calculate the running mean and var of the test camera.
您好,非常感谢并敬佩您的工作!我看到您项目trainer.py里传参数进self._forward()里的时候传的是一个列表,然后列表的不同元素是当前batch的不同相机的图片集,我想问问这样进行前传的时候会遍历列表单独算每个元素(相机)里图片的均值和标准差然后进行相机的正则化吗?谢谢
Hello, I reproduced the results of the paper on the two data sets of market and duke. I tried to use this method in my own larger network, but xent became difficult to converge. Have you tried other Is the baseline, for example strongbaseline, a larger model will make it difficult for loss to converge?
最后输出特征时加了一个 nn.BatchNorm1d(2048, momentum=None)
Hello, I greatly appreciate the work and its pretty resourceful.
I am trying to understand the training process and my question here is how are the running means and variances of batch norm layers going to get affected over time during the training process if I have data from multiple cameras.
Say, if I am training on a single gpu, I would have only one replica created in your custom DataParallel module and all the sub-batches belonging to different cameras would be sent through the same replica or model. Wouldn't this cause the running means and variances of batch norm layers to be updated using data from all the cams? I understand that we would eventually drop these values during testing phase but this would cause the batch norm updates to be uneven during training phase and the network wouldn't learn efficiently. Moreover, wouldn't it defeat the purpose of isolating the batch norm values based on camera specific information? Please share your thoughts on this. Thanks in advance.
作者您好!看了您的论文,感觉这是一个很不错的工作,我看您消融实验部分table6有关于训练阶段使用CBN方法的效果,有点困惑,请问训练阶段怎么使用CBN呢?是在每个epoch前采样每个相机图像的均值和方差参数吗?
Hi, I am appreciated for the work you have done.
I am really interested in the weakly-supervised learning and incremental learning parts, which are not released. Will it be released in the future?
RT
代码中的重点应该是CamDataParallel对吧?请问如果要用distributedDataParallel,我应该怎么修改呢?
这是一个非常棒的工作,通过对齐不同摄像机的统计量来获得巨大的性能提升。然而我注意到你的损失函数为CrossEntorpyLoss,并且你的Sampler为IdentitySampler,那么你为什么不加上Triplet Loss呢?加上Triplet Loss是会引起你模型性能的下降吗?我训练了fastreid的模型,并且在测试的时候使用了你的CBN,发现模型mAP直接到了个位数,无论是跨域还是supervised,这是否表明你的CBN依靠于一种固定的训练策略?
I'm confusing about how to draw Figure1, especially Figure1(a)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.