ultralytics 8.0.210 docs updates and bug fixes (#6365)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Ceyda Cinarel (재이다) <15624271+cceyda@users.noreply.github.com>
Co-authored-by: DennisJ <106725464+DennisJcy@users.noreply.github.com>
Co-authored-by: Dickson Neoh <dickson.neoh@gmail.com>
Co-authored-by: Sergiu Waxmann <47978446+sergiuwaxmann@users.noreply.github.com>
Co-authored-by: Luca Serra <56681681+luca-serra@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-11-15 16:24:38 +01:00 committed by GitHub
parent 9a5891444e
commit 0473da00a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 125 additions and 57 deletions

View file

@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
__version__ = '8.0.209'
__version__ = '8.0.210'
from ultralytics.models import RTDETR, SAM, YOLO
from ultralytics.models.fastsam import FastSAM

View file

@ -493,7 +493,7 @@ def autocast_list(source):
LOADERS = LoadStreams, LoadPilAndNumpy, LoadImages, LoadScreenshots # tuple
def get_best_youtube_url(url, use_pafy=False):
def get_best_youtube_url(url, use_pafy=True):
"""
Retrieves the URL of the best quality MP4 video stream from a given YouTube video.

View file

@ -223,6 +223,13 @@ class ConfusionMatrix:
labels (Array[M, 5]): Ground truth bounding boxes and their associated class labels.
Each row should contain (class, x1, y1, x2, y2).
"""
if labels.size(0) == 0: # Check if labels is empty
if detections is not None:
detections = detections[detections[:, 4] > self.conf]
detection_classes = detections[:, 5].int()
for dc in detection_classes:
self.matrix[dc, self.nc] += 1 # false positives
return
if detections is None:
gt_classes = labels.int()
for gc in gt_classes: