Live Inference with Streamlit Application using Ultralytics YOLO11
ΠΠ²Π΅Π΄Π΅Π½ΠΈΠ΅
Streamlit makes it simple to build and deploy interactive web applications. Combining this with Ultralytics YOLO11 allows for real-time object detection and analysis directly in your browser. YOLO11 high accuracy and speed ensure seamless performance for live video streams, making it ideal for applications in security, retail, and beyond.
Π‘ΠΌΠΎΡΡΠΈ: How to Use Streamlit with Ultralytics for Real-Time Computer Vision in Your Browser
ΠΠΊΠ²Π°ΠΊΡΠ»ΡΡΡΡΠ° | ΠΠΈΠ²ΠΎΡΠ½ΠΎΠ²ΠΎΠ΄ΡΡΠ²ΠΎ |
---|---|
Fish Detection using Ultralytics YOLO11 | Animals Detection using Ultralytics YOLO11 |
ΠΡΠ΅ΠΈΠΌΡΡΠ΅ΡΡΠ²Π° ΠΆΠΈΠ²ΠΎΠ³ΠΎ ΡΠΌΠΎΠ·Π°ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ
- Seamless Real-Time Object Detection: Streamlit combined with YOLO11 enables real-time object detection directly from your webcam feed. This allows for immediate analysis and insights, making it ideal for applications requiring instant feedback.
- Π£Π΄ΠΎΠ±Π½ΠΎΠ΅ ΡΠ°Π·Π²Π΅ΡΡΡΠ²Π°Π½ΠΈΠ΅: ΠΠ½ΡΠ΅ΡΠ°ΠΊΡΠΈΠ²Π½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ Streamlit ΠΏΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ Π»Π΅Π³ΠΊΠΎ ΡΠ°Π·Π²Π΅ΡΠ½ΡΡΡ ΠΈ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π±Π΅Π· ΠΎΠ±ΡΠΈΡΠ½ΡΡ ΡΠ΅Ρ Π½ΠΈΡΠ΅ΡΠΊΠΈΡ Π·Π½Π°Π½ΠΈΠΉ. ΠΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΠΈ ΠΌΠΎΠ³ΡΡ Π½Π°ΡΠ°ΡΡ ΠΆΠΈΠ²ΡΠ΅ ΡΠΌΠΎΠ·Π°ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΏΡΠΎΡΡΡΠΌ ΡΠ΅Π»ΡΠΊΠΎΠΌ ΠΌΡΡΠΈ, ΡΡΠΎ ΠΏΠΎΠ²ΡΡΠ°Π΅Ρ Π΄ΠΎΡΡΡΠΏΠ½ΠΎΡΡΡ ΠΈ ΡΠ΄ΠΎΠ±ΡΡΠ²ΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ.
- Efficient Resource Utilization: YOLO11 optimized algorithm ensure high-speed processing with minimal computational resources. This efficiency allows for smooth and reliable webcam inference even on standard hardware, making advanced computer vision accessible to a wider audience.
ΠΠΎΠ΄ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ Streamlit
Ultralytics Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°
ΠΡΠ΅ΠΆΠ΄Π΅ ΡΠ΅ΠΌ ΠΏΡΠΈΡΡΡΠΏΠΈΡΡ ΠΊ ΡΠ±ΠΎΡΠΊΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ, ΡΠ±Π΅Π΄ΠΈΡΡ, ΡΡΠΎ Ρ ΡΠ΅Π±Ρ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½ ΠΏΠ°ΠΊΠ΅Ρ Ultralytics Python . Π’Ρ ΠΌΠΎΠΆΠ΅ΡΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ Π΅Π³ΠΎ Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ pip install ultralytics
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Streamlit
This will launch the Streamlit application in your default web browser. You will see the main title, subtitle, and the sidebar with configuration options. Select your desired YOLO11 model, set the confidence and NMS thresholds, and click the "Start" button to begin the real-time object detection.
ΠΡΠΈ ΠΆΠ΅Π»Π°Π½ΠΈΠΈ ΡΡ ΠΌΠΎΠΆΠ΅ΡΡ ΡΠΊΠ°Π·Π°ΡΡ ΠΊΠΎΠ½ΠΊΡΠ΅ΡΠ½ΡΡ ΠΌΠΎΠ΄Π΅Π»Ρ Π½Π° ΡΠ°ΠΉΡΠ΅ Python:
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Streamlit Ρ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΡΠΊΠΎΠΉ ΠΌΠΎΠ΄Π΅Π»ΡΡ
ΠΠ°ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅
By following this guide, you have successfully created a real-time object detection application using Streamlit and Ultralytics YOLO11. This application allows you to experience the power of YOLO11 in detecting objects through your webcam, with a user-friendly interface and the ability to stop the video stream at any time.
ΠΠ»Ρ Π΄Π°Π»ΡΠ½Π΅ΠΉΡΠ΅Π³ΠΎ ΡΠΎΠ²Π΅ΡΡΠ΅Π½ΡΡΠ²ΠΎΠ²Π°Π½ΠΈΡ ΡΡ ΠΌΠΎΠΆΠ΅ΡΡ ΠΈΠ·ΡΡΠΈΡΡ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΡ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΡ ΡΡΠ½ΠΊΡΠΈΠΉ, ΡΠ°ΠΊΠΈΡ ΠΊΠ°ΠΊ Π·Π°ΠΏΠΈΡΡ Π²ΠΈΠ΄Π΅ΠΎΠΏΠΎΡΠΎΠΊΠ°, ΡΠΎΡ ΡΠ°Π½Π΅Π½ΠΈΠ΅ Π°Π½Π½ΠΎΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ ΠΊΠ°Π΄ΡΠΎΠ² ΠΈΠ»ΠΈ ΠΈΠ½ΡΠ΅Π³ΡΠ°ΡΠΈΡ Ρ Π΄ΡΡΠ³ΠΈΠΌΠΈ Π±ΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ°ΠΌΠΈ ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ½ΠΎΠ³ΠΎ Π·ΡΠ΅Π½ΠΈΡ.
ΠΠΎΠ΄Π΅Π»ΠΈΡΠ΅ΡΡ ΡΠ²ΠΎΠΈΠΌΠΈ ΠΌΡΡΠ»ΡΠΌΠΈ Ρ ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²ΠΎΠΌ
ΠΠ·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡΠ²ΡΠΉ Ρ ΡΠΎΠΎΠ±ΡΠ΅ΡΡΠ²ΠΎΠΌ, ΡΡΠΎΠ±Ρ ΡΠ·Π½Π°ΡΡ Π±ΠΎΠ»ΡΡΠ΅, ΡΡΡΡΠ°Π½ΠΈΡΡ Π½Π΅ΠΏΠΎΠ»Π°Π΄ΠΊΠΈ ΠΈ ΠΏΠΎΠ΄Π΅Π»ΠΈΡΡΡΡ ΡΠ²ΠΎΠΈΠΌΠΈ ΠΏΡΠΎΠ΅ΠΊΡΠ°ΠΌΠΈ:
ΠΠ΄Π΅ ΠΏΠΎΠ»ΡΡΠΈΡΡ ΠΏΠΎΠΌΠΎΡΡ ΠΈ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΡ
- GitHub Issues: ΠΠΎΡΠ΅ΡΠΈ ΡΠ΅ΠΏΠΎΠ·ΠΈΡΠΎΡΠΈΠΉUltralytics Π½Π° GitHub, ΡΡΠΎΠ±Ρ Π·Π°Π΄Π°ΡΡ Π²ΠΎΠΏΡΠΎΡΡ, ΡΠΎΠΎΠ±ΡΠΈΡΡ ΠΎΠ± ΠΎΡΠΈΠ±ΠΊΠ°Ρ ΠΈ ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠΈΡΡ ΡΠ²ΠΎΠΈ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΠΈ.
- Ultralytics Π‘Π΅ΡΠ²Π΅Ρ Discord: ΠΡΠΈΡΠΎΠ΅Π΄ΠΈΠ½ΡΠΉΡΡ ΠΊ ΡΠ΅ΡΠ²Π΅ΡΡUltralytics Discord, ΡΡΠΎΠ±Ρ ΠΎΠ±ΡΠ°ΡΡΡΡ Ρ Π΄ΡΡΠ³ΠΈΠΌΠΈ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»ΡΠΌΠΈ ΠΈ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ°ΠΌΠΈ, ΠΏΠΎΠ»ΡΡΠ°ΡΡ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΡ, Π΄Π΅Π»ΠΈΡΡΡΡ Π·Π½Π°Π½ΠΈΡΠΌΠΈ ΠΈ ΠΎΠ±ΠΌΠ΅Π½ΠΈΠ²Π°ΡΡΡΡ ΠΈΠ΄Π΅ΡΠΌΠΈ.
ΠΡΠΈΡΠΈΠ°Π»ΡΠ½Π°Ρ Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡ
- Ultralytics YOLO11 Documentation: Refer to the official YOLO11 documentation for comprehensive guides and insights on various computer vision tasks and projects.
ΠΠΠΠ ΠΠ‘Π« Π ΠΠ’ΠΠΠ’Π«
How can I set up a real-time object detection application using Streamlit and Ultralytics YOLO11?
Setting up a real-time object detection application with Streamlit and Ultralytics YOLO11 is straightforward. First, ensure you have the Ultralytics Python package installed using:
ΠΠ°ΡΠ΅ΠΌ ΡΡ ΠΌΠΎΠΆΠ΅ΡΡ ΡΠΎΠ·Π΄Π°ΡΡ Π±Π°Π·ΠΎΠ²ΠΎΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Streamlit, ΡΡΠΎΠ±Ρ Π·Π°ΠΏΡΡΠΊΠ°ΡΡ ΠΆΠΈΠ²ΡΠ΅ ΡΠΌΠΎΠ·Π°ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ:
ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Streamlit
ΠΠΎΠ»Π΅Π΅ ΠΏΠΎΠ΄ΡΠΎΠ±Π½ΠΎ ΠΎ ΠΏΡΠ°ΠΊΡΠΈΡΠ΅ΡΠΊΠΎΠΉ Π½Π°ΡΡΡΠΎΠΉΠΊΠ΅ ΡΠΈΡΠ°ΠΉ Π² ΡΠ°Π·Π΄Π΅Π»Π΅ Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΠΈ Streamlit Application Code.
What are the main advantages of using Ultralytics YOLO11 with Streamlit for real-time object detection?
Using Ultralytics YOLO11 with Streamlit for real-time object detection offers several advantages:
- Seamless Real-Time Detection: Achieve high-accuracy, real-time object detection directly from webcam feeds.
- Π£Π΄ΠΎΠ±Π½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ: ΠΠ½ΡΡΠΈΡΠΈΠ²Π½ΠΎ ΠΏΠΎΠ½ΡΡΠ½ΡΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ Streamlit ΠΏΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ Π»Π΅Π³ΠΊΠΎ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ ΠΈ ΡΠ°Π·Π²Π΅ΡΡΡΠ²Π°ΡΡ ΡΠΈΡΡΠ΅ΠΌΡ Π±Π΅Π· ΠΎΠ±ΡΠΈΡΠ½ΡΡ ΡΠ΅Ρ Π½ΠΈΡΠ΅ΡΠΊΠΈΡ Π·Π½Π°Π½ΠΈΠΉ.
- Resource Efficiency: YOLO11's optimized algorithms ensure high-speed processing with minimal computational resources.
Π£Π·Π½Π°ΠΉ Π±ΠΎΠ»ΡΡΠ΅ ΠΎΠ± ΡΡΠΈΡ ΠΏΡΠ΅ΠΈΠΌΡΡΠ΅ΡΡΠ²Π°Ρ Π·Π΄Π΅ΡΡ.
ΠΠ°ΠΊ ΡΠ°Π·Π²Π΅ΡΠ½ΡΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π΄Π»Ρ ΠΎΠ±Π½Π°ΡΡΠΆΠ΅Π½ΠΈΡ ΠΎΠ±ΡΠ΅ΠΊΡΠΎΠ² Streamlit Π² Π²Π΅Π±-Π±ΡΠ°ΡΠ·Π΅ΡΠ΅?
After coding your Streamlit application integrating Ultralytics YOLO11, you can deploy it by running:
This command will launch the application in your default web browser, enabling you to select YOLO11 models, set confidence, and NMS thresholds, and start real-time object detection with a simple click. For a detailed guide, refer to the Streamlit Application Code section.
What are some use cases for real-time object detection using Streamlit and Ultralytics YOLO11?
Real-time object detection using Streamlit and Ultralytics YOLO11 can be applied in various sectors:
- ΠΠ΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΡ: ΠΠΎΠ½ΠΈΡΠΎΡΠΈΠ½Π³ Π² ΡΠ΅Π°Π»ΡΠ½ΠΎΠΌ Π²ΡΠ΅ΠΌΠ΅Π½ΠΈ Π½Π° ΠΏΡΠ΅Π΄ΠΌΠ΅Ρ Π½Π΅ΡΠ°Π½ΠΊΡΠΈΠΎΠ½ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ Π΄ΠΎΡΡΡΠΏΠ°.
- Π ΠΎΠ·Π½ΠΈΡΠ½Π°Ρ ΡΠΎΡΠ³ΠΎΠ²Π»Ρ: ΠΠΎΠ΄ΡΡΠ΅Ρ ΠΏΠΎΠΊΡΠΏΠ°ΡΠ΅Π»Π΅ΠΉ, ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΠΎΠ»ΠΊΠ°ΠΌΠΈ ΠΈ ΠΌΠ½ΠΎΠ³ΠΎΠ΅ Π΄ΡΡΠ³ΠΎΠ΅.
- ΠΠΈΠΊΠ°Ρ ΠΏΡΠΈΡΠΎΠ΄Π° ΠΈ ΡΠ΅Π»ΡΡΠΊΠΎΠ΅ Ρ ΠΎΠ·ΡΠΉΡΡΠ²ΠΎ: Π‘Π»Π΅Π΄ΠΈ Π·Π° ΡΠΎΡΡΠΎΡΠ½ΠΈΠ΅ΠΌ ΠΆΠΈΠ²ΠΎΡΠ½ΡΡ ΠΈ ΡΠ΅Π»ΡΡΠΊΠΎΡ ΠΎΠ·ΡΠΉΡΡΠ²Π΅Π½Π½ΡΡ ΠΊΡΠ»ΡΡΡΡ.
Π§ΡΠΎΠ±Ρ ΡΠ·Π½Π°ΡΡ Π±ΠΎΠ»ΡΡΠ΅ ΠΏΠΎΠ΄ΡΠΎΠ±Π½ΡΡ ΠΏΡΠΈΠΌΠ΅ΡΠΎΠ² ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ, ΠΈΠ·ΡΡΠΈ Ultralytics Solutions.
How does Ultralytics YOLO11 compare to other object detection models like YOLOv5 and RCNNs?
Ultralytics YOLO11 provides several enhancements over prior models like YOLOv5 and RCNNs:
- ΠΠΎΠ»Π΅Π΅ Π²ΡΡΠΎΠΊΠ°Ρ ΡΠΊΠΎΡΠΎΡΡΡ ΠΈ ΡΠΎΡΠ½ΠΎΡΡΡ: ΡΠ»ΡΡΡΠ΅Π½Π½Π°Ρ ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎΡΡΡ Π΄Π»Ρ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ, ΡΠ°Π±ΠΎΡΠ°ΡΡΠΈΡ Π² ΡΠ΅ΠΆΠΈΠΌΠ΅ ΡΠ΅Π°Π»ΡΠ½ΠΎΠ³ΠΎ Π²ΡΠ΅ΠΌΠ΅Π½ΠΈ.
- ΠΡΠΎΡΡΠΎΡΠ° ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ: ΡΠΏΡΠΎΡΠ΅Π½Π½ΡΠ΅ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΡ ΠΈ ΡΠ°Π·Π²Π΅ΡΡΡΠ²Π°Π½ΠΈΠ΅.
- ΠΡΡΠ΅ΠΊΡΠΈΠ²Π½ΠΎΡΡΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ ΡΠ΅ΡΡΡΡΠΎΠ²: ΠΠΏΡΠΈΠΌΠΈΠ·ΠΈΡΠΎΠ²Π°Π½ Π΄Π»Ρ Π»ΡΡΡΠ΅ΠΉ ΡΠΊΠΎΡΠΎΡΡΠΈ ΠΏΡΠΈ ΠΌΠΈΠ½ΠΈΠΌΠ°Π»ΡΠ½ΡΡ Π²ΡΡΠΈΡΠ»ΠΈΡΠ΅Π»ΡΠ½ΡΡ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡΡ .
For a comprehensive comparison, check Ultralytics YOLO11 Documentation and related blog posts discussing model performance.