Self-Similarity-Grouping icon indicating copy to clipboard operation
Self-Similarity-Grouping copied to clipboard

why reranking so time-cosuming?

Open luissen opened this issue 5 years ago • 2 comments

When I run the selftraining.py, it is very time-consuming to calculate the source distance and original distance, and why?

luissen avatar Sep 03 '19 13:09 luissen

I have also the same question. The reranking requires high time cost, about 20 minutes each reranking.

xiaobaoli15 avatar Nov 23 '19 02:11 xiaobaoli15

Hi all,

I have accelerated the reranking process, please refer to def compute_jaccard_dist(...) in MMT/mmt/utils/rerank.py. The function is plug-and-play in this SSG repo, i.e. input_feature, input_feature_source in SSG/reid/rerank.py is the same as target_features, source_features in MMT/mmt/utils/rerank.py. Note that the difference is that target_features, source_features are pytorch tensors while input_feature, input_feature_source are numpy matrix.

For time cost, our MMT/mmt/utils/rerank.py requires around 200s on CPU or 60s on GPU (set use_gpu=True).

yxgeee avatar Mar 20 '20 11:03 yxgeee