Using Pretrained Models from Cadene repository

Hi all. I wrote a notebook to share how one could use any pretrained models in Pytorch. Fastai itself has a lot of pretrained models. There is also the fantastic library by Cadene https://github.com/Cadene/pretrained-models.pytorch which has a lot of pretrained models on imagenet. I show how to use them with the fastai library.

Link to the notebook: https://github.com/TheShadow29/FAI-notes/blob/master/notebooks/Using-Pretrained-Pytorch-Models.ipynb

Feel free to create an issue if there is something amiss, or report it here.

10 Likes

Thanks!

This problem has plagued me very much, thank you very much.!

Vary helpful.
I was quite confuse about these problems before.

Is there any way to easily use these pre-trained models in fastai 1.0 too?

Can I use these pretrained models in the current version of fastai?

How can this be used with the latest version of fastai - 1.0.54? Any help will be much appreciated. Present learner seems to have support for below but not Cadene Repo:

models.resnet18 :{**_resnet_meta}, models.resnet34: {**_resnet_meta},
models.resnet50 :{**_resnet_meta}, models.resnet101:{**_resnet_meta},
models.resnet152:{**_resnet_meta},
models.squeezenet1_0:{**_squeezenet_meta},
models.squeezenet1_1:{**_squeezenet_meta},
models.densenet121:{**_densenet_meta}, models.densenet169:{**_densenet_meta},
models.densenet201:{**_densenet_meta}, models.densenet161:{**_densenet_meta},
models.vgg16_bn:{**_vgg_meta}, models.vgg19_bn:{**_vgg_meta},
models.alexnet:{**_alexnet_meta}}

Got reply to this on another thread - this could work.

This is a really great job!