pva-faster-rcnn icon indicating copy to clipboard operation
pva-faster-rcnn copied to clipboard

How to train on a custom dataset

Open MyVanitar opened this issue 7 years ago • 6 comments

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:

  • The Train/Test images should be annoated to what format?
  • How to created the IMDB files for PVANet after annotation? By standard Caffe tools or you have your own tool?
  • How to modify CFG / Prototxt files?

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

MyVanitar avatar Feb 14 '17 23:02 MyVanitar

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.

MyVanitar avatar Feb 18 '17 15:02 MyVanitar

@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.

twmht avatar Apr 12 '17 08:04 twmht

@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?

MyVanitar avatar Apr 12 '17 09:04 MyVanitar

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

twmht avatar Apr 12 '17 10:04 twmht

@twmht

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

MyVanitar avatar Apr 12 '17 10:04 MyVanitar

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

yzhang123 avatar May 03 '17 16:05 yzhang123