Skip to content

Commit

Permalink
Standardize license headers in Python files (#2314)
Browse files Browse the repository at this point in the history
* Refactor code for speed and clarity

* Auto-format by https://ultralytics.com/actions

---------

Co-authored-by: Glenn Jocher <[email protected]>
Co-authored-by: UltralyticsAssistant <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent a62c0f2 commit 7beeb1f
Show file tree
Hide file tree
Showing 52 changed files with 53 additions and 47 deletions.
2 changes: 1 addition & 1 deletion benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Run YOLOv3 benchmarks on all supported export formats.
Expand Down
2 changes: 1 addition & 1 deletion classify/predict.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Run YOLOv3 classification inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
Expand Down
2 changes: 1 addition & 1 deletion classify/train.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Train a YOLOv3 classifier model on a classification dataset.
Expand Down
2 changes: 1 addition & 1 deletion classify/val.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Validate a trained YOLOv3 classification model on a classification dataset.
Expand Down
2 changes: 1 addition & 1 deletion detect.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Run YOLOv3 detection inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
Expand Down
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Export a YOLOv3 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit.
Expand Down
2 changes: 1 addition & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5.
Expand Down
1 change: 1 addition & 0 deletions models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
2 changes: 1 addition & 1 deletion models/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Common modules."""

import ast
Expand Down
2 changes: 1 addition & 1 deletion models/experimental.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Experimental modules."""

import math
Expand Down
2 changes: 1 addition & 1 deletion models/tf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
TensorFlow, Keras and TFLite versions of YOLOv3
Authored by https://github.com/zldrobit in PR https://github.com/ultralytics/yolov5/pull/1127.
Expand Down
2 changes: 1 addition & 1 deletion models/yolo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
YOLO-specific modules.
Expand Down
2 changes: 1 addition & 1 deletion segment/predict.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Run YOLOv3 segmentation inference on images, videos, directories, streams, etc.
Expand Down
2 changes: 1 addition & 1 deletion segment/train.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Train a YOLOv3 segment model on a segment dataset Models and datasets download automatically from the latest YOLOv3
release.
Expand Down
2 changes: 1 addition & 1 deletion segment/val.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Validate a trained YOLOv3 segment model on a segment dataset.
Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Train a YOLOv3 model on a custom dataset. Models and datasets download automatically from the latest YOLOv3 release.
Expand Down
2 changes: 1 addition & 1 deletion utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""utils/initialization."""

import contextlib
Expand Down
2 changes: 1 addition & 1 deletion utils/activations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Activation functions."""

import torch
Expand Down
2 changes: 1 addition & 1 deletion utils/augmentations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Image augmentation functions."""

import math
Expand Down
2 changes: 1 addition & 1 deletion utils/autoanchor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""AutoAnchor utils."""

import random
Expand Down
2 changes: 1 addition & 1 deletion utils/autobatch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Auto-batch utils."""

from copy import deepcopy
Expand Down
1 change: 1 addition & 0 deletions utils/aws/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
3 changes: 2 additions & 1 deletion utils/aws/resume.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

# Resume all interrupted trainings in yolov5/ dir including DDP trainings
# Usage: $ python utils/aws/resume.py

Expand Down
2 changes: 1 addition & 1 deletion utils/callbacks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Callback utils."""

import threading
Expand Down
2 changes: 1 addition & 1 deletion utils/dataloaders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Dataloaders and dataset utils."""

import contextlib
Expand Down
2 changes: 1 addition & 1 deletion utils/downloads.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Download utils."""

import logging
Expand Down
2 changes: 1 addition & 1 deletion utils/flask_rest_api/example_request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Perform test request."""

import pprint
Expand Down
2 changes: 1 addition & 1 deletion utils/flask_rest_api/restapi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Run a Flask REST API exposing one or more YOLOv5s models."""

import argparse
Expand Down
2 changes: 1 addition & 1 deletion utils/general.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""General utils."""

import contextlib
Expand Down
2 changes: 1 addition & 1 deletion utils/loggers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Logging utils."""

import os
Expand Down
2 changes: 1 addition & 1 deletion utils/loggers/clearml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## About ClearML

[ClearML](https://clear.ml/) is an [open-source](https://github.com/allegroai/clearml) toolbox designed to save you time ⏱️.
[ClearML](https://clear.ml/) is an [open-source](https://github.com/clearml/clearml) toolbox designed to save you time ⏱️.

πŸ”¨ Track every YOLOv5 training run in the <b>experiment manager</b>

Expand Down
1 change: 1 addition & 0 deletions utils/loggers/clearml/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
2 changes: 1 addition & 1 deletion utils/loggers/clearml/clearml_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Main Logger class for ClearML experiment tracking."""

import glob
Expand Down
2 changes: 1 addition & 1 deletion utils/loggers/clearml/hpo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

from clearml import Task

Expand Down
2 changes: 1 addition & 1 deletion utils/loggers/comet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import glob
import json
Expand Down
2 changes: 1 addition & 1 deletion utils/loggers/comet/comet_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import logging
import os
Expand Down
2 changes: 1 addition & 1 deletion utils/loggers/comet/hpo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import argparse
import json
Expand Down
1 change: 1 addition & 0 deletions utils/loggers/wandb/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
2 changes: 1 addition & 1 deletion utils/loggers/wandb/wandb_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

# WARNING ⚠️ wandb is deprecated and will be removed in future release.
# See supported integrations at https://github.com/ultralytics/yolov5#integrations
Expand Down
2 changes: 1 addition & 1 deletion utils/loss.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Loss functions."""

import torch
Expand Down
2 changes: 1 addition & 1 deletion utils/metrics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Model validation metrics."""

import math
Expand Down
2 changes: 1 addition & 1 deletion utils/plots.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Plotting utils."""

import contextlib
Expand Down
1 change: 1 addition & 0 deletions utils/segment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
2 changes: 1 addition & 1 deletion utils/segment/augmentations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Image augmentation functions."""

import math
Expand Down
2 changes: 1 addition & 1 deletion utils/segment/dataloaders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Dataloaders."""

import os
Expand Down
2 changes: 1 addition & 1 deletion utils/segment/general.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import cv2
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion utils/segment/loss.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import torch
import torch.nn as nn
Expand Down
2 changes: 1 addition & 1 deletion utils/segment/metrics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Model validation metrics."""

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion utils/segment/plots.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license

import contextlib
import math
Expand Down
2 changes: 1 addition & 1 deletion utils/torch_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""PyTorch utils."""

import math
Expand Down
2 changes: 1 addition & 1 deletion utils/triton.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""Utils to interact with the Triton Inference Server."""

import typing
Expand Down
2 changes: 1 addition & 1 deletion val.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ultralytics YOLOv3 πŸš€, AGPL-3.0 license
# Ultralytics πŸš€ AGPL-3.0 License - https://ultralytics.com/license
"""
Validate a trained YOLOv3 detection model on a detection dataset.
Expand Down

0 comments on commit 7beeb1f

Please sign in to comment.