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.

4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
3 年之前
3 年之前
3 年之前
4 年之前
4 年之前
3 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
4 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <div align="center">
  2. <p>
  3. <a align="left" href="https://ultralytics.com/yolov5" target="_blank">
  4. <img width="850" src="https://github.com/ultralytics/yolov5/releases/download/v1.0/splash.jpg"></a>
  5. </p>
  6. <br>
  7. <div>
  8. <a href="https://github.com/ultralytics/yolov5/actions"><img src="https://github.com/ultralytics/yolov5/workflows/CI%20CPU%20testing/badge.svg" alt="CI CPU testing"></a>
  9. <a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="Open In Kaggle"></a>
  10. <br>
  11. <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
  12. <a href="https://www.kaggle.com/ultralytics/yolov5"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
  13. <a href="https://hub.docker.com/r/ultralytics/yolov5"><img src="https://img.shields.io/docker/pulls/ultralytics/yolov5?logo=docker" alt="Docker Pulls"></a>
  14. </div>
  15. <br>
  16. <div align="center">
  17. <a href="https://github.com/ultralytics">
  18. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-github.png" width="2%"/>
  19. </a>
  20. <img width="2%" />
  21. <a href="https://www.linkedin.com/company/ultralytics">
  22. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-linkedin.png" width="2%"/>
  23. </a>
  24. <img width="2%" />
  25. <a href="https://twitter.com/ultralytics">
  26. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-twitter.png" width="2%"/>
  27. </a>
  28. <img width="2%" />
  29. <a href="https://youtube.com/ultralytics">
  30. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-youtube.png" width="2%"/>
  31. </a>
  32. <img width="2%" />
  33. <a href="https://www.facebook.com/ultralytics">
  34. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-facebook.png" width="2%"/>
  35. </a>
  36. <img width="2%" />
  37. <a href="https://www.instagram.com/ultralytics/">
  38. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-instagram.png" width="2%"/>
  39. </a>
  40. </div>
  41. <br>
  42. <p>
  43. YOLOv5 🚀 is a family of object detection architectures and models pretrained on the COCO dataset, and represents <a href="https://ultralytics.com">Ultralytics</a>
  44. open-source research into future vision AI methods, incorporating lessons learned and best practices evolved over thousands of hours of research and development.
  45. </p>
  46. <!--
  47. <a align="center" href="https://ultralytics.com/yolov5" target="_blank">
  48. <img width="800" src="https://github.com/ultralytics/yolov5/releases/download/v1.0/banner-api.png"></a>
  49. -->
  50. </div>
  51. ## <div align="center">Documentation</div>
  52. See the [YOLOv5 Docs](https://docs.ultralytics.com) for full documentation on training, testing and deployment.
  53. ## <div align="center">Quick Start Examples</div>
  54. <details open>
  55. <summary>Install</summary>
  56. Python >= 3.6.0 required with all [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) dependencies installed:
  57. <!-- $ sudo apt update && apt install -y libgl1-mesa-glx libsm6 libxext6 libxrender-dev -->
  58. ```bash
  59. $ git clone https://github.com/ultralytics/yolov5
  60. $ cd yolov5
  61. $ pip install -r requirements.txt
  62. ```
  63. </details>
  64. <details open>
  65. <summary>Inference</summary>
  66. Inference with YOLOv5 and [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36). Models automatically download from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases).
  67. ```python
  68. import torch
  69. # Model
  70. model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # or yolov5m, yolov5x, custom
  71. # Images
  72. img = 'https://ultralytics.com/images/zidane.jpg' # or file, PIL, OpenCV, numpy, multiple
  73. # Inference
  74. results = model(img)
  75. # Results
  76. results.print() # or .show(), .save(), .crop(), .pandas(), etc.
  77. ```
  78. </details>
  79. <details>
  80. <summary>Inference with detect.py</summary>
  81. `detect.py` runs inference on a variety of sources, downloading models automatically from the [latest YOLOv5 release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`.
  82. ```bash
  83. $ python detect.py --source 0 # webcam
  84. file.jpg # image
  85. file.mp4 # video
  86. path/ # directory
  87. path/*.jpg # glob
  88. 'https://youtu.be/NUsoVlDFqZg' # YouTube video
  89. 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
  90. ```
  91. </details>
  92. <details>
  93. <summary>Training</summary>
  94. Run commands below to reproduce results on [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) dataset (dataset auto-downloads on first use). Training times for YOLOv5s/m/l/x are 2/4/6/8 days on a single V100 (multi-GPU times faster). Use the largest `--batch-size` your GPU allows (batch sizes shown for 16 GB devices).
  95. ```bash
  96. $ python train.py --data coco.yaml --cfg yolov5s.yaml --weights '' --batch-size 64
  97. yolov5m 40
  98. yolov5l 24
  99. yolov5x 16
  100. ```
  101. <img width="800" src="https://user-images.githubusercontent.com/26833433/90222759-949d8800-ddc1-11ea-9fa1-1c97eed2b963.png">
  102. </details>
  103. <details open>
  104. <summary>Tutorials</summary>
  105. * [Train Custom Data](https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data)&nbsp; 🚀 RECOMMENDED
  106. * [Tips for Best Training Results](https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results)&nbsp; ☘️ RECOMMENDED
  107. * [Weights & Biases Logging](https://github.com/ultralytics/yolov5/issues/1289)&nbsp; 🌟 NEW
  108. * [Supervisely Ecosystem](https://github.com/ultralytics/yolov5/issues/2518)&nbsp; 🌟 NEW
  109. * [Multi-GPU Training](https://github.com/ultralytics/yolov5/issues/475)
  110. * [PyTorch Hub](https://github.com/ultralytics/yolov5/issues/36)&nbsp; ⭐ NEW
  111. * [TorchScript, ONNX, CoreML Export](https://github.com/ultralytics/yolov5/issues/251) 🚀
  112. * [Test-Time Augmentation (TTA)](https://github.com/ultralytics/yolov5/issues/303)
  113. * [Model Ensembling](https://github.com/ultralytics/yolov5/issues/318)
  114. * [Model Pruning/Sparsity](https://github.com/ultralytics/yolov5/issues/304)
  115. * [Hyperparameter Evolution](https://github.com/ultralytics/yolov5/issues/607)
  116. * [Transfer Learning with Frozen Layers](https://github.com/ultralytics/yolov5/issues/1314)&nbsp; ⭐ NEW
  117. * [TensorRT Deployment](https://github.com/wang-xinyu/tensorrtx)
  118. </details>
  119. ## <div align="center">Environments and Integrations</div>
  120. Get started in seconds with our verified environments and integrations, including [Weights & Biases](https://wandb.ai/site?utm_campaign=repo_yolo_readme) for automatic YOLOv5 experiment logging. Click each icon below for details.
  121. <div align="center">
  122. <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb">
  123. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-colab-small.png" width="15%"/>
  124. </a>
  125. <a href="https://www.kaggle.com/ultralytics/yolov5">
  126. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-kaggle-small.png" width="15%"/>
  127. </a>
  128. <a href="https://hub.docker.com/r/ultralytics/yolov5">
  129. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-docker-small.png" width="15%"/>
  130. </a>
  131. <a href="https://github.com/ultralytics/yolov5/wiki/AWS-Quickstart">
  132. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-aws-small.png" width="15%"/>
  133. </a>
  134. <a href="https://github.com/ultralytics/yolov5/wiki/GCP-Quickstart">
  135. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-gcp-small.png" width="15%"/>
  136. </a>
  137. <a href="https://wandb.ai/site?utm_campaign=repo_yolo_readme">
  138. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-wb-small.png" width="15%"/>
  139. </a>
  140. </div>
  141. ## <div align="center">Compete and Win</div>
  142. We are super excited about our first-ever Ultralytics YOLOv5 🚀 EXPORT Competition with **$10,000** in cash prizes!
  143. <div align="center">
  144. <a href="https://github.com/ultralytics/yolov5/discussions/3213">
  145. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/banner-export-competition.png"/>
  146. </a>
  147. </div>
  148. ## <div align="center">Why YOLOv5</div>
  149. <p align="center"><img width="800" src="https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png"></p>
  150. <details>
  151. <summary>YOLOv5-P5 640 Figure (click to expand)</summary>
  152. <p align="center"><img width="800" src="https://user-images.githubusercontent.com/26833433/114313219-f1d70e00-9af5-11eb-9973-52b1f98d321a.png"></p>
  153. </details>
  154. <details>
  155. <summary>Figure Notes (click to expand)</summary>
  156. * GPU Speed measures end-to-end time per image averaged over 5000 COCO val2017 images using a V100 GPU with batch size 32, and includes image preprocessing, PyTorch FP16 inference, postprocessing and NMS.
  157. * EfficientDet data from [google/automl](https://github.com/google/automl) at batch size 8.
  158. * **Reproduce** by `python test.py --task study --data coco.yaml --iou 0.7 --weights yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt`
  159. </details>
  160. ### Pretrained Checkpoints
  161. [assets]: https://github.com/ultralytics/yolov5/releases
  162. |Model |size<br><sup>(pixels) |mAP<sup>val<br>0.5:0.95 |mAP<sup>test<br>0.5:0.95 |mAP<sup>val<br>0.5 |Speed<br><sup>V100 (ms) | |params<br><sup>(M) |FLOPs<br><sup>640 (B)
  163. |--- |--- |--- |--- |--- |--- |---|--- |---
  164. |[YOLOv5s][assets] |640 |36.7 |36.7 |55.4 |**2.0** | |7.3 |17.0
  165. |[YOLOv5m][assets] |640 |44.5 |44.5 |63.1 |2.7 | |21.4 |51.3
  166. |[YOLOv5l][assets] |640 |48.2 |48.2 |66.9 |3.8 | |47.0 |115.4
  167. |[YOLOv5x][assets] |640 |**50.4** |**50.4** |**68.8** |6.1 | |87.7 |218.8
  168. | | | | | | | | |
  169. |[YOLOv5s6][assets] |1280 |43.3 |43.3 |61.9 |**4.3** | |12.7 |17.4
  170. |[YOLOv5m6][assets] |1280 |50.5 |50.5 |68.7 |8.4 | |35.9 |52.4
  171. |[YOLOv5l6][assets] |1280 |53.4 |53.4 |71.1 |12.3 | |77.2 |117.7
  172. |[YOLOv5x6][assets] |1280 |**54.4** |**54.4** |**72.0** |22.4 | |141.8 |222.9
  173. | | | | | | | | |
  174. |[YOLOv5x6][assets] TTA |1280 |**55.0** |**55.0** |**72.0** |70.8 | |- |-
  175. <details>
  176. <summary>Table Notes (click to expand)</summary>
  177. * AP<sup>test</sup> denotes COCO [test-dev2017](http://cocodataset.org/#upload) server results, all other AP results denote val2017 accuracy.
  178. * AP values are for single-model single-scale unless otherwise noted. **Reproduce mAP** by `python test.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65`
  179. * Speed<sub>GPU</sub> averaged over 5000 COCO val2017 images using a GCP [n1-standard-16](https://cloud.google.com/compute/docs/machine-types#n1_standard_machine_types) V100 instance, and includes FP16 inference, postprocessing and NMS. **Reproduce speed** by `python test.py --data coco.yaml --img 640 --conf 0.25 --iou 0.45`
  180. * All checkpoints are trained to 300 epochs with default settings and hyperparameters (no autoaugmentation).
  181. * Test Time Augmentation ([TTA](https://github.com/ultralytics/yolov5/issues/303)) includes reflection and scale augmentation. **Reproduce TTA** by `python test.py --data coco.yaml --img 1536 --iou 0.7 --augment`
  182. </details>
  183. ## <div align="center">Contribute</div>
  184. We love your input! We want to make contributing to YOLOv5 as easy and transparent as possible. Please see our [Contributing Guide](CONTRIBUTING.md) to get started.
  185. ## <div align="center">Contact</div>
  186. For issues running YOLOv5 please visit [GitHub Issues](https://github.com/ultralytics/yolov5/issues). For business or professional support requests please visit
  187. [https://ultralytics.com/contact](https://ultralytics.com/contact).
  188. <br>
  189. <div align="center">
  190. <a href="https://github.com/ultralytics">
  191. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-github.png" width="3%"/>
  192. </a>
  193. <img width="3%" />
  194. <a href="https://www.linkedin.com/company/ultralytics">
  195. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-linkedin.png" width="3%"/>
  196. </a>
  197. <img width="3%" />
  198. <a href="https://twitter.com/ultralytics">
  199. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-twitter.png" width="3%"/>
  200. </a>
  201. <img width="3%" />
  202. <a href="https://youtube.com/ultralytics">
  203. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-youtube.png" width="3%"/>
  204. </a>
  205. <img width="3%" />
  206. <a href="https://www.facebook.com/ultralytics">
  207. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-facebook.png" width="3%"/>
  208. </a>
  209. <img width="3%" />
  210. <a href="https://www.instagram.com/ultralytics/">
  211. <img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-social-instagram.png" width="3%"/>
  212. </a>
  213. </div>