Yunfan-Li / Contrastive-Clustering

Code for the paper "Contrastive Clustering" (AAAI 2021)
MIT License
297 stars 91 forks source link

Running the pretrained Model #59

Open MartinBetzCaD opened 4 months ago

MartinBetzCaD commented 4 months ago

Hello, I hope this issue is not too basic, but is there a posibility to run th the pretrained model right away, and if so how could i do that?

Thank you for your Help,

Best regards MB

Yunfan-Li commented 4 months ago

Hi, the pre-trained models for CIFAR-10, CIFAR-100, and STL-10 have been uploaded to the ./save folder.

MartinBetzCaD commented 4 months ago

Hi, the pre-trained models for CIFAR-10, CIFAR-100, and STL-10 have been uploaded to the ./save folder.

Thank you for your quick response,

Sadly im not too well-versed on the informatical site. I couldn't find any executable files in the save folder, so i guess i have to run cluster.py and at some point refer to said files in the code, could you please tell me where that would be or what i otherwise would have to do.

thnk you very much for you help

Yunfan-Li commented 4 months ago

You could load the specific pre-trained model in cluster.py by modifying the configurations in ./config/config.yaml

MartinBetzCaD commented 4 months ago

First of all thank you very much for your help, Now that i am able to run the model, i wanted to ask wheter there is an option to get an graphical output which could be used in a presentation? i.e. is there a way to give the code a sample of pictures (not necessary in the dataset but with the same motives/classes) and get the augmented pictures, the output-Matrix of ICH/CCH and possibly a graphical representation of the clustering (like the t-SNE pictures in your paper) as output? (the more explicit you could answer the more helpful it would be for me) i hope i dont annoy you too much with all my question and im very grateful for your help,

best regards MB

Yunfan-Li commented 4 months ago
  1. To visualize the original and augmented images, you could use Image.show() function in the PIL package.
  2. The output matrices of ICH/CCH could be visualized by the matplotlib.pyplot.matshow() function in the matplotlib package.
  3. For the t-SNE plots, please refer to https://github.com/Yunfan-Li/Contrastive-Clustering/issues/14
MartinBetzCaD commented 4 months ago

Thank you for those hints, i will try to implement them. For that, could you please point out to me how those quantities are named in the code and where to find them? Youre help is very appreciated, thank you very much,

best regards MB