ultralytics 8.2.50 new Streamlit live inference Solution (#14210)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Muhammad Rizwan Munawar <muhammadrizwanmunawar123@gmail.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: RizwanMunawar <chr043416@gmail.com> Co-authored-by: Kayzwer <68285002+Kayzwer@users.noreply.github.com>
This commit is contained in:
parent
5f0fd710a4
commit
26a664f636
20 changed files with 350 additions and 22 deletions
|
|
@ -78,10 +78,13 @@ CLI_HELP_MSG = f"""
|
|||
4. Export a YOLOv8n classification model to ONNX format at image size 224 by 128 (no TASK required)
|
||||
yolo export model=yolov8n-cls.pt format=onnx imgsz=224,128
|
||||
|
||||
6. Explore your datasets using semantic search and SQL with a simple GUI powered by Ultralytics Explorer API
|
||||
5. Explore your datasets using semantic search and SQL with a simple GUI powered by Ultralytics Explorer API
|
||||
yolo explorer
|
||||
|
||||
5. Run special commands:
|
||||
|
||||
6. Streamlit real-time object detection on your webcam with Ultralytics YOLOv8
|
||||
yolo streamlit-predict
|
||||
|
||||
7. Run special commands:
|
||||
yolo help
|
||||
yolo checks
|
||||
yolo version
|
||||
|
|
@ -514,6 +517,13 @@ def handle_explorer():
|
|||
subprocess.run(["streamlit", "run", ROOT / "data/explorer/gui/dash.py", "--server.maxMessageSize", "2048"])
|
||||
|
||||
|
||||
def handle_streamlit_inference():
|
||||
"""Open the Ultralytics Live Inference streamlit app for real time object detection."""
|
||||
checks.check_requirements(["streamlit", "opencv-python", "torch"])
|
||||
LOGGER.info("💡 Loading Ultralytics Live Inference app...")
|
||||
subprocess.run(["streamlit", "run", ROOT / "solutions/streamlit_inference.py", "--server.headless", "true"])
|
||||
|
||||
|
||||
def parse_key_value_pair(pair):
|
||||
"""Parse one 'key=value' pair and return key and value."""
|
||||
k, v = pair.split("=", 1) # split on first '=' sign
|
||||
|
|
@ -582,6 +592,7 @@ def entrypoint(debug=""):
|
|||
"login": lambda: handle_yolo_hub(args),
|
||||
"copy-cfg": copy_default_cfg,
|
||||
"explorer": lambda: handle_explorer(),
|
||||
"streamlit-predict": lambda: handle_streamlit_inference(),
|
||||
}
|
||||
full_args_dict = {**DEFAULT_CFG_DICT, **{k: None for k in TASKS}, **{k: None for k in MODES}, **special}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue