facebookresearch / vissl

VISSL is FAIR's library of extensible, modular and scalable components for SOTA Self-Supervised Learning with images.
https://vissl.ai
MIT License
3.24k stars 330 forks source link

SEER Pretrained Config Instructions #526

Open ColinConwell opened 2 years ago

ColinConwell commented 2 years ago

Congratulations to the VISSL authors on the creation of SEER! What a remarkable step forward.

Could you post an example of the configs list we pass to swap out the models in the pretrained models tutorial with the SEER models?

So basically, instead of the linear probe config ....

config=benchmark/linear_image_classification/imagenet1k/eval_resnet_8gpu_transfer_in1k_linear \
    +config/benchmark/linear_image_classification/imagenet1k/models=regnet128Gf \
    config.MODEL.WEIGHTS_INIT.PARAMS_FILE=/path/to/seer_regnet128_model_final_checkpoint_phase0.torch

Something more like....

cfg = [
  'config=pretrain/simclr/simclr_8node_resnet.yaml',
  'config.MODEL.WEIGHTS_INIT.PARAMS_FILE=/content/resnet_simclr.torch', 
  'config.MODEL.FEATURE_EVAL_SETTINGS.EVAL_MODE_ON=True', 
]

I do not currently see a config for SEER in the pretrained configs folder, but perhaps I'm missing it? I realize this is probably trivial, but Hydra syntax remains a bit difficult, I think, for traditional PyTorch users like me to parse.

Also, it'd be good to know if there any image normalizations we should expect to use when loading the SEER models. I imagine the standard ImageNet normalizations no longer apply?

SimJeg commented 2 years ago

+1 to know if there is a specific input image normalization to apply :)

iseessel commented 2 years ago

Thanks @ColinConwell!

All you should have to do is:

    config.MODEL.WEIGHTS_INIT.PARAMS_FILE=/path/to/seer_regnet128_model_final_checkpoint_phase0.torch

And make sure the model is set correctly. For example the regnet128gf model should have the following settings:

    +config/benchmark/linear_image_classification/imagenet1k/models=regnet128Gf \
    config.MODEL.WEIGHTS_INIT.PARAMS_FILE=/path/to/seer_regnet128_model_final_checkpoint_phase0.torch

I'll talk with the team about setting something official up. CC: @QuentinDuval