sanghoon / pva-faster-rcnn

Demo code for PVANet
https://arxiv.org/abs/1611.08588
Other
650 stars 241 forks source link

How to train on a custom dataset #63

Open MyVanitar opened 7 years ago

MyVanitar commented 7 years ago

Hello,

How can we pick-up a pre-trained model and re-train it on a custom data-set (user defined data-set)? I have selected the PVANET+ (Compressed) because as I see it shows a good combination of speed and mAP.

Questions like:

Considering that I gonna fine-tune on existing trained .caffemodels, so I must get a high accuracy even on a small dataset. Yes?

MyVanitar commented 7 years ago

From these question, creating an imdb file to train is the major obstacle for me which I stuck in it. based on this description (https://github.com/sanghoon/pva-faster-rcnn/tree/master/models/pvanet/example_train), the training only accepts one imdb file. It seems both training and validation images are combined in one file.

twmht commented 7 years ago

@VanitarNordic

I have created a face detection model using PVANet (https://github.com/twmht/PVANet-FACE), where I use the custom dataset and the format is different from VOC.

MyVanitar commented 7 years ago

@twmht

So you are in a better condition since I stuck in VOC, but you have created based on something else :-)

Do you have a repo of your job?

twmht commented 7 years ago

here is the repo https://github.com/twmht/PVANet-FACE

MyVanitar commented 7 years ago

@twmht

I saw it. Good job. I have some questions which I will ask on the repo page.

yzhang123 commented 7 years ago

you have to create an imdb_wrapper that substitutes the default pascal_voc.py that is imdb_wrapper is a subclass of imdb, and there you have to load your own data in _load_image_index and [if you are training, also change the _load_annoation function]

in your train file you have to then call imdb_wrapper to receive your imdb object, which you can just pass to the train function