nightrome / matconvnet-calvin

Code for several state-of-the-art papers in object detection and semantic segmentation.
http://calvin.inf.ed.ac.uk/
Other
86 stars 72 forks source link

Fine Tuning #5

Closed mzahran001 closed 7 years ago

mzahran001 commented 7 years ago

How to fine tune your model? I don't have sufficient data to retrain your model from scratch.I want to fine tune your model on my data which has only two classes ?

nightrome commented 7 years ago

All the provided demos start from models that are pre-trained on ImageNet (by the authors of MatConvNet) and only finetuned on the target dataset. If you want to do the same, you can just create your own Dataset class (take a look at [1] which inherits from [2]) and modify the demo.

If you really have too little data you can try to finetune our finetuned model a second time. Then you also need to create the dataset class and additionally modify the "netPath" in your own copy of [3] to point to our provided model instead of the un-finetuned one.

[1] https://github.com/nightrome/matconvnet-calvin/blob/master/matconvnet-calvin/matlab/misc/SiftFlowDatasetMC.m [2] https://github.com/nightrome/matconvnet-calvin/blob/master/matconvnet-calvin/matlab/misc/DatasetMC.m [3] https://github.com/nightrome/matconvnet-calvin/blob/master/matconvnet-calvin/examples/e2s2/e2s2_wrapper_SiftFlow_full.m