Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

44 Zeilen
2.3KB

  1. # COCO 2017 dataset http://cocodataset.org
  2. # Train command: python train.py --data coco.yaml
  3. # Default dataset location is next to YOLOv5:
  4. # /parent
  5. # /datasets/coco
  6. # /yolov5
  7. # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
  8. path: ../datasets/coco # dataset root dir
  9. train: train2017.txt # train images (relative to 'path') 118287 images
  10. val: val2017.txt # train images (relative to 'path') 5000 images
  11. test: test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
  12. # Classes
  13. nc: 80 # number of classes
  14. names: [ 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light',
  15. 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',
  16. 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee',
  17. 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard',
  18. 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple',
  19. 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch',
  20. 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone',
  21. 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear',
  22. 'hair drier', 'toothbrush' ] # class names
  23. # Download script/URL (optional)
  24. download: |
  25. from utils.general import download, Path
  26. # Download labels
  27. segments = False # segment or box labels
  28. dir = Path(yaml['path']) # dataset root dir
  29. url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
  30. urls = [url + ('coco2017labels-segments.zip' if segments else 'coco2017labels.zip')] # labels
  31. download(urls, dir=dir.parent)
  32. # Download data
  33. urls = ['http://images.cocodataset.org/zips/train2017.zip', # 19G, 118k images
  34. 'http://images.cocodataset.org/zips/val2017.zip', # 1G, 5k images
  35. 'http://images.cocodataset.org/zips/test2017.zip'] # 7G, 41k images (optional)
  36. download(urls, dir=dir / 'images', threads=3)