glenn-jocher commited on
Commit
24bea5e
Β·
unverified Β·
1 Parent(s): bb0aed1

Standardize headers and docstrings (#4417)

Browse files

* Implement new headers

* Reformat 1

* Reformat 2

* Reformat 3 - math

* Reformat 4 - yaml

This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. .github/workflows/ci-testing.yml +7 -5
  2. .github/workflows/codeql-analysis.yml +1 -1
  3. .github/workflows/greetings.yml +3 -1
  4. .github/workflows/rebase.yml +1 -1
  5. .github/workflows/stale.yml +2 -0
  6. Dockerfile +2 -0
  7. data/Argoverse.yaml +1 -1
  8. data/GlobalWheat2020.yaml +1 -1
  9. data/Objects365.yaml +1 -1
  10. data/SKU-110K.yaml +1 -1
  11. data/VOC.yaml +1 -1
  12. data/VisDrone.yaml +1 -1
  13. data/coco.yaml +1 -1
  14. data/coco128.yaml +1 -1
  15. data/hyps/hyp.finetune.yaml +1 -1
  16. data/hyps/hyp.finetune_objects365.yaml +2 -0
  17. data/hyps/hyp.scratch-p6.yaml +1 -1
  18. data/hyps/hyp.scratch.yaml +1 -1
  19. data/scripts/download_weights.sh +1 -1
  20. data/scripts/get_coco.sh +1 -1
  21. data/scripts/get_coco128.sh +1 -1
  22. data/xView.yaml +1 -1
  23. detect.py +3 -1
  24. export.py +3 -1
  25. hubconf.py +3 -1
  26. models/common.py +5 -2
  27. models/experimental.py +5 -2
  28. models/hub/anchors.yaml +2 -1
  29. models/hub/yolov3-spp.yaml +2 -0
  30. models/hub/yolov3-tiny.yaml +2 -0
  31. models/hub/yolov3.yaml +2 -0
  32. models/hub/yolov5-bifpn.yaml +2 -0
  33. models/hub/yolov5-fpn.yaml +2 -0
  34. models/hub/yolov5-p2.yaml +2 -0
  35. models/hub/yolov5-p6.yaml +2 -0
  36. models/hub/yolov5-p7.yaml +2 -0
  37. models/hub/yolov5-panet.yaml +2 -0
  38. models/hub/yolov5l6.yaml +2 -0
  39. models/hub/yolov5m6.yaml +2 -0
  40. models/hub/yolov5s-ghost.yaml +2 -0
  41. models/hub/yolov5s-transformer.yaml +2 -0
  42. models/hub/yolov5s6.yaml +2 -0
  43. models/hub/yolov5x6.yaml +2 -0
  44. models/yolo.py +3 -1
  45. models/yolov5l.yaml +2 -0
  46. models/yolov5m.yaml +2 -0
  47. models/yolov5s.yaml +2 -0
  48. models/yolov5x.yaml +2 -0
  49. train.py +4 -2
  50. utils/activations.py +4 -1
.github/workflows/ci-testing.yml CHANGED
@@ -1,11 +1,13 @@
 
 
1
  name: CI CPU testing
2
 
3
  on: # https://help.github.com/en/actions/reference/events-that-trigger-workflows
4
  push:
5
- branches: [ master, develop ]
6
  pull_request:
7
  # The branches below must be a subset of the branches above
8
- branches: [ master, develop ]
9
 
10
  jobs:
11
  cpu-tests:
@@ -14,9 +16,9 @@ jobs:
14
  strategy:
15
  fail-fast: false
16
  matrix:
17
- os: [ ubuntu-latest, macos-latest, windows-latest ]
18
- python-version: [ 3.8 ]
19
- model: [ 'yolov5s' ] # models to test
20
 
21
  # Timeout: https://stackoverflow.com/a/59076067/4521646
22
  timeout-minutes: 50
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  name: CI CPU testing
4
 
5
  on: # https://help.github.com/en/actions/reference/events-that-trigger-workflows
6
  push:
7
+ branches: [master, develop]
8
  pull_request:
9
  # The branches below must be a subset of the branches above
10
+ branches: [master, develop]
11
 
12
  jobs:
13
  cpu-tests:
 
16
  strategy:
17
  fail-fast: false
18
  matrix:
19
+ os: [ubuntu-latest, macos-latest, windows-latest]
20
+ python-version: [3.8]
21
+ model: ['yolov5s'] # models to test
22
 
23
  # Timeout: https://stackoverflow.com/a/59076067/4521646
24
  timeout-minutes: 50
.github/workflows/codeql-analysis.yml CHANGED
@@ -15,7 +15,7 @@ jobs:
15
  strategy:
16
  fail-fast: false
17
  matrix:
18
- language: [ 'python' ]
19
  # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
20
  # Learn more:
21
  # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
 
15
  strategy:
16
  fail-fast: false
17
  matrix:
18
+ language: ['python']
19
  # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
20
  # Learn more:
21
  # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
.github/workflows/greetings.yml CHANGED
@@ -1,6 +1,8 @@
 
 
1
  name: Greetings
2
 
3
- on: [ pull_request_target, issues ]
4
 
5
  jobs:
6
  greeting:
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  name: Greetings
4
 
5
+ on: [pull_request_target, issues]
6
 
7
  jobs:
8
  greeting:
.github/workflows/rebase.yml CHANGED
@@ -3,7 +3,7 @@ name: Automatic Rebase
3
 
4
  on:
5
  issue_comment:
6
- types: [ created ]
7
 
8
  jobs:
9
  rebase:
 
3
 
4
  on:
5
  issue_comment:
6
+ types: [created]
7
 
8
  jobs:
9
  rebase:
.github/workflows/stale.yml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  name: Close stale issues
2
  on:
3
  schedule:
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  name: Close stale issues
4
  on:
5
  schedule:
Dockerfile CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Start FROM Nvidia PyTorch image https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
2
  FROM nvcr.io/nvidia/pytorch:21.05-py3
3
 
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Start FROM Nvidia PyTorch image https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
4
  FROM nvcr.io/nvidia/pytorch:21.05-py3
5
 
data/Argoverse.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # Argoverse-HD dataset (ring-front-center camera) http://www.cs.cmu.edu/~mengtial/proj/streaming/
3
  # Example usage: python train.py --data Argoverse.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # Argoverse-HD dataset (ring-front-center camera) http://www.cs.cmu.edu/~mengtial/proj/streaming/
3
  # Example usage: python train.py --data Argoverse.yaml
4
  # parent
data/GlobalWheat2020.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # Global Wheat 2020 dataset http://www.global-wheat.com/
3
  # Example usage: python train.py --data GlobalWheat2020.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # Global Wheat 2020 dataset http://www.global-wheat.com/
3
  # Example usage: python train.py --data GlobalWheat2020.yaml
4
  # parent
data/Objects365.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # Objects365 dataset https://www.objects365.org/
3
  # Example usage: python train.py --data Objects365.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # Objects365 dataset https://www.objects365.org/
3
  # Example usage: python train.py --data Objects365.yaml
4
  # parent
data/SKU-110K.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19
3
  # Example usage: python train.py --data SKU-110K.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19
3
  # Example usage: python train.py --data SKU-110K.yaml
4
  # parent
data/VOC.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC
3
  # Example usage: python train.py --data VOC.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC
3
  # Example usage: python train.py --data VOC.yaml
4
  # parent
data/VisDrone.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset
3
  # Example usage: python train.py --data VisDrone.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset
3
  # Example usage: python train.py --data VisDrone.yaml
4
  # parent
data/coco.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # COCO 2017 dataset http://cocodataset.org
3
  # Example usage: python train.py --data coco.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # COCO 2017 dataset http://cocodataset.org
3
  # Example usage: python train.py --data coco.yaml
4
  # parent
data/coco128.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017)
3
  # Example usage: python train.py --data coco128.yaml
