You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_xml_dataset.py 641 B

2 years ago
1234567891011121314151617181920212223
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. import pytest
  3. from mmdet.datasets import DATASETS
  4. def test_xml_dataset():
  5. dataconfig = {
  6. 'ann_file': 'data/VOCdevkit/VOC2007/ImageSets/Main/test.txt',
  7. 'img_prefix': 'data/VOCdevkit/VOC2007/',
  8. 'pipeline': [{
  9. 'type': 'LoadImageFromFile'
  10. }]
  11. }
  12. XMLDataset = DATASETS.get('XMLDataset')
  13. class XMLDatasetSubClass(XMLDataset):
  14. CLASSES = None
  15. # get_ann_info and _filter_imgs of XMLDataset
  16. # would use self.CLASSES, we added CLASSES not NONE
  17. with pytest.raises(AssertionError):
  18. XMLDatasetSubClass(**dataconfig)

No Description

Contributors (2)