Saltar al contenido

Live Inference with Streamlit Application using Ultralytics YOLO11

Introducci贸n

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.



Observa: How to Use Streamlit with Ultralytics for Real-Time Computer Vision in Your Browser

AcuiculturaCr铆a de animales
Fish Detection using Ultralytics YOLO11Animals Detection using Ultralytics YOLO11
Fish Detection using Ultralytics YOLO11Animals Detection using Ultralytics YOLO11

Ventajas de la Inferencia en Directo

  • 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.
  • Despliegue f谩cil de usar: La interfaz interactiva de Streamlit facilita la implantaci贸n y el uso de la aplicaci贸n sin grandes conocimientos t茅cnicos. Los usuarios pueden iniciar la inferencia en directo con un simple clic, lo que mejora la accesibilidad y la usabilidad.
  • 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.

C贸digo de aplicaci贸n Streamlit

Ultralytics Instalaci贸n

Antes de empezar a construir la aplicaci贸n, aseg煤rate de que tienes instalado el paquete Ultralytics Python . Puedes instalarlo utilizando el comando pip install ultralytics

Aplicaci贸n Streamlit

from ultralytics import solutions

solutions.inference()

### Make sure to run the file using command `streamlit run <file-name.py>`
yolo streamlit-predict

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.

Puedes indicar opcionalmente un modelo concreto en Python:

Aplicaci贸n Streamlit con un modelo personalizado

from ultralytics import solutions

# Pass a model as an argument
solutions.inference(model="path/to/model.pt")

### Make sure to run the file using command `streamlit run <file-name.py>`

Conclusi贸n

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.

Para otras mejoras, puedes explorar la posibilidad de a帽adir m谩s funciones, como grabar el flujo de v铆deo, guardar los fotogramas anotados o integrarte con otras bibliotecas de visi贸n por ordenador.

Comparte tus pensamientos con la comunidad

Participa en la comunidad para aprender m谩s, solucionar problemas y compartir tus proyectos:

D贸nde encontrar ayuda y apoyo

Documentaci贸n oficial

  • Ultralytics YOLO11 Documentation: Refer to the official YOLO11 documentation for comprehensive guides and insights on various computer vision tasks and projects.

PREGUNTAS FRECUENTES

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:

pip install ultralytics

A continuaci贸n, puedes crear una aplicaci贸n Streamlit b谩sica para ejecutar la inferencia en directo:

Aplicaci贸n Streamlit

from ultralytics import solutions

solutions.inference()

### Make sure to run the file using command `streamlit run <file-name.py>`
yolo streamlit-predict

Para m谩s detalles sobre la configuraci贸n pr谩ctica, consulta la secci贸n C贸digo de aplicaci贸n Streamlit de la documentaci贸n.

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.
  • Interfaz f谩cil de usar: La interfaz intuitiva de Streamlit permite un uso y despliegue sencillos sin necesidad de grandes conocimientos t茅cnicos.
  • Resource Efficiency: YOLO11's optimized algorithms ensure high-speed processing with minimal computational resources.

Descubre m谩s sobre estas ventajas aqu铆.

驴C贸mo despliego una aplicaci贸n de detecci贸n de objetos Streamlit en mi navegador web?

After coding your Streamlit application integrating Ultralytics YOLO11, you can deploy it by running:

streamlit run <file-name.py>

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:

  • Seguridad: Supervisi贸n en tiempo real para detectar accesos no autorizados.
  • Comercio minorista: Recuento de clientes, gesti贸n de estanter铆as y mucho m谩s.
  • Vida salvaje y agricultura: Control de los animales y de las condiciones de los cultivos.

Para conocer casos de uso y ejemplos m谩s detallados, explora Ultralytics Soluciones.

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:

  • Mayor velocidad y precisi贸n: rendimiento mejorado para aplicaciones en tiempo real.
  • Facilidad de uso: Interfaces y despliegue simplificados.
  • Eficiencia de recursos: Optimizado para mejorar la velocidad con requisitos computacionales m铆nimos.

For a comprehensive comparison, check Ultralytics YOLO11 Documentation and related blog posts discussing model performance.

馃搮 Created 3 months ago 鉁忥笍 Updated 22 days ago

Comentarios