AsuradaYuci / understand_videobased_reid

关于video_reid代码的注释,原始代码地址
https://github.com/jiyanggao/Video-Person-ReID
52 stars 11 forks source link

How to split Mars train dataset into train dataset and eval dataset? #1

Closed swg209 closed 5 years ago

swg209 commented 5 years ago

Hi, I run demo of jiyanggao/Video-Person-ReID in Mars dataset, I got confused how to split a eval_set from train_set , I want to test the model on the eval set to save time. Thx

MeaninglessAI commented 5 years ago

actually, eval_set has been split at begin. it's decided by file - "query_IDX.mat".

AsuradaYuci commented 5 years ago

@swg209 I agree with @yangjinray :smile: .

MeaninglessAI commented 5 years ago

不过这个代码我也有一点小小的问题想请教一下:

wx20190303-180712

我感觉应该是features=torch.mean(features,1)才对吧?因为features这个tensor,每一行应该是代表一个tracklet的特征的,所以应该是对每一行求特征均值才对吧。这个参数为“0”,其实是对每一列求均值了。

不知是否可以解答一下?

AsuradaYuci commented 5 years ago

@yangjinray 很长时间没用这个代码了, 其实这一版本的解读很多地方当时理解有误, 我先看看. :sob:

AsuradaYuci commented 5 years ago

@yangjinray features = features.view(n, -1) 输出的维度 = n * 2048, n = the numbers of images 是个变量, 如果采用features=torch.mean(features,1),输出的维度 = n,会造成维度不匹配. features = torch.mean(features, 0)每张图片的特征维度是2048,n张图片形成的视频序列特征是n张图片的特征取平均,对每一列求均值,序列特征维度固定=2048.

MeaninglessAI commented 5 years ago

@yangjinray features = features.view(n, -1) 输出的维度 = n * 2048, n = the numbers of images 是个变量, 如果采用features=torch.mean(features,1),输出的维度 = n,会造成维度不匹配. features = torch.mean(features, 0)每张图片的特征维度是2048,n张图片形成的视频序列特征是每张图片的特征取平均,对每一列求均值,序列特征维度固定=2048.

对,我懂了,谢谢你的解答。