mingkai-zheng / ReSSL

ReSSL: Relational Self-Supervised Learning with Weak Augmentation
57 stars 8 forks source link

KNN evaluation #3

Open YoadTew opened 3 years ago

YoadTew commented 3 years ago

Hey, Great paper! By the design of the loss and architecture , I would guess the learned representation should be good or even SOTA in KNN evaluation (that was also showed In DINO paper). I did not see such results on imagenet in the paper, did you try it? And if yes, can you share your results? Thanks!

mingkai-zheng commented 3 years ago

Sorry, I haven't done anything about the KNN evaluation, but it's a good idea to include this result. I'm currently working on other stuff, I will update this result when I'm free.

mingkai-zheng commented 3 years ago

BTW, you can use the following Code Snippet to load the pre-trained ResNet50 model (without the projection head). If you really need this result right now, I recommend you initialize the pre-trained model in this way and run it in the eval_knn.py file in dino repository.

    pre_train = resnet50()
    state_dict = torch.load(checkpoint_path, map_location='cpu')['model']
    for k in list(state_dict.keys()):
        if not k.startswith('module.encoder_q.net.'):
            del state_dict[k]
        if k.startswith('module.encoder_q.net.'):
            state_dict[k[len("module.encoder_q.net."):]] = state_dict[k]
            del state_dict[k]
    pre_train.load_state_dict(state_dict)
YoadTew commented 3 years ago

If I will have time I will try to run this evaluation, I think it could be a nice addition to the paper. I will updade here If I will have the results

pc-cp commented 1 year ago

Hi all, our article slightly improves this outstanding work and provides KNN results for the ReSSL method in the article (only experimental results in CIFAR-10, CIFAR-100, STL-10, and Tiny ImageNet are provided due to lack of experimental equipment). We welcome you to come together to exchange and learn. We also welcome your constructive comments on our work. The source code repository is here.