You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, your repo is really helpful. I have one minor question, how do you know this threshold pca_features_bg = pca_features[:, 0] > 0.35 in third-party/Dino_V2/2.PCA_visualization.ipynb IN [10]? I am not sure how to infer this number from the first histogram. Could you please explain it?
Moreover, according to the original paper of DINOv2, it says Background is removed by removing patches with a negative score of the first PCA component. (Figure 9 caption) May I ask what is the relationship between the negative score and your chosen threshold. Many thanks!
The text was updated successfully, but these errors were encountered:
Hi @Lucca-cherries. Although it might be clear to you for the sake of future visitors, I shall try to explain the answer in some detail. The value of 0.35 is the threshold chosen by the author for the min-max normalized values of the first PCA component. This value is in fact arbitrary and will depend totally upon your use case. For example please look at the histogram of the min-max normalized first PCA component below for two different scene conditions
Object kept in a well-lit room with no occlusions or other noise, i.e. very easy to differentiate between fg vs bg.
For another scene where the images are of a landmark taken from many different angles i.e. a little hard to differentiate between fg and bg.
From the above distributions, you can clearly see two peaks, which can be categorized as fg vs bg. Observing the above graphs, one can easily decide the correct threshold value for each scene.
Coming to your second point (although I haven't read the paper), I assume that the authors of the original papers either did not normalize the first PCA component or might have used some other normalization technique like mean etc to select only positive scored values as fg. So absolute threshold value in effect will also depend on your normalization technique. However, for the same set of images, the distribution should look the same.
Please visit this issue on the original repo for more details on this. Thanks for reading. And many thanks to the author for this awesome repo.
Hi, your repo is really helpful. I have one minor question, how do you know this threshold
pca_features_bg = pca_features[:, 0] > 0.35
inthird-party/Dino_V2/2.PCA_visualization.ipynb IN [10]
? I am not sure how to infer this number from the first histogram. Could you please explain it?Moreover, according to the original paper of
DINOv2
, it saysBackground is removed by removing patches with a negative score of the first PCA component. (Figure 9 caption)
May I ask what is the relationship between thenegative score
and your chosen threshold. Many thanks!The text was updated successfully, but these errors were encountered: