GithubHelp home page GithubHelp logo

vana77 / bottom-up-clustering-person-re-identification Goto Github PK

View Code? Open in Web Editor NEW
209.0 209.0 45.0 16.79 MB

A Bottom-Up Clustering Approach to Unsupervised Person Re-identification, AAAI 2019 (Oral)

License: MIT License

Python 99.60% Shell 0.40%

bottom-up-clustering-person-re-identification's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bottom-up-clustering-person-re-identification's Issues

Why not go through the full connection layer when evaluating

Hi,thank you for your great work.
I have a question.
In evaluate.py
why do you go through the full connection layer during training and not go through the full connection layer during evaluation?
I'm dying to know the reason, thank you very much!

关于market1501的gallery数据

您好,在验证的时候遇到了点问题。market1501中gallery共有19732张图像,为什么您的数据里只有15913张图像呢

About code and paper

Hello, thank you for your great work, which has benefited me a lot.
I am a beginner in computer and reID.I want to ask you some questions about the paper and the code.Thank you for taking time out of your busy schedule to answer my questions!
1、In section3.2 of the paper,Vy = 1/2(Vy + v)
What is the basis of this formula?I don't know why you update lookup table V like this.
2、In section 3.2 of the paper,
"d(xa,xb) is defined as the Euclidean distance between the feature embeddings of two images, i.e., va and vb. Specifically, d(xa,xb) = ||va −vb||."
Here's the Euclidean distance.But why use this formula“dists.addmm_(1, -2, x, y.t())” to calculate distance in code?I don't know the connection between the two.
3、In section 3.2 of the paper,
Where does τ in Formula (2)represent in the code.
These are my questions.I'm sorry to take up your time to answer my questions.But as a beginner, I really want to figure out these questions.
Best wishes to you!
祝您一切顺心,生活幸福美满!

I can't reproduce your code.

When I use the market1501 dataset with hyper-parameters all default in your code. Why the model only get 33% top-1 accuracy?what are the changes of the hyper-parameters if i wanna get the same acc in your paper?

A bug in your clustering programming

From the code, you calculates distance between all features of images (including penalize with unbalanced number of groups) in advance when clustering. However, you ignore a problem, that in the process of clustering, a cluster may be combined many times, resulting in changes in the number of groups and distance would change. For example, cluster 2 is first combined with cluster 3. However, when cluster 2 is then combined with 4, the cluster number is changed.

about rank

I read your paper.Rank and mAP are found to differ greatly from your display.Is it because of the bottom.py change?The final rank of this paper, as you have shown, cannot reach 61.1 in Mars.Or some of your tricks are not public.I appreciate your work, but would like to confirm this with you.Because I want to borrow your ideas in my own work, I want to confirm with you.Please forgive me if I offend you,

Can't reach 61% in the market as in the paper

Hello, I run the code you uploaded directly. Rank-1 on the market is 55.8%, which is different from 61% in the paper. Is there any special Super parameter to set? I would like to quote your code and paper in my paper. Wish for your rely.
你好,我直接运行您上传的代码,在market上rank-1为55.8%,与论文中的61%不同,请问是否有特殊的超参数要设置?我想在自己的论文中引用您的代码和论文。期待您的回复。

About the accuracy of the mars dataset

Hello, thank you very much for opening the code of this paper, but I cannot get 55.1% Rank1 accuracy on the mars dataset.I followed your open source code self.frames_per_video = 16, self.later_steps = 5 --size_penalty = 0.003.Can only get
Mean AP: 26.1%
CMC Scores:
top-1 52.7%
top-5 66.2%
top-10 70.4%
top-20 73.9%
Should I modify some training parameters to reach Rank1 55.1% accuracy.Thank you very much and hope you can reply me.

The version of scikit-learn and metric learn

作者你好,非常感谢你提供了开源的代码!
我git clone了你的代码,并且下载了Market1501放在了data文件夹下,然后直接用了sh ./run.sh来跑代码。
但是terminal端的结果一直不收敛,请问想要实现你的效果,是还需要调整什么参数吗?
ps: h5py, scikit-learn, metric-learn, tqdm的版本可以贴一下吗?
非常感谢!

Hello author, thanks so much for the open source code!
I git clone your code and downloaded Market1501 and put it in the data folder. And then just ran the code with sh . /run.sh to run the code.
But the results on the terminal side never converge, is there any parameter that needs to be adjusted to achieve your effect?
ps: h5py, scikit-learn, metric-learn, tqdm's Can you post the version?
Thank you very much!

DukeMTMC-VideoReID can't be download

Hi,thanks for your work and I benefit a lot from it. Recently, I find that I can't download the dataset DukeMTMC-VideoReID. can you share it with me in Baidu Yun? Thank you very much.

cannot achieve best performances on market-1501 dataset

Hi, vana77
Thanks for your excellent work.
I just clone the source code and run it with default parameters without any modifications, but I can only get about rank-1 54% at 15th step on market-1501 dataset. Did I miss some important things?

lookup table的变化

你好,我想请教一下,lookup table $V$的大小为$C\times feature\_{size}$,当进入下一个stage,聚类的数量会变小,那么如何更新$V$呢?
我没有在代码中找到相应的处理,还望告知。感谢

Question about the performance

Hello, I set hyper-parameters 0.005 for size_penalty and 0.05 for merge_percent in your code. But on MARS, the highest rank-1 is 59.5% and the heighest mAP is 35.6%. I can't reproduce the performance of your papers. Is my hyper-parameters set wrong?

关于MARS数据集的处理

请问一下,MARS数据集你是怎么处理的?我之前是做监督的Video reid的,我想做一下无监督的。发现这个Mars数据集的设置和有监督的不太一样。我看了下train gallery query的数据都是一样的,但是为什么要专门设置gallery_split 的id从999开始呢?直接使用原始数据集给定的标签有什么不妥吗?十分感谢。

