Zhongdao / gcn_clustering

Code for CVPR'19 paper Linkage-based Face Clustering via GCN
MIT License
360 stars 86 forks source link

why first iteration not use thershold in test code #45

Open yongqis opened 1 year ago

yongqis commented 1 year ago

I wonder why the first iteration not use thershold in connected_components_constraint(vertex, max_sz) / graph_propagation() /graph.py?

Is the experiment in the paper also based on this setting?

I find that the first iteration result 'remain' may be 'null', so code will not do the next iteration and finally clustering result has nothing to do with the model's predict.

For the first iteration: the 'vertex' contains all the node-pairs/links/edges are generated by KNN and also are the input data of model, and the code just directly use all these node-pairs/links (neighbors = n.links, line 69) to create groups/cluster, just like BFS algorithm, rather than use the score predicted by the model to filter them. Is it right?

I would be very grateful if you could provide suggestion.

yongqis commented 1 year ago

I find the original code ( https://github.com/XiaohangZhan/cdp/blob/master/source/cdp.py 73-88 line) have a 'pair selection' step, so that they use none thershold in the first iteration. but no similar step was found in this code.