OBB Docs updates (#7512)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Muhammad Rizwan Munawar <chr043416@gmail.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2024-01-12 00:06:22 +01:00 committed by GitHub
parent 09ee982d35
commit 4dc8c406f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 117 additions and 47 deletions

View file

@ -605,7 +605,9 @@ class OBB(BaseTensor):
conf (torch.Tensor | numpy.ndarray): The confidence values of the boxes.
cls (torch.Tensor | numpy.ndarray): The class values of the boxes.
id (torch.Tensor | numpy.ndarray): The track IDs of the boxes (if available).
xyxyxyxy (torch.Tensor | numpy.ndarray): The boxes in xyxyxyxy format normalized by original image size.
xyxyxyxyn (torch.Tensor | numpy.ndarray): The rotated boxes in xyxyxyxy format normalized by original image size.
xyxyxyxy (torch.Tensor | numpy.ndarray): The rotated boxes in xyxyxyxy format.
xyxy (torch.Tensor | numpy.ndarray): The horizontal boxes in xyxyxyxy format.
data (torch.Tensor): The raw OBB tensor (alias for `boxes`).
Methods:

View file

@ -1,5 +1,5 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
# This module defines the base classes and structures for object tracking in YOLO.
"""This module defines the base classes and structures for object tracking in YOLO."""
from collections import OrderedDict

View file

@ -1,3 +1,5 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
from functools import partial
from pathlib import Path

View file

@ -365,7 +365,6 @@ class Annotator:
self.tf = count_txt_size
tl = self.tf or round(0.002 * (self.im.shape[0] + self.im.shape[1]) / 2) + 1
tf = max(tl - 1, 1)
gap = int(24 * tl) # gap between in_count and out_count based on line_thickness
# Get text size for in_count and out_count
t_size_in = cv2.getTextSize(str(counts), 0, fontScale=tl / 2, thickness=tf)[0]