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

generate_anchors_example.py 563 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
  1. from super_gradients.training.datasets import CoCoDetectionDatasetInterface
  2. from super_gradients.training.utils.detection_utils import AnchorGenerator
  3. dataset_params = {"batch_size": 1,
  4. "test_batch_size": 1,
  5. "dataset_dir": "/data/coco/",
  6. "image_size": 640,
  7. "train_sample_loading_method": 'rectangular'
  8. }
  9. coco_dataset_interface = CoCoDetectionDatasetInterface(dataset_params=dataset_params, cache_labels=True)
  10. anchors = AnchorGenerator(coco_dataset_interface.trainset, 9)
Tip!

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

Comments

Loading...