4
  # parent
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017)
3
  # Example usage: python train.py --data coco128.yaml
4
  # parent
data/hyps/hyp.finetune.yaml CHANGED
@@ -1,8 +1,8 @@
 
1
  # Hyperparameters for VOC finetuning
2
  # python train.py --batch 64 --weights yolov5m.pt --data VOC.yaml --img 512 --epochs 50
3
  # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
4
 
5
-
6
  # Hyperparameter Evolution Results
7
  # Generations: 306
8
  # P R mAP.5 mAP.5:.95 box obj cls
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # Hyperparameters for VOC finetuning
3
  # python train.py --batch 64 --weights yolov5m.pt --data VOC.yaml --img 512 --epochs 50
4
  # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
5
 
 
6
  # Hyperparameter Evolution Results
7
  # Generations: 306
8
  # P R mAP.5 mAP.5:.95 box obj cls
data/hyps/hyp.finetune_objects365.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  lr0: 0.00258
2
  lrf: 0.17
3
  momentum: 0.779
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  lr0: 0.00258
4
  lrf: 0.17
5
  momentum: 0.779
data/hyps/hyp.scratch-p6.yaml CHANGED
@@ -1,8 +1,8 @@
 
1
  # Hyperparameters for COCO training from scratch
2
  # python train.py --batch 32 --cfg yolov5m6.yaml --weights '' --data coco.yaml --img 1280 --epochs 300
