Search code examples
deep-learningunsupervised-learning

how to train pre-trained CNN on new dataset which is not organised in classes (Unsupervised)


I have a pretrained CNN (Resnet-18) trained on Imagenet, now i want to extend it on my own dataset of video frames , now the point is all tutorials i found on Finetuning required dataset to be organised in classes like

 class1/train/
 class1/test/

 class2/train/
 class2/test/

but i have only frames on many videos , how will i train my CNN on it.

So can anyone point me in right direction , any tutorial or paper etc ?

PS: My final task is to get deep features of all frames that i provide at the time of testing


Solution

  • for training network, you should have some 'label'(sometimes called y) of your input data. from there, network calculate loss between logit(answer of network) and the given label. And the network will self-revise using that loss value by backpropagating. that process is what we call 'training'. Because you only have input data, not label, so you can get the logit only. that means a loss cannot be calculated. Fine tuning is almost same word with 'additional training', so that you cannot fine tuning your pre-trained network without labeled data.

    About train set & test set, that is not the problem right now. If you have enough labeled input data, you can divide it with some ratio. (e.g. 80% of data for training, 20% of data for testing) the reason why divide data into these two sets, we want to check the performance of our trained network more general, unseen situation.

    However, if you just input your data into pre-trained network(encoder part), it will give a deep feature. It doesn't exactly fit to your task, still it is deep feature.

    Added) Unsupervised pre-training for convolutional neural network in theano
    here is the method you need, deep feature encoder in unsupervised situation. I hope it will help.