ultralytics 8.2.55__py3-none-any.whl → 8.2.56__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ultralytics might be problematic. Click here for more details.
- ultralytics/__init__.py +1 -1
- ultralytics/solutions/streamlit_inference.py +15 -25
- {ultralytics-8.2.55.dist-info → ultralytics-8.2.56.dist-info}/METADATA +1 -1
- {ultralytics-8.2.55.dist-info → ultralytics-8.2.56.dist-info}/RECORD +8 -8
- {ultralytics-8.2.55.dist-info → ultralytics-8.2.56.dist-info}/LICENSE +0 -0
- {ultralytics-8.2.55.dist-info → ultralytics-8.2.56.dist-info}/WHEEL +0 -0
- {ultralytics-8.2.55.dist-info → ultralytics-8.2.56.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.2.55.dist-info → ultralytics-8.2.56.dist-info}/top_level.txt +0 -0
ultralytics/__init__.py
CHANGED
|
@@ -6,6 +6,8 @@ import time
|
|
|
6
6
|
import cv2
|
|
7
7
|
import torch
|
|
8
8
|
|
|
9
|
+
from ultralytics.utils.downloads import GITHUB_ASSETS_STEMS
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
def inference():
|
|
11
13
|
"""Runs real-time object detection on video input using Ultralytics YOLOv8 in a Streamlit application."""
|
|
@@ -65,28 +67,12 @@ def inference():
|
|
|
65
67
|
vid_file_name = 0
|
|
66
68
|
|
|
67
69
|
# Add dropdown menu for model selection
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"YOLOv8l",
|
|
75
|
-
"YOLOv8x",
|
|
76
|
-
"YOLOv8n-Seg",
|
|
77
|
-
"YOLOv8s-Seg",
|
|
78
|
-
"YOLOv8m-Seg",
|
|
79
|
-
"YOLOv8l-Seg",
|
|
80
|
-
"YOLOv8x-Seg",
|
|
81
|
-
"YOLOv8n-Pose",
|
|
82
|
-
"YOLOv8s-Pose",
|
|
83
|
-
"YOLOv8m-Pose",
|
|
84
|
-
"YOLOv8l-Pose",
|
|
85
|
-
"YOLOv8x-Pose",
|
|
86
|
-
),
|
|
87
|
-
)
|
|
88
|
-
model = YOLO(f"{yolov8_model.lower()}.pt") # Load the yolov8 model
|
|
89
|
-
class_names = list(model.names.values()) # Convert dictionary to list of class names
|
|
70
|
+
available_models = (x.replace("yolo", "YOLO") for x in GITHUB_ASSETS_STEMS if x.startswith("yolov8"))
|
|
71
|
+
selected_model = st.sidebar.selectbox("Model", available_models)
|
|
72
|
+
with st.spinner("Model is downloading..."):
|
|
73
|
+
model = YOLO(f"{selected_model.lower()}.pt") # Load the YOLO model
|
|
74
|
+
class_names = list(model.names.values()) # Convert dictionary to list of class names
|
|
75
|
+
st.success("Model loaded successfully!")
|
|
90
76
|
|
|
91
77
|
# Multiselect box with class names and get indices of selected classes
|
|
92
78
|
selected_classes = st.sidebar.multiselect("Classes", class_names, default=class_names[:3])
|
|
@@ -95,8 +81,9 @@ def inference():
|
|
|
95
81
|
if not isinstance(selected_ind, list): # Ensure selected_options is a list
|
|
96
82
|
selected_ind = list(selected_ind)
|
|
97
83
|
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
enable_trk = st.sidebar.radio("Enable Tracking", ("Yes", "No"))
|
|
85
|
+
conf = float(st.sidebar.slider("Confidence Threshold", 0.0, 1.0, 0.25, 0.01))
|
|
86
|
+
iou = float(st.sidebar.slider("IoU Threshold", 0.0, 1.0, 0.45, 0.01))
|
|
100
87
|
|
|
101
88
|
col1, col2 = st.columns(2)
|
|
102
89
|
org_frame = col1.empty()
|
|
@@ -124,7 +111,10 @@ def inference():
|
|
|
124
111
|
prev_time = curr_time
|
|
125
112
|
|
|
126
113
|
# Store model predictions
|
|
127
|
-
|
|
114
|
+
if enable_trk:
|
|
115
|
+
results = model.track(frame, conf=conf, iou=iou, classes=selected_ind, persist=True)
|
|
116
|
+
else:
|
|
117
|
+
results = model(frame, conf=conf, iou=iou, classes=selected_ind)
|
|
128
118
|
annotated_frame = results[0].plot() # Add annotations on frame
|
|
129
119
|
|
|
130
120
|
# display frame
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ultralytics
|
|
3
|
-
Version: 8.2.
|
|
3
|
+
Version: 8.2.56
|
|
4
4
|
Summary: Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
|
5
5
|
Author: Glenn Jocher, Ayush Chaurasia, Jing Qiu
|
|
6
6
|
Maintainer: Glenn Jocher, Ayush Chaurasia, Jing Qiu
|
|
@@ -7,7 +7,7 @@ tests/test_explorer.py,sha256=NcxSJeB6FxwkN09hQl7nnQL--HjfHB_WcZk0mEmBNHI,2215
|
|
|
7
7
|
tests/test_exports.py,sha256=Uezf3OatpPHlo5qoPw-2kqkZxuMCF9L4XF2riD4vmII,8225
|
|
8
8
|
tests/test_integrations.py,sha256=xglcfMPjfVh346PV8WTpk6tBxraCXEFJEQyyJMr5tyU,6064
|
|
9
9
|
tests/test_python.py,sha256=qhtSQ7NDfBChsVUxeSwfUIkoKq0S1Z-Rd9_MP023Y5k,21794
|
|
10
|
-
ultralytics/__init__.py,sha256=
|
|
10
|
+
ultralytics/__init__.py,sha256=vHGCfANVx6-O0kMZW2f7Cd3G8rscqy57ltGGnQ739zE,694
|
|
11
11
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
|
12
12
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
|
13
13
|
ultralytics/cfg/__init__.py,sha256=MqUsV-Mdk80dO64yY7JmplEO0Awb-25Lfx4YC9QYxhc,26210
|
|
@@ -181,7 +181,7 @@ ultralytics/solutions/object_counter.py,sha256=IR2kvgjlaHuzfq55gtwBiGFJ7dS5-5OCF
|
|
|
181
181
|
ultralytics/solutions/parking_management.py,sha256=Bd7FU3WZ8mRBWq81Z5c8jH5WloF4jPKo8TycqU_AcEI,9786
|
|
182
182
|
ultralytics/solutions/queue_management.py,sha256=ECm6gLZplmE9Cm-zdOazHBBDcW-vvr8nx2M28fcPbts,6787
|
|
183
183
|
ultralytics/solutions/speed_estimation.py,sha256=kjqMSHGTHMZaNgTKNKWULxnJQNsvhq4WMUphMVlBjsc,6768
|
|
184
|
-
ultralytics/solutions/streamlit_inference.py,sha256=
|
|
184
|
+
ultralytics/solutions/streamlit_inference.py,sha256=_IB4f9qHQPB39NrHUbNNj8vhx1HF7fiecRi0wfdXzPU,5412
|
|
185
185
|
ultralytics/trackers/__init__.py,sha256=j72IgH2dZHQArMPK4YwcV5ieIw94fYvlGdQjB9cOQKw,227
|
|
186
186
|
ultralytics/trackers/basetrack.py,sha256=-vBDD-Q9lsxfTMK2w9kuqWGrYbRMmaBCCEbGGyR53gE,3675
|
|
187
187
|
ultralytics/trackers/bot_sort.py,sha256=39AvhYVbT7izF3--rX_e6Lhgb5czTA23gw6AgnNcRds,8601
|
|
@@ -220,9 +220,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyz
|
|
|
220
220
|
ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
|
|
221
221
|
ultralytics/utils/callbacks/tensorboard.py,sha256=QEgOVhUqY9akOs5TJIwz1Rvn6l32xWLpOxlwEyWF0B8,4136
|
|
222
222
|
ultralytics/utils/callbacks/wb.py,sha256=9-fjQIdLjr3b73DTE3rHO171KvbH1VweJ-bmbv-rqTw,6747
|
|
223
|
-
ultralytics-8.2.
|
|
224
|
-
ultralytics-8.2.
|
|
225
|
-
ultralytics-8.2.
|
|
226
|
-
ultralytics-8.2.
|
|
227
|
-
ultralytics-8.2.
|
|
228
|
-
ultralytics-8.2.
|
|
223
|
+
ultralytics-8.2.56.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
224
|
+
ultralytics-8.2.56.dist-info/METADATA,sha256=Zx1owi5MQKMjgragH3MIvG0YK1-81WKa1vh6DuMRGo8,41217
|
|
225
|
+
ultralytics-8.2.56.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
|
226
|
+
ultralytics-8.2.56.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
227
|
+
ultralytics-8.2.56.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
228
|
+
ultralytics-8.2.56.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|