test_crowdhuman.py 521 B

12345678910111213141516
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. import unittest
  3. from mmdet.datasets import CrowdHumanDataset
  4. class TestCrowdHumanDataset(unittest.TestCase):
  5. def test_crowdhuman_init(self):
  6. dataset = CrowdHumanDataset(
  7. data_root='tests/data/crowdhuman_dataset/',
  8. ann_file='test_annotation_train.odgt',
  9. data_prefix=dict(img='Images/'),
  10. pipeline=[])
  11. self.assertEqual(len(dataset), 1)
  12. self.assertEqual(dataset.metainfo['classes'], ('person', ))