3
  # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
4
 
5
-
6
  lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
7
  lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
8
  momentum: 0.937 # SGD momentum/Adam beta1
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # Hyperparameters for COCO training from scratch
3
  # python train.py --batch 32 --cfg yolov5m6.yaml --weights '' --data coco.yaml --img 1280 --epochs 300
4
  # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
5
 
 
6
  lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
7
  lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
8
  momentum: 0.937 # SGD momentum/Adam beta1
data/hyps/hyp.scratch.yaml CHANGED
@@ -1,8 +1,8 @@
 
1
  # Hyperparameters for COCO training from scratch
2
  # python train.py --batch 40 --cfg yolov5m.yaml --weights '' --data coco.yaml --img 640 --epochs 300
3
  # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
4
 
5
-
6
  lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
7
  lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
8
  momentum: 0.937 # SGD momentum/Adam beta1
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # Hyperparameters for COCO training from scratch
3
  # python train.py --batch 40 --cfg yolov5m.yaml --weights '' --data coco.yaml --img 640 --epochs 300
4
  # See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
5
 
 
6
  lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
7
  lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
8
  momentum: 0.937 # SGD momentum/Adam beta1
data/scripts/download_weights.sh CHANGED
@@ -1,5 +1,5 @@
1
  #!/bin/bash
2
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
3
  # Download latest models from https://github.com/ultralytics/yolov5/releases
4
  # Example usage: bash path/to/download_weights.sh
5
  # parent
 
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
data/scripts/get_coco.sh CHANGED
@@ -1,5 +1,5 @@
1
  #!/bin/bash
2
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
3
  # Download COCO 2017 dataset http://cocodataset.org
4
  # Example usage: bash data/scripts/get_coco.sh
5
  # parent
 
1
  #!/bin/bash
2
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
3
  # Download COCO 2017 dataset http://cocodataset.org
4
  # Example usage: bash data/scripts/get_coco.sh
5
  # parent
data/scripts/get_coco128.sh CHANGED
@@ -1,5 +1,5 @@
1
  #!/bin/bash
2
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
3
  # Download COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017)
4
  # Example usage: bash data/scripts/get_coco128.sh
5
  # parent
 
1
  #!/bin/bash
2
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
3
  # Download COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017)
4
  # Example usage: bash data/scripts/get_coco128.sh
5
  # parent
data/xView.yaml CHANGED
@@ -1,4 +1,4 @@
1
- # YOLOv5 πŸš€ by Ultralytics https://ultralytics.com, licensed under GNU GPL v3.0
2
  # xView 2018 dataset https://challenge.xviewdataset.org
3
  # -------- DOWNLOAD DATA MANUALLY from URL above and unzip to 'datasets/xView' before running train command! --------
4
  # Example usage: python train.py --data xView.yaml
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
  # xView 2018 dataset https://challenge.xviewdataset.org
3
  # -------- DOWNLOAD DATA MANUALLY from URL above and unzip to 'datasets/xView' before running train command! --------
4
  # Example usage: python train.py --data xView.yaml
detect.py CHANGED
@@ -1,4 +1,6 @@
1
- """Run inference with a YOLOv5 model on images, videos, directories, streams
 
 
2
 
3
  Usage:
4
  $ python path/to/detect.py --source path/to/img.jpg --weights yolov5s.pt --img 640
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ Run inference on images, videos, directories, streams, etc.
4
 
5
  Usage:
6
  $ python path/to/detect.py --source path/to/img.jpg --weights yolov5s.pt --img 640
export.py CHANGED
@@ -1,4 +1,6 @@
1
- """Export a YOLOv5 *.pt model to TorchScript, ONNX, CoreML formats
 
 
2
 
3
  Usage:
4
  $ python path/to/export.py --weights yolov5s.pt --img 640 --batch 1
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ Export a PyTorch model to TorchScript, ONNX, CoreML formats
4
 
5
  Usage:
6
  $ python path/to/export.py --weights yolov5s.pt --img 640 --batch 1
