Explaining The Code - YOLO RTSP Security Cam Python App

Поділитися
Вставка
  • Опубліковано 10 лис 2024

КОМЕНТАРІ • 21

  • @PhazerTech
    @PhazerTech  8 місяців тому

    If you have any questions about the code or how it works then feel free to drop a comment.
    BTW I misspoke when explaining the Gaussian Blur. The reason why it's used is to reduce noise and give more consistent results.
    Also I recently modified the receive_frames function so that the program can handle disconnected cameras. Up until now the program would halt if your camera disconnects, requiring you to restart the program. But now after this update, if the camera disconnects then the program will print a message indicating this and it will automatically try to reconnect every 5 seconds.

  • @harshitagupta9876
    @harshitagupta9876 4 місяці тому +1

    Hey, this code is amazing. But I am using an rtsp endpoint to do object detection. There is 30 seconds of latency during the process. How I can reduce this? Your support will be helpful. Thanks.

    • @PhazerTech
      @PhazerTech  4 місяці тому

      Thanks! The latency will depend on your camera source. It might be possible to reduce the latency in your setup but I don't know the details of what you're using. I used MediaMTX with a Raspberry Pi to make my RTSP stream and latency is around 1 second or less.

    • @harshitagupta9876
      @harshitagupta9876 4 місяці тому

      @@PhazerTech can you please share configuration for your camera and raspberry pi device. Also, did you run your code on linux machine or windows and with gpu?

    • @PhazerTech
      @PhazerTech  4 місяці тому

      @@harshitagupta9876 I made a guide showing how to do it: phazertech.com/tutorials/rtsp.html
      I ran my code on a Linux machine with GPU but it should probably work on Windows with an Nvidia GPU.

  • @codelinx
    @codelinx 8 місяців тому +1

    Great concept and info

    • @PhazerTech
      @PhazerTech  8 місяців тому

      Thanks, glad to hear it was helpful

  • @NetNeelsie
    @NetNeelsie 8 місяців тому +1

    On linux... What do you use to write code? Is there something other then vs code to use?

    • @PhazerTech
      @PhazerTech  8 місяців тому +1

      You can use a simple text editor, any of them should work. To run the program you would start it inside a terminal window. In this video I used Kate which is the default editor that comes with KDE desktop.

    • @NetNeelsie
      @NetNeelsie 8 місяців тому +1

      @@PhazerTech Alright. Thank you.

  • @ngomapa
    @ngomapa 4 місяці тому +1

    OMGGGG you are a God sent brother
    I was working on something like this but you have saved me a lot of time.
    Please how can we get this to work with multiple camera at the same time?

    • @PhazerTech
      @PhazerTech  4 місяці тому +1

      Hey that's great to hear man! Glad you found it useful. For multiple cameras you can run multiple instances of the program. Just create a separate folder with a copy of the program for each camera. It might not be the most memory efficient way to do it but this way it guarantees each copy will run as a separate process for better CPU utilization with multiple cores.

    • @ngomapa
      @ngomapa 4 місяці тому

      @@PhazerTech thanks very much

    • @ngomapa
      @ngomapa 4 місяці тому

      @@PhazerTech I have also noticed a whole 2 minutes of latency, do you have an idea what could be the problem?

    • @PhazerTech
      @PhazerTech  4 місяці тому

      @@ngomapa It's probably something to do with your camera's configuration. I set up my RTSP cameras using a Raspberry Pi and latency is only around 1 second. Here's the guide showing how I did it: phazertech.com/tutorials/rtsp.html

    • @ngomapa
      @ngomapa 4 місяці тому

      @@PhazerTech when I stream from my phone camera app, I have a real time footage or maybe just one second.
      I suspect the queue you included in the code to hold each frame from the streaming source. That will mean for frames that came late, the code will be stock waiting to process them.
      I will try to see if I can skip frames that came late. Even though this shouldn't be giving me a 1minute 33 seconds delay between the Camera and the code

  • @roihanmajid5852
    @roihanmajid5852 Місяць тому

    what ip cam that we can use for this?

    • @PhazerTech
      @PhazerTech  Місяць тому

      Any IP cam that supports the RTSP protocol should work. Alternatively you can also use a webcam with a PC or Raspberry Pi to setup an RTSP stream by following my guide I made: phazertech.com/tutorials/rtsp.html