download_weights.sh 523 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # YOLOv5 🚀 by Ultralytics, GPL-3.0 license
  3. # Download latest models from https://github.com/ultralytics/yolov5/releases
  4. # Example usage: bash path/to/download_weights.sh
  5. # parent
  6. # └── yolov5
  7. # ├── yolov5s.pt ← downloads here
  8. # ├── yolov5m.pt
  9. # └── ...
  10. python - <<EOF
  11. from utils.downloads import attempt_download
  12. models = ['n', 's', 'm', 'l', 'x']
  13. models.extend([x + '6' for x in models]) # add P6 models
  14. for x in models:
  15. attempt_download(f'yolov5{x}.pt')
  16. EOF