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