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

pose_estimation_dataset_test.py 966 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
25
26
27
28
29
  1. from super_gradients.training.datasets.pose_estimation_datasets.coco_keypoints import COCOKeypointsDataset
  2. from super_gradients.training.datasets.pose_estimation_datasets.target_generators import DEKRTargetsGenerator
  3. from super_gradients.training.transforms.keypoint_transforms import KeypointsCompose, KeypointsRandomVerticalFlip
  4. def test_dataset():
  5. target_generator = DEKRTargetsGenerator(
  6. output_stride=4,
  7. sigma=2,
  8. center_sigma=4,
  9. bg_weight=0.1,
  10. offset_radius=4,
  11. )
  12. dataset = COCOKeypointsDataset(
  13. data_dir="e:/coco2017",
  14. images_dir="images/train2017",
  15. json_file="annotations/person_keypoints_train2017.json",
  16. include_empty_samples=False,
  17. transforms=KeypointsCompose(
  18. [
  19. KeypointsRandomVerticalFlip(),
  20. ]
  21. ),
  22. target_generator=target_generator,
  23. )
  24. assert dataset is not None
  25. assert dataset[0] is not None
Tip!

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

Comments

Loading...