This code is for cross-domain segmentation tasks, which can plot T-sne of domains and classes
pip install scikit-learn
pip install tsnecuda
pip install Multicore-TSNE
If the installation is not successful, you can compile from the source code, referring to CSDN: MulticoreTSNE安装及测试
pip install cmake==3.18.4
git clone https://github.com/DmitryUlyanov/Multicore-TSNE.git
cd Multicore-TSNE/
pip install .
- Modify the setup_loader.py according to your own dataset and requirements.
- Modify the parameters in the TSNE.py, such as self.num_class, self.num_neighbors.
- Modify the domian and class information in tsne_draw.py.
- Run the tsne_draw.py.
The tsne code is heavily refer to the PintheMemory and CSDN用于语义分割模型的t-SNE可视化. Thanks to the RobustNet and TSMLDG implementations.
T-sne plots of PintheMemory
In the left part, different colors represent different classes, and in the right part, different colors represent different domains. As shown, the method in this paper is well at learning domain-invariant representation.