PyCharm Code Inspect fixes (#18392)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-12-25 16:24:29 +01:00 committed by GitHub
parent d35860d4a1
commit e5e91967d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 72 additions and 72 deletions

View file

@ -441,7 +441,8 @@ class BaseMixTransform:
"""
raise NotImplementedError
def _update_label_text(self, labels):
@staticmethod
def _update_label_text(labels):
"""
Updates label text and class IDs for mixed labels in image augmentation.
@ -1259,7 +1260,8 @@ class RandomPerspective:
labels["resized_shape"] = img.shape[:2]
return labels
def box_candidates(self, box1, box2, wh_thr=2, ar_thr=100, area_thr=0.1, eps=1e-16):
@staticmethod
def box_candidates(box1, box2, wh_thr=2, ar_thr=100, area_thr=0.1, eps=1e-16):
"""
Compute candidate boxes for further processing based on size and aspect ratio criteria.
@ -1598,7 +1600,8 @@ class LetterBox:
else:
return img
def _update_labels(self, labels, ratio, padw, padh):
@staticmethod
def _update_labels(labels, ratio, padw, padh):
"""
Updates labels after applying letterboxing to an image.