Dwell Time Analysis with Computer Vision | Real-Time Stream Processing

Поділитися
Вставка
  • Опубліковано 9 чер 2024
  • Learn how to use computer vision to analyze wait times and optimize processes. This tutorial covers object detection, tracking, and calculating time spent in designated zones. Use these techniques to improve customer experience in retail, traffic management, or other scenarios.
    Chapters:
    - 00:00 Intro
    - 00:41 Static File Processing vs. Stream Processing: Time Calculation Explained
    - 04:29 Time Calculation Methods: FPS vs. ClockTime
    - 06:54 Project Setup
    - 08:39 Object Detection and Tracking
    - 12:57 Defining Zones: How to Filter Objects
    - 16:33 Measuring Time
    - 17:44 Why Naive Stream Processing Fails
    - 21:02 Efficient Stream Processing
    - 24:19 Important Considerations
    - 26:07 Outro
    Resources:
    - Roboflow: roboflow.com
    - 🔴 Community Session April 11 2024 at 08:00 AM PST / 11:00 AM EST / 05:00 PM CET: • Dwell Time Analysis | ...
    - ⭐ Inference GitHub: github.com/roboflow/inference
    - ⭐ Supervision GitHub: github.com/roboflow/supervision
    - 💻 Time in Zone Code: github.com/roboflow/supervisi...
    - 🌇 MS COCO Dataset on Roboflow Universe: universe.roboflow.com/microso...
    - 📙Detect and Annotate Supervision Guide: supervision.roboflow.com/deve...
    - 🎬 Source Checkouts Video: • HD-SDI 1080P Hi Defini...
    - 🎬 Source Traffic Video: • 4K Road traffic video ...
    Stay updated with the projects I'm working on at github.com/roboflow and github.com/SkalskiP! ⭐
  • Наука та технологія

