Docs updates: Add Explorer to tab, YOLOv5 in Guides and Usage in Quickstart (#7438)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Haixuan Xavier Tao <tao.xavier@outlook.com>
This commit is contained in:
parent
53150a925b
commit
a92adf8231
30 changed files with 227 additions and 105 deletions
|
|
@ -65,6 +65,7 @@ class OBBValidator(DetectionValidator):
|
|||
return self.match_predictions(detections[:, 5], gt_cls, iou)
|
||||
|
||||
def _prepare_batch(self, si, batch):
|
||||
"""Prepares and returns a batch for OBB validation."""
|
||||
idx = batch['batch_idx'] == si
|
||||
cls = batch['cls'][idx].squeeze(-1)
|
||||
bbox = batch['bboxes'][idx]
|
||||
|
|
@ -78,6 +79,7 @@ class OBBValidator(DetectionValidator):
|
|||
return prepared_batch
|
||||
|
||||
def _prepare_pred(self, pred, pbatch):
|
||||
"""Prepares and returns a batch for OBB validation with scaled and padded bounding boxes."""
|
||||
predn = pred.clone()
|
||||
ops.scale_boxes(pbatch['imgsz'], predn[:, :4], pbatch['ori_shape'], ratio_pad=pbatch['ratio_pad'],
|
||||
xywh=True) # native-space pred
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue