From f5a491cd45063eea584cccc1e2d4df5575b64057 Mon Sep 17 00:00:00 2001 From: Muhammad Rizwan Munawar Date: Wed, 2 Oct 2024 03:17:23 +0500 Subject: [PATCH] `ultralytics 8.3.3` update Streamlit app to YOLO11 (#16590) Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- ultralytics/__init__.py | 2 +- ultralytics/solutions/streamlit_inference.py | 6 +++--- ultralytics/utils/plotting.py | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index f3d639ad05..36c33718ec 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.3.2" +__version__ = "8.3.3" import os diff --git a/ultralytics/solutions/streamlit_inference.py b/ultralytics/solutions/streamlit_inference.py index 85394350da..ea85cffba3 100644 --- a/ultralytics/solutions/streamlit_inference.py +++ b/ultralytics/solutions/streamlit_inference.py @@ -23,13 +23,13 @@ def inference(model=None): # Main title of streamlit application main_title_cfg = """

- Ultralytics YOLOv8 Streamlit Application + Ultralytics YOLO Streamlit Application

""" # Subtitle of streamlit application sub_title_cfg = """

- Experience real-time object detection on your webcam with the power of Ultralytics YOLOv8! 🚀

+ Experience real-time object detection on your webcam with the power of Ultralytics YOLO! 🚀
""" # Set html page configuration @@ -67,7 +67,7 @@ def inference(model=None): vid_file_name = 0 # Add dropdown menu for model selection - available_models = [x.replace("yolo", "YOLO") for x in GITHUB_ASSETS_STEMS if x.startswith("yolov8")] + available_models = [x.replace("yolo", "YOLO") for x in GITHUB_ASSETS_STEMS if x.startswith("yolo11")] if model: available_models.insert(0, model.split(".pt")[0]) # insert model without suffix as *.pt is added later diff --git a/ultralytics/utils/plotting.py b/ultralytics/utils/plotting.py index 16f1cb88cf..9d3051239c 100644 --- a/ultralytics/utils/plotting.py +++ b/ultralytics/utils/plotting.py @@ -591,8 +591,8 @@ class Annotator: Args: label (str): queue counts label points (tuple): region points for center point calculation to display text - region_color (RGB): queue region color - txt_color (RGB): text display color + region_color (tuple): RGB queue region color. + txt_color (tuple): RGB text display color. """ x_values = [point[0] for point in points] y_values = [point[1] for point in points] @@ -631,8 +631,8 @@ class Annotator: Args: im0 (ndarray): inference image text (str): object/class name - txt_color (bgr color): display color for text foreground - bg_color (bgr color): display color for text background + txt_color (tuple): display color for text foreground + bg_color (tuple): display color for text background x_center (float): x position center point for bounding box y_center (float): y position center point for bounding box margin (int): gap between text and rectangle for better display @@ -655,8 +655,8 @@ class Annotator: Args: im0 (ndarray): inference image text (dict): labels dictionary - txt_color (bgr color): display color for text foreground - bg_color (bgr color): display color for text background + txt_color (tuple): display color for text foreground + bg_color (tuple): display color for text background margin (int): gap between text and rectangle for better display """ horizontal_gap = int(im0.shape[1] * 0.02) @@ -836,8 +836,8 @@ class Annotator: Args: pixels_distance (float): Pixels distance between two bbox centroids. centroids (list): Bounding box centroids data. - line_color (RGB): Distance line color. - centroid_color (RGB): Bounding box centroid color. + line_color (tuple): RGB distance line color. + centroid_color (tuple): RGB bounding box centroid color. """ # Get the text size (text_width_m, text_height_m), _ = cv2.getTextSize(