LTH14 / targeted-supcon

A PyTorch implementation of the paper Targeted Supervised Contrastive Learning for Long-tailed Recognition
MIT License
93 stars 13 forks source link

Can you please provide the code for drawing Figure 5? #6

Closed YuMJie closed 1 year ago

YuMJie commented 1 year ago

Thanks for your great work! Figure 5 in your paper is also impressive, could you please provide the code for drawing this figure?

JayC1208 commented 1 year ago

I am also interested in that code. Could you provide the code or give information about the method/python library or other repos that used similar method?

LTH14 commented 1 year ago

We don't have the plan to release the code for plotting figure 5 as it requires quite a bit of cleaning. However, we simply use matplotlib scatter with alpha=0.1 to plot the features. One thing to notice is that, for better visualization, to plot figure 5 we set the output dimension of the MLP to 2. As a result, the normalized features used to compute the loss naturally fall on a 2-d circle.