Open markbarna opened 2 years ago
Hi @markbarna,
First of all, thanks for using VISSL :)
I had a look at the configuration you are using and the culprit is the multi-crop transformation in the config.DATA.TRAIN
. Multi-crop creates a batch with multiple crop sizes, which is not supported in general, but in the case of very specific SSL algorithms that leverage it (SwAV, DINO, etc). It is not supported in kNN evaluation.
To do kNN evaluation, you should change the transforms to something like this:
TRANSFORMS:
- name: Resize
size: 256
- name: CenterCrop
size: 224
- name: ToTensor
- mean:
- 0.485
- 0.456
- 0.406
name: Normalize
std:
- 0.229
- 0.224
- 0.225
I hope this helps. Please tell me if this works better now :)
Thank you, Quentin
Instructions To Reproduce the 🐛 Bug:
what changes you made (
git diff
) or what code you wrotewhat exact command you run:
python /tools/nearest_neighbor_test.py config=benchmark/nearest_neighbor/eval_dino_xcit_kNN
This is a config I created for the KNN based on https://github.com/facebookresearch/vissl/blob/main/configs/config/pretrain/dino/dino_16gpus_xcit_small_12_p16.yaml using the Imagenette2 dataset as a sanity check. Full config is pasted below. I set the feature extraction parameters based on the documentation: https://vissl.readthedocs.io/en/v0.1.5/evaluations/feature_extraction.html#extract-features-of-the-model-head-output-self-supervised-headwhat you observed (including full logs):
Expected behavior:
The KNN should run.
The issue seems to be something with the dataloader but I haven't been able to trace it down yet.
Environment:
Provide your environment information using the following command:
When to expect Triage
VISSL devs and contributors aim to triage issues asap however, as a general guideline, we ask users to expect triaging in 1-2 weeks.