КОМЕНТАРІ • 76

  • @tobieabel7474
    @tobieabel7474 2 місяці тому +3

    Another great tutorial. I'm glad you've covered the issues of latency and frames accumulating in the buffer causing crashes, I've been having trouble with that when trying to run CV applications for long periods.

    • @Roboflow
      @Roboflow  2 місяці тому +2

      I’m curious why so few tutorials cover this topic in depth

  • @tomii5644
    @tomii5644 2 місяці тому +3

    The system is amazing, thanks a lot for the tutorial :)

  • @RamphyRojas
    @RamphyRojas Місяць тому +1

    amazing tutorial, thank you for your time!

  • @thomasboosinger2758
    @thomasboosinger2758 2 місяці тому +2

    Amazing video! Thanks!

  • @JohnnyThomas-py3jv
    @JohnnyThomas-py3jv 2 місяці тому +2

    Your channel calms me

    • @Roboflow
      @Roboflow  2 місяці тому +1

      Not really sure what you mean :/

  • @deep_singh01
    @deep_singh01 2 місяці тому +1

    Amazing tutorial it help to us 👍

  • @EliSpizzichino
    @EliSpizzichino 2 місяці тому +1

    More content like this congrats!

    • @Roboflow
      @Roboflow  2 місяці тому

      We are not slowing down ;)

  • @shahinamini7047
    @shahinamini7047 2 місяці тому +1

    It is my thesis
    Thanks you so much

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

    Great Video as always!
    How did you create the intro explanation on white board with the text and diagrams?

  • @Mesenqe
    @Mesenqe 2 місяці тому +1

    Thank you for the great Tutorial. I always enjoy your tutorials. If you have time, I wish you could make tutorial of Camera Calibration 💙.

    • @Roboflow
      @Roboflow  2 місяці тому +1

      I can’t add it to our TODO list but it is really long… we already have ideas for at least 5 videos.

  • @prithaa442
    @prithaa442 2 місяці тому +1

    Superb sir

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

    Thank you for this amazing tutorial, i just have a problem I'm working with project that detect and tracking people but in my model when people change thier position the model record it's another track so how i can enhance it

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

    Hi, thanks for the really great and easy to understand tutorial. Here, you implemented a clock based timer approach to calculate elapsed time from a real time stream. I am assuming that similar approach can be used to estimate the speed of an object (like car) from a real time stream as well. Is it correct? Would appreciate your valuable feedback.

  •  2 місяці тому +1

    Great video. What happen when the frames dropping are s?

    • @Roboflow
      @Roboflow  2 місяці тому

      That’s a very good question. It is guaranteed that you will not drop s because of InferencePipeline logic. You may still drop it because of internet connection. But not because of InferencePipeline. We tested the logic on Jetson Nano decoding 4K stream and it worked really reliably.

  • @tiktak132
    @tiktak132 2 місяці тому +1

    Where does the processed video get saved? also seems to be running really slow on the detection running a m1 mac. Great tutorial!

    • @Roboflow
      @Roboflow  2 місяці тому

      In the repository you can find set it scripts that use ultralytics. It uses PyTorch as backend, and can use mps device accessible on M1 macs.

  • @nestorjavierhurtado
    @nestorjavierhurtado 25 днів тому

    Se puede ejecutar en una jetson nano de 4GB?

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

    Which architecture is used internalliy in
    Roboflow 3.0 Object Detection (Fast)????

  • @_ABDULGHANI
    @_ABDULGHANI 2 місяці тому +1

    Thank you for this amazing tutorial, can I use these examples with other versions of YOLO algorithm like v7 or v6, or does this work on YOLOv8 only?

    • @Roboflow
      @Roboflow  2 місяці тому

      You can swap the model. No problem.

    • @_ABDULGHANI
      @_ABDULGHANI 2 місяці тому +1

      @@Roboflow OK, thank you I thought this is exclusive for the Ultralytics models only, I have already created a custom YOLOv7 & 6 model and I will use them with supervision.

    • @Roboflow
      @Roboflow  Місяць тому +1

      Can you run your YOLOv7 as stand alone model or do you have to use detect.py script?

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

      @@Roboflow I have used detect.py, but now I am working on a code to load my model and detect object, in case I want to implement anything with my model it will be easy for me to use my code.

  • @SamuelKwok-ge3iw
    @SamuelKwok-ge3iw Місяць тому

    Hi Do you know how to generate the config.json file required by
    --zone_configuration_path "data/checkout/config.json" . Thanks

  • @ItayHilel
    @ItayHilel 2 місяці тому +2

    @Roboflow, what was done in the video is great! I loved it!!! . But it's a workaround; you took a video and turned it into an RTSP link. However, there are many challenges that occur when pulling footage from a stream.
    I would love to see that part done as well. Let's say you get permission for a few cameras from an office/gym or elsewhere and do an example project. It would be fascinating to see the process of pulling footage from these cameras, training a model, thinking of a use case that solves a real-world problem, coding it, and finally giving the result to the client (showing us thats the average time of a customer in checkout 6 is 50 sec on a given day) .
    Currently, most CV i see is done on 15-second videos and from one camera, and there isn't much value in that. real value is in solving real problems with multiple cameras models/logic that works together.
    I'm aware that what I'm talking about is a huge project and not an easy task, but if anyone can do it, it's @Roboflow and Piotr.
    I believe that a tutorial/series like I'm imagining would open the door for millions of CV applications to be built in the future.

    • @tobieabel7474
      @tobieabel7474 2 місяці тому +2

      Thats exactly what we're doing at the moment for a soccer stadium in UK, taking multiple streams from the CCTV and measuring the average wait time at some turnstiles and food/drink stalls. If the Proof of Concept is successful we will also use CV to monitor occupancy and highlight spare seats in the stadium on a floorplan. Roboflow and Supervision are really useful tools for us!

    • @ItayHilel
      @ItayHilel 2 місяці тому +1

      @@tobieabel7474 can you share your journey? i would love to read a blog or watch a video

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

      Great to know that the time spent creating these tools and tutorials is not wasted! I would love to learn more if possible!

    • @Roboflow
      @Roboflow  Місяць тому +1

      Today we are hosting a live community session. We will be talking mostly about real-time stream processing and time calculation. Would be awesome if you could join!

    • @tobieabel7474
      @tobieabel7474 Місяць тому +2

      Maybe​@@Roboflow can sponsor me to do a blog of the journey and put it on your channel! Sure, I'll be at the community session today

  • @lukewinters7981
    @lukewinters7981 13 днів тому

    Is there a simple way to save class detections in real time to an updating excel file or something similar? i.e. a continuous record of timestamps, with each timestamp containing the object detections, the zone it was detected in and/or bounding box positions/conf at that time, and this information is real-time updating an excel file?

  • @shahinamini7047
    @shahinamini7047 26 днів тому

    hi!
    why i can't open it in google colab?

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

    i am not able to use the cuda/gpu support to the code. i tried by using code: model.to('cuda') but getting error. can someone help me on how to implement cuda to the above code. please

  • @user-le2wj1cv2r
    @user-le2wj1cv2r 13 днів тому

    I can't find link for the code you wrote

  • @user-kg5gs8of6w
    @user-kg5gs8of6w 2 дні тому +1

    Can we proceed with the vehicle speed estimation in real-time, which is a whole project?

    • @Roboflow
      @Roboflow  День тому

      You men you want us to make a video about it? :)

  • @hamzamohammad7138
    @hamzamohammad7138 2 місяці тому +1

    @Roboflow Wow this is great content so much exposure to unleash YOLO features. im working on a realtime project which is taking in about 10 stream feeds and has 6 different yolo models(Yolov8) with different usecases. i have currently applied threading on the usecases but im confused how can i feed in 10 streams parallel. im looking for suggestions from on prem deployment point of view as well

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

      Today we are hosting a live community session. It would be so cool if you could join. ua-cam.com/video/u7XUC-3TqY8/v-deo.html&ab_channel=Roboflow

  • @SebastianVargas-yj7dh
    @SebastianVargas-yj7dh 2 місяці тому +1

    Is ther any way i can set my model project to run with my gpu? currently it only runs over the processor

    • @Roboflow
      @Roboflow  2 місяці тому +1

      Install inference-gpu package instead of inference. It will allow you to run faster on NVIDIA GPUs.

  • @PlottingMath
    @PlottingMath 2 дні тому +1

    is there a way to process high resolution stream in realtime to detect / track small objects in the stream?
    I have tried SAHI, but its not possible to run in real time if the images are 5000x576.

    • @Roboflow
      @Roboflow  День тому

      It will always be a tradeoff between speed and accuracy. You have two options - increase inference resolution(imgsz parameter in YOLOv8) or use SAHI. Both will increase accuracy but decrease speed.

  • @SyBacVo
    @SyBacVo 2 місяці тому

    Great video for show, but the processing time is quite slow even if with ultralytics :( Is there any way to speed up the processing time without using GPU ? Thanks in advance!!! You guys are doing a great work in a great direction.

    • @Roboflow
      @Roboflow  2 місяці тому

      What hardware you have and how fast would you like to run?

    • @SyBacVo
      @SyBacVo 2 місяці тому +1

      @@Roboflow Processor: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz 3.20 GHz; RAM: 8.00 GB (7.87 GB usable); 24 fps (real time speed) is enough for me.

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

      If you don't have a GPU, perhaps you could use a smaller model? Eventually run object detection through OpenVINO - Intel hardware model accelerator. We could talk about it deeper during live community session today. It would be so cool if you could join. ua-cam.com/video/u7XUC-3TqY8/v-deo.html&ab_channel=Roboflow

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

      @@Roboflow Sorry for not attending the live session, 10PM is quite late for me cause I am quite tired after a long working day :( ! Hey, I have a proposal like this, can you consult how to achieve this goal (funding, framework, algorithms..., ) docs.google.com/document/d/1ldpQ6q3MpJmox-nOSj2SLq-9sKBMEau1JxHbQClmHMg/edit?usp=sharing . In the past, I used traditional method.ua-cam.com/video/N8i2gbh6RRI/v-deo.html but with the advance of AI, I think we can do further.

  • @baotrangia3837
    @baotrangia3837 День тому +1

    Hello, is there anyway for me to custom for keeping the quality of frame more clearly, I have test and see the quality of frame stream is too bad

    • @Roboflow
      @Roboflow  День тому +1

      Steam quality depends on resolution and compression algorithms. Usually stream source controls those parameters.

    • @baotrangia3837
      @baotrangia3837 День тому

      @@Roboflow Thanks for your response, let me try it

  • @romellfudi
    @romellfudi 2 місяці тому +1

    is possible to run it into a mps device? such as M3

    • @Roboflow
      @Roboflow  2 місяці тому +1

      I included scripts that use ultralytics to run the model. And you can use mps to accelerate inference with this model on M3?

    • @romellfudi
      @romellfudi 2 місяці тому +1

      @@Roboflow yes

  • @mryan744
    @mryan744 2 місяці тому

    Is there a github repo with all of the code?

    • @Roboflow
      @Roboflow  2 місяці тому +1

      Yup, the link is in the YT description

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

      @@Roboflow I could not find the link for this project code in the description could you please help ?

  • @ItayHilel
    @ItayHilel 2 місяці тому

    why didn't you do this for a live video stream??

    • @Roboflow
      @Roboflow  2 місяці тому

      I’m not really sure what you mean. I did?

    • @ItayHilel
      @ItayHilel 2 місяці тому +1

      @Roboflow, what was done in the video is great! I loved it!!! 😍. But it's a workaround; you took a video and turned it into an RTSP link. However, there are many challenges that occur when pulling footage from a stream.
      I would love to see that part done as well. Let's say you get permission for a few cameras from an office/gym or elsewhere and do an example project. It would be fascinating to see the process of pulling footage from these cameras, training a model, thinking of a use case that solves a real-world problem, coding it, and finally giving the result to the client (showing us thats the average time of a customer in checkout 6 is 50 sec on a given day) .
      Currently, most CV i see is done on 15-second videos and from one camera, and there isn't much value in that. real value is in solving real problems with multiple cameras models/logic that works together.
      I'm aware that what I'm talking about is a huge project and not an easy task, but if anyone can do it, it's @Roboflow and Piotr.
      I believe that a tutorial/series like I'm imagining would open the door for millions of CV applications to be built in the future.

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

      The biggest problem for me is the lack of video footage that I could use to make such a tutorial....

    • @ItayHilel
      @ItayHilel Місяць тому +1

      @@Roboflow what do you mean? is it a copyright issue? why is there a lack of video footage?

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

      @@ItayHilel there is simple no data like this that I can use in tutorials. I'd need footage from multiple cameras from store or gym. And people do not share that online :/

  • @ComputerVisionEngineerin-qs1yq
    @ComputerVisionEngineerin-qs1yq 2 місяці тому +1

    Very Great Tutorial 🤩 I have done this before with @Lxuonis OAK. I also experienced the same challenges. Regards!

    • @Roboflow
      @Roboflow  2 місяці тому

      Yes, the topic is much more complicated than it seems at first glance. I am very happy that you like the video.

    • @mryan744
      @mryan744 2 місяці тому +1

      Can you send the link here ?, I dont seem to find the full stream code in the description 😅

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

      take a look here: github.com/roboflow/supervision/tree/develop/examples/time_in_zone