Fix Docs pretty __init__.py URLs (#14550)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
0d059bec0c
commit
b3b3a15086
16 changed files with 49 additions and 22 deletions
|
|
@ -164,6 +164,8 @@ def benchmark(
|
|||
|
||||
|
||||
class RF100Benchmark:
|
||||
"""Benchmark YOLO model performance across formats for speed and accuracy."""
|
||||
|
||||
def __init__(self):
|
||||
"""Function for initialization of RF100Benchmark."""
|
||||
self.ds_names = []
|
||||
|
|
|
|||
|
|
@ -607,12 +607,10 @@ class v8ClassificationLoss:
|
|||
|
||||
|
||||
class v8OBBLoss(v8DetectionLoss):
|
||||
def __init__(self, model):
|
||||
"""
|
||||
Initializes v8OBBLoss with model, assigner, and rotated bbox loss.
|
||||
"""Calculates losses for object detection, classification, and box distribution in rotated YOLO models."""
|
||||
|
||||
Note model must be de-paralleled.
|
||||
"""
|
||||
def __init__(self, model):
|
||||
"""Initializes v8OBBLoss with model, assigner, and rotated bbox loss; note model must be de-paralleled."""
|
||||
super().__init__(model)
|
||||
self.assigner = RotatedTaskAlignedAssigner(topk=10, num_classes=self.nc, alpha=0.5, beta=6.0)
|
||||
self.bbox_loss = RotatedBboxLoss(self.reg_max).to(self.device)
|
||||
|
|
|
|||
|
|
@ -1221,6 +1221,8 @@ class ClassifyMetrics(SimpleClass):
|
|||
|
||||
|
||||
class OBBMetrics(SimpleClass):
|
||||
"""Metrics for evaluating oriented bounding box (OBB) detection, see https://arxiv.org/pdf/2106.06072.pdf."""
|
||||
|
||||
def __init__(self, save_dir=Path("."), plot=False, on_plot=None, names=()) -> None:
|
||||
"""Initialize an OBBMetrics instance with directory, plotting, callback, and class names."""
|
||||
self.save_dir = save_dir
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@ class TaskAlignedAssigner(nn.Module):
|
|||
|
||||
|
||||
class RotatedTaskAlignedAssigner(TaskAlignedAssigner):
|
||||
"""Assigns ground-truth objects to rotated bounding boxes using a task-aligned metric."""
|
||||
|
||||
def iou_calculation(self, gt_bboxes, pd_bboxes):
|
||||
"""IoU calculation for rotated bounding boxes."""
|
||||
return probiou(gt_bboxes, pd_bboxes).squeeze(-1).clamp_(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue