diff --git a/README.md b/README.md
index 05c2b38..44045a2 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
Welcome to the Ultralytics software directory! Our codebase is open-source and 🔓 **distributed under the AGPL-3.0 license**. Explore more about Ultralytics and our cutting-edge projects at [our website](http://www.ultralytics.com).
-[](https://github.com/ultralytics/xview-docker/actions/workflows/format.yml)
+[](https://github.com/ultralytics/xview-docker/actions/workflows/format.yml)
# Project Overview :page_facing_up:
diff --git a/utils/datasets.py b/utils/datasets.py
index d38f0a4..d2537de 100755
--- a/utils/datasets.py
+++ b/utils/datasets.py
@@ -401,6 +401,7 @@ def resize_square(img, height=416, color=(0, 0, 0)): # resizes a rectangular im
def random_affine(
img, targets=None, degrees=(-10, 10), translate=(0.1, 0.1), scale=(0.9, 1.1), shear=(-3, 3), borderValue=(0, 0, 0)
):
+ """Applies a random affine transformation to an image and updates target labels accordingly."""
# torchvision.transforms.RandomAffine(degrees=(-10, 10), translate=(.1, .1), scale=(.9, 1.1), shear=(-10, 10))
# https://medium.com/uruvideo/dataset-augmentation-with-random-homographies-a8f4b44830d4
border = 750
diff --git a/utils/utils.py b/utils/utils.py
index 9d7c641..3551289 100755
--- a/utils/utils.py
+++ b/utils/utils.py
@@ -424,9 +424,7 @@ def build_targets(pred_boxes, pred_conf, pred_cls, target, anchor_wh, nA, nC, nG
return tx, ty, tw, th, tconf, tcls, TP, FP, FN, TC
-# @profile
def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4, mat=None, img=None, model2=None, device="cpu"):
- prediction = prediction.cpu()
"""
Removes detections with lower object confidence score than 'conf_thres' and performs Non-Maximum Suppression to
further filter detections.
@@ -434,6 +432,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4, mat=None, img
Returns detections with shape:
(x1, y1, x2, y2, object_conf, class_score, class_pred)
"""
+ prediction = prediction.cpu()
output = [None for _ in range(len(prediction))]
# Filter out confidence scores below threshold