hubconf.py CHANGED
@@ -1,4 +1,6 @@
1
- """YOLOv5 PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/
 
 
2
 
3
  Usage:
4
  import torch
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/
4
 
5
  Usage:
6
  import torch
models/common.py CHANGED
@@ -1,11 +1,14 @@
1
- # YOLOv5 common modules
 
 
 
2
 
3
  import logging
 
4
  import warnings
5
  from copy import copy
6
  from pathlib import Path
7
 
8
- import math
9
  import numpy as np
10
  import pandas as pd
11
  import requests
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ Common modules
4
+ """
5
 
6
  import logging
7
+ import math
8
  import warnings
9
  from copy import copy
10
  from pathlib import Path
11
 
 
12
  import numpy as np
13
  import pandas as pd
14
  import requests
models/experimental.py CHANGED
@@ -1,10 +1,13 @@
1
- # YOLOv5 experimental modules
 
 
 
2
 
3
  import numpy as np
4
  import torch
5
  import torch.nn as nn
6
 
7
- from models.common import Conv, DWConv
8
  from utils.downloads import attempt_download
9
 
10
 
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ Experimental modules
4
+ """
5
 
6
  import numpy as np
7
  import torch
8
  import torch.nn as nn
9
 
10
+ from models.common import Conv
11
  from utils.downloads import attempt_download
12
 
13
 
models/hub/anchors.yaml CHANGED
@@ -1,4 +1,5 @@
1
- # Default YOLOv5 anchors for COCO data
 
2
 
3
 
4
  # P5 -------------------------------------------------------------------------------------------------------------------
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ # Default anchors for COCO data
3
 
4
 
5
  # P5 -------------------------------------------------------------------------------------------------------------------
models/hub/yolov3-spp.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov3-tiny.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov3.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5-bifpn.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5-fpn.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5-p2.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5-p6.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5-p7.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5-panet.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5l6.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/hub/yolov5m6.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 0.67 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 0.67 # model depth multiple
models/hub/yolov5s-ghost.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 0.33 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 0.33 # model depth multiple
models/hub/yolov5s-transformer.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 0.33 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 0.33 # model depth multiple
models/hub/yolov5s6.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 0.33 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 0.33 # model depth multiple
models/hub/yolov5x6.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.33 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.33 # model depth multiple
models/yolo.py CHANGED
@@ -1,4 +1,6 @@
1
- """YOLOv5-specific modules
 
 
2
 
3
  Usage:
4
  $ python path/to/models/yolo.py --cfg yolov5s.yaml
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ YOLO-specific modules
4
 
5
  Usage:
6
  $ python path/to/models/yolo.py --cfg yolov5s.yaml
models/yolov5l.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.0 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.0 # model depth multiple
models/yolov5m.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 0.67 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 0.67 # model depth multiple
models/yolov5s.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 0.33 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 0.33 # model depth multiple
models/yolov5x.yaml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  # Parameters
2
  nc: 80 # number of classes
3
  depth_multiple: 1.33 # model depth multiple
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+
3
  # Parameters
4
  nc: 80 # number of classes
5
  depth_multiple: 1.33 # model depth multiple
train.py CHANGED
@@ -1,4 +1,6 @@
1
- """Train a YOLOv5 model on a custom dataset
 
 
2
 
3
  Usage:
4
  $ python path/to/train.py --data coco128.yaml --weights yolov5s.pt --img 640
@@ -6,6 +8,7 @@ Usage:
6
 
7
  import argparse
8
  import logging
 
9
  import os
10
  import random
11
  import sys
@@ -13,7 +16,6 @@ import time
13
  from copy import deepcopy
14
  from pathlib import Path
15
 
16
- import math
17
  import numpy as np
18
  import torch
19
  import torch.distributed as dist
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ Train a YOLOv5 model on a custom dataset
4
 
5
  Usage:
6
  $ python path/to/train.py --data coco128.yaml --weights yolov5s.pt --img 640
 
8
 
9
  import argparse
10
  import logging
11
+ import math
12
  import os
13
  import random
14
  import sys
 
16
  from copy import deepcopy
17
  from pathlib import Path
18
 
 
19
  import numpy as np
20
  import torch
21
  import torch.distributed as dist
utils/activations.py CHANGED
@@ -1,4 +1,7 @@
1
- # Activation functions
 
 
 
2
 
3
  import torch
4
  import torch.nn as nn
 
1
+ # YOLOv5 πŸš€ by Ultralytics, GPL-3.0 license
2
+ """
3
+ Activation functions
4
+ """
5
 
6
  import torch
7
  import torch.nn as nn