Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

cityscapes_dataset_test.py 785 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. import unittest
  2. import pkg_resources
  3. import yaml
  4. from super_gradients.training.datasets.segmentation_datasets.cityscape_segmentation import CityscapesDataset
  5. class CityscapesDatasetTest(unittest.TestCase):
  6. def setUp(self) -> None:
  7. default_config_path = pkg_resources.resource_filename("super_gradients.recipes",
  8. "dataset_params/cityscapes_dataset_params.yaml")
  9. with open(default_config_path, 'r') as file:
  10. self.recipe = yaml.safe_load(file)
  11. def test_train_dataset_creation(self):
  12. train_dataset = CityscapesDataset(**self.recipe['train_dataset_params'])
  13. for i in range(10):
  14. image, mask = train_dataset[i]
  15. if __name__ == '__main__':
  16. unittest.main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...