Comments (7)
@kak-to-tak To be more specific, I suspect this line is most related to this issue. Low threshold may lead to very large proposals and high threshold may lead to very small proposals. The former will be filtered out by maxsz
while the latter will be filtered out by minsz
.
The meaning of each hyper-parameter is as follows:
minsz
: the minimal size of a proposal.maxsz
: the maximal size of a proposal.sv_minsz
: the minimal number of super vertices, e.g.sv_minsz=2
means that we should combine at least two super vertices. It tries to enlarge the receptive field of the proposals.sv_maxsz
: the maximal number of super vertices, e.g.sv_mazsz=8
means that we should combine at most eight super vertices. It tries to avoid oversized proposals.th_knn
: the threshold to cut the edges with low similarities. It makes the affinity graph more sparse so as to reduce unnecessary neighborhood propagation and increase the computational efficiency.step
: the step in the dynamic threshold algorithm. When generating basic proposals, the threshold will increase a length ofstep
if a super vertex is too large.step=0.05
works stably under most cases.
Thus, other possible solutions are: (depend on whether proposals are too large or too small)
(1) increase the maxsz
or decrease the minsz
.
(2) decrease the sv_maxsz
or increase the sv_minsz
from learn-to-cluster.
@kak-to-tak Thanks for checking out our project.
Yes. I think the error means no valid super vertices exist. One possible reason lies in the threshold. If the threshold is too high, each vertex is taken as a cluster and it will be filtered by minsz
, which leads to empty idx2lb
. Do you mind trying to lower the threshold for super vertices generation?
from learn-to-cluster.
@yl-1993 To what extent is it reasonable to lower the threshold? Do I understand correctly that the default threshold is 0.4? Isn't it already quite low? Could you please dwell a bit on the hyperparameters of your algorithm? Excuse me, if it's all in the paper but I can't seem to find a comprehensive information on this. Thank you.
from learn-to-cluster.
@kak-to-tak Thanks for the question. As applying threshold in kNN graph is widely used, we do not emphasize it much in our paper. The threshold 0.4 is for super-vertex (iter=1), which is usually different from threshold for super-vertex (iter=0).
The value of threshold mainly depends on feature manifold. In practice, it can be determined by constructing a small validation set which contains both positive pairs and negative pairs. We can compute the similarity scores for all pairs, and find a threshold to maximize the accuracy on the set.
Another simple way to set threshold in training set is to start with a middle value, e.g., 0.5. Then it can be adjusted according to some indicators, e.g., number of proposals or the average size of proposals. In this case, you may want to adjust the value to both side a little bit, say 0.3 and 0.5. And you may have a quick feeling of what it leads to.
from learn-to-cluster.
@yl-1993 Thank you so much for a quick reply and the details!
I have another question about the number of epochs. After I lowered the threshold to 0.3 I noticed that it managed to work for two iterations but dropped with the same error on the third one. What is the approach for choosing the optimal number of epochs?
from learn-to-cluster.
@kak-to-tak The high-level idea is similar to generating super pixels in 2D images. If the initial super pixels are large, then the number of iterations is likely to be small. On the contrary, if the initial super pixels are small, then we may take more iterations. Therefore, the number of iterations is related to size of initial super pixels.
Another perspective is from the selection of desired proposals:
- If the size is too small, then the proposal is a conservative formation. In this case, the precision is high but the recall is low. For example, the proposal contains a leg of a person.
- If the size is too large, then it is probable that none of the classes dominate in the proposal. In this case, the precision is low but the recall is high. For example, the proposal contains two nearby person.
Overall, it is hard to give a criteria for optimal
iterations, but our empirical results show that it brings performance gain when the number of iterations is 2 or 3. Adding more iterations increase the recall of the clustering results but may impair the precision.
One possible future direction is to produce proposals via a learnable network, similar to RPN in object detection.
from learn-to-cluster.
@yl-1993 Thank you!
from learn-to-cluster.
Related Issues (20)
- Dataset issue HOT 2
- Issue while training LGCN HOT 1
- 您好,想请教一下训练GCN-D时报错run out of input HOT 1
- 没有修改任何参数跑作者提供的pretrained model for ms1m Fscore 只有0.32
- Clustering 512D features using pretrained model HOT 3
- building symmetric adjacency matrix in utils HOT 1
- why using output of relu for rebuilding knn graph HOT 1
- is not a checkpoint filemodels/pretrained_gcn_e_ms1m.pth HOT 3
- about extracting features HOT 3
- About how to make a .meta file HOT 1
- Can we manually set the number of clusters during the test HOT 1
- 大佬,请教下train_cluster_seg_iop_vox.sh 的test阶段报错的问题 HOT 2
- 两个face recognition模型,推荐使用哪个,hfsoftmax还要用到python 2 ? HOT 1
- About pretrained_model to get the the extracted feature HOT 2
- GCN-D MMdistributedDataparallel train HOT 2
- 关于性能 HOT 1
- How to apply lgcn for clustering on custom embeddings of collected face images? HOT 1
- On custom dataset preparation
- On the numpy version which may cause exception HOT 3
- output error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-to-cluster.