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

The code to get the figure1 #8

Open scutfrank opened 1 year ago

scutfrank commented 1 year ago

Hi, would you mind to share the code to get the figure1. As described in the paper, 'To illustrate this issue, we consider three classes from CIFAR10: dog, cat, and plane. We train a KCL model [23] on this data for different imbalance ratios, ρ. For visualization clarity we use a 2D feature space. As seen in Fig. 1(a), when the classes are balanced (i.e., ρ=1:1:1), the centers of the three classes are uniformly distributed in the KCL feature space. In contrast, when the imbalance ratio is high (e.g., ρ=100:1:1), the classes with fewer training instances start to collapse into each other, leading to unclear and inseparable decision boundaries, and thus lower performance.'? image