implus / PytorchInsight

a pytorch lib with state-of-the-art architectures, pretrained models and real-time updated results
858 stars 123 forks source link

How to train a pascal voc format dataset? #20

Closed chm5174 closed 4 years ago

chm5174 commented 4 years ago

 Hi! The dataset_type provided by local_configs in detection only supports training COCO datasets. How to modify the local_configs if I want to train VOC datasets?

chm5174 commented 4 years ago

I solved the problem by modifying the dataset settings of configuration in local_configs. dataset_type = 'CocoDataset' data_root = 'data/coco/'

train: ann_file=data_root + 'VOC2007/ImageSets/Main/trainval.txt', img_prefix=data_root + 'VOC2007/',

val: ann_file=data_root + 'VOC2007/ImageSets/Main/val.txt' img_prefix=data_root + 'VOC2007/',

test: ann_file=data_root + 'VOC2007/ImageSets/Main/test.txt', img_prefix=data_root + 'VOC2007/',

and changing the class_name in PytorchInsight-master/detection/mmdet/core/evaluation/class_names.py and PytorchInsight-master/detection/mmdet/datasets/voc.py