doubt about the optimizer

I noticed that, in each step, you reset the optimizer. In another similar paper(iteratively assign pseudo class label), they initialize their optimizer at the beginning. I wonder, if you don't reset the optimizer, will the performance drop?

about the code

hello , I used a rtx2080 to run this code with the video-based dataset, and after training with settled epochs, my server stuck like this in this step, why?
I tried to change the batch-size, it didn't work, the "frame-per-video" should I change this parameter too?
what's the difference between this two parameter, it seems '''batch-size'',and ''frame-per-video'',this two parameter value is set to the same in your code.
or is my rtx2080 server capacity lower than what your code needs?
屏幕快照 2021-03-18 上午11 41 43

about rank

I read your paper.Rank and mAP are found to differ greatly from your display.Is it because of the bottom.py change?The final rank of this paper, as you have shown, cannot reach 61.1 in Mars.Or some of your tricks are not public.I appreciate your work, but would like to confirm this with you.Because I want to borrow your ideas in my own work, I want to confirm with you.Please forgive me if I offend you,

about the code

thank you for your sharing ,I don't quite understand some places in the code.
Firstly,
dists.add_(torch.tril(100000 * torch.ones(len(u_feas), len(u_feas))))
Why does this distance matrix need to add a lower triangular matrix with a content of 10000?
Secondly,
for idx in range(len(u_feas)):
for j in range(idx + 1, len(u_feas)):
if label[idx] == label[j]:
dists[idx, j] = 100000
What is the meaning of this distance matrix loop?

I really didn't understand it, so I asked you questions, thank you very much and look forward to your reply.

RuntimeError: DataLoader worker (pid 18591) is killed by signal: Killed.

When I train on DukeMTMC-VideoReID datasets,this error will be displayed.
When batchsize is seted to 16,error termination at the fifth epoch.
When I set batchsize to 12,error termination at the 18th epoch.
I dare not adjust batchsize any more, because I don't know how to set lr.
Can you give me some advice?

ImportError: cannot import name 'pinvh'

When I run the sh ./run.sh:
(bottom-up-reID) mickey@a208-System-Product-Name:/Bottom-up-Clustering-Person-Re-identification$ python --versionPython 3.6.0 :: Continuum Analytics, Inc.
(bottom-up-reID) mickey@a208-System-Product-Name:
/Bottom-up-Clustering-Person-Re-identification$ sh ./run.sh
Traceback (most recent call last):
File "run.py", line 2, in
from reid.bottom_up import *
File "/home/mickey/Bottom-up-Clustering-Person-Re-identification/reid/init.py", line 6, in
from . import metric_learning
File "/home/mickey/Bottom-up-Clustering-Person-Re-identification/reid/metric_learning/init.py", line 3, in
from metric_learn import (ITML_Supervised, LMNN, LSML_Supervised,
File "/home/mickey/miniconda3/envs/bottom-up-reID/lib/python3.6/site-packages/metric_learn/init.py", line 8, in
from .sdml import SDML, SDML_Supervised
File "/home/mickey/miniconda3/envs/bottom-up-reID/lib/python3.6/site-packages/metric_learn/sdml.py", line 15, in
from sklearn.utils.extmath import pinvh
ImportError: cannot import name 'pinvh'
Can you give me some advice ?
Best wishes to you!

T-SNE visualization of the learned feature embeddings looks different

Hi; I tried to reproduce and visualize the 2-dimension feature map of the clustering using tSNE . This is the output.
Figure_1

It looks very different to your figure 4 even in the 18th step .
This is what I did to get the feature map at each step.
In get_new_train_data I saved u_feat and the labels. The u_feat is a 12936x2048 where each line represent a image and it's extracted features. I'm able to randomly choose 100 identities based on new_train_data ([tuple(images), pid, camid, video_id])

def get_new_train_data(self, labels, nums_to_merge, size_penalty, step):
   u_feas, feature_avg, label_to_images, fc_avg = self.generate_average_feature(labels)
   ..... 
   # before return, save
   np.savez("logs/clusters_{}.npz".format(step), u_feas, labels, new_train_data)

market and duke dataset can't download

Hi, thank you for share your code. I want to run your code, but I found the link to market dataset is invalid now, can you check it and share a new link . Thank you!

Cannot even create the dataset ! Help me.

I’m using environment in kaggle.
The error are as flows:
File "run.py", line 65, in
main(parser.parse_args())
File "run.py", line 20, in main
dataset_all = datasets.create(args.dataset, osp.join(args.data_dir, args.dataset))
File "/kaggle/working/Bottom-up-Clustering-Person-Re-identification/reid/datasets/init.py", line 44, in create
return __factory[name](root, *args, **kwargs)
File "/kaggle/working/Bottom-up-Clustering-Person-Re-identification/reid/datasets/market1501.py", line 17, in init
self.download()
File "/kaggle/working/Bottom-up-Clustering-Person-Re-identification/reid/datasets/market1501.py", line 79, in download
trainval_pids, _ = register('train')
File "/kaggle/working/Bottom-up-Clustering-Person-Re-identification/reid/datasets/market1501.py", line 51, in register
person_list = os.listdir(os.path.join(self.root, subdir)); person_list.sort()
FileNotFoundError: [Errno 2] No such file or directory: '/kaggle/working/Bottom-up-Clustering-Person-Re-identification/data/market1501/train'

Training new dataset

Hi, I have a question about using your code to train my own dataset. It seems that Market dataset you provide has been preprocessed, so I just want to know how to write dataloader to process my own dataset. Could you please tell me the exact meaning of "video_id" in market1501.py? Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.