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

How to train in custom data?

Open R1234A opened this issue 6 years ago • 1 comments

I have images and their respective XML files, but how to start train for our own custom dataset?

R1234A avatar Apr 24 '18 13:04 R1234A

First, you need to write you own data loader, similar to datasets/pascal_voc.py. Then, you should also modify datasets/factory.py accordingly. Finally, you should provide the name of your dataset as input to the trainval_net.py (--imdb and --imdbval options).

Another option is to convert your dataset into one of the standard formats, like PASCAL_VOC or MS COCO and directly use the code without any modification.

I would recommend the first option.

mubastan avatar Jun 14 '18 22:06 mubastan