GithubHelp home page GithubHelp logo

Comments (7)

REZIZ-TER avatar REZIZ-TER commented on June 18, 2024
2024-05-09.03-57-54.mp4

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 18, 2024

@REZIZ-TER hello!

It looks like your message might be missing a proper link or context for your query. Could you please repost the correct link or provide additional information about your issue?

Thank you! Looking forward to helping you!

from ultralytics.

REZIZ-TER avatar REZIZ-TER commented on June 18, 2024

Hello @glenn-jocher, thanks for your reply.
The purpose of my work is to receive images from an IP camera using an RTSP URL and use them for object detection using YOLOv8. The problem I encountered was the image frames displayed by the command. cv2.imshow("yolov8", frame_resize) has a longer than realistic lag of 20-30 seconds. For example, I held up my finger at the time 10:35 minutes 20 seconds It was 10:35 minutes and 50 seconds before the picture of me holding up my finger appeared. or more which when I use this link rtsp://admin:[email protected]:554/Streaming/Channels/101
Watching the stream via VLC media player has a relatively small lag of 3-5 seconds, which is an acceptable time for me.

from ultralytics.

shaimaahamam avatar shaimaahamam commented on June 18, 2024

I have the same problem and I don't know why !

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 18, 2024

Hello,

It sounds like you're experiencing a streaming delay when using YOLOv8 with RTSP feeds. This delay is typically related to the buffering settings in your video capture pipeline. You can try reducing the buffer size in OpenCV to decrease the latency. Here's an example:

cap = cv2.VideoCapture(rtsp_url)
cap.set(cv2.CAP_PROP_BUFFERSIZE, 2)  # Set a small buffer size

Ensure your system and network are optimized for real-time streaming as well. If the issue persists, please share more details about your setup and any specific configurations you're using. That way, we can help diagnose the problem more effectively! 😊

from ultralytics.

WojciechowskiMarek avatar WojciechowskiMarek commented on June 18, 2024

I was dealing same problem by using videocapture from cv2. My yolov8 detection sometimes takes long time and almost freeze. In meanwhile buffer is growing and it is not to use solution. For me important is to catch last frame (cleared buffer) and send it to detection (registration plates detection). I used solution with queue presented here:
https://stackoverflow.com/questions/54460797/how-to-disable-buffer-in-opencv-camera
You can read just frame from stream 😁

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 18, 2024

Hello @WojciechowskiMarek,

Thank you for sharing your experience and the solution you found! Using a queue to handle the frames and ensure you're processing the latest one is a great approach to mitigate the buffering issue. This can indeed help in maintaining real-time performance for tasks like registration plate detection. 😊

If anyone else is facing similar issues, implementing a queue to manage the frames can be a very effective solution. Thanks again for contributing to the discussion!

from ultralytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.