You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
809B

  1. import argparse
  2. from pathlib import Path
  3. import yaml
  4. from wandb_utils import WandbLogger
  5. from utils.datasets import LoadImagesAndLabels
  6. WANDB_ARTIFACT_PREFIX = 'wandb-artifact://'
  7. def create_dataset_artifact(opt):
  8. with open(opt.data) as f:
  9. data = yaml.load(f, Loader=yaml.SafeLoader) # data dict
  10. logger = WandbLogger(opt, '', None, data, job_type='Dataset Creation')
  11. if __name__ == '__main__':
  12. parser = argparse.ArgumentParser()
  13. parser.add_argument('--data', type=str, default='data/coco128.yaml', help='data.yaml path')
  14. parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
  15. parser.add_argument('--project', type=str, default='YOLOv5', help='name of W&B Project')
  16. opt = parser.parse_args()
  17. create_dataset_artifact(opt)