I am currently working on a binary classification task of detecting if a facial image has some expressions of pain or not. Instead of using fastai models pre-trained on ImageNet, I would like to use some weights pre-trained on a task similar to mine, like some face detection dataset.
I came across this project: https://github.com/cydonia999/VGGFace2-pytorch, which already provides the weights for resnet50. But I couldn’t figure it out how to use them in the fastai workflow.
I tought this was a fairly common task, but I couldn’t find anything about it in the docs or in any tutorial.
Can someone help me with that or at least point me towards a resource in the topic?
hey i just had a look at the download and its a .pkl file.
when u export models natively from fastai u get .pkl files too and u can load them by using “load_learner”
Also if the above works, you wont be able to use discriminative learning rates. if u want to use that, then create another learn object thats a resnet50 and set layer_groups of loaded learn to that of the temporary learn object u just created.