download_weights.sh 568 B

123456789101112131415161718
  1. #!/bin/bash
  2. # Ultralytics YOLO 🚀, AGPL-3.0 license
  3. # Download latest models from https://github.com/ultralytics/assets/releases
  4. # Example usage: bash ultralytics/data/scripts/download_weights.sh
  5. # parent
  6. # └── weights
  7. # ├── yolov8n.pt ← downloads here
  8. # ├── yolov8s.pt
  9. # └── ...
  10. python - <<EOF
  11. from ultralytics.utils.downloads import attempt_download_asset
  12. assets = [f'yolov8{size}{suffix}.pt' for size in 'nsmlx' for suffix in ('', '-cls', '-seg', '-pose')]
  13. for x in assets:
  14. attempt_download_asset(f'weights/{x}')
  15. EOF