Hi, Would it be possible to detect the speed of vehicles, but with a camera at the same horizontal level as them? That is to say, a view which is not plunging, as in your example. We have a street; we place a camera on a pole about six feet high. We record passing vehicles and later, using Open CV or other programs, we are able to obtain the speed of everything in the camera's field of view. Of course, we took the distances beforehand, for example using a 100-foot measuring tape. Thank you for sharing your knowledge.
Hi Sergio, can you make a video where it can determine (heavy congestion, moderate congestion, no/light congestion) based on speed/ number of vehicles passing through point 1 to point 2? This might be very helpful for a student like me who wanted to explore more on object tracking. Thank you.
TYSM for this video, I love it. But anyone have the code for execute this? Or using the one´s you let us see on the screen could work? I mean at leas the parts we see for every instance in the video. TYSM
Thanks for the video. I want to give my thoughts about this. 16seconds traveling time does not seem correct. I do not think that is a 65 meters distance, it is lower than that. The time that you are calculating is not the actual traveling time, you are calculating the processing time in your computer. You are using deep sort (heavy computation), the processing time is slow, which makes time look longer and in fact that is due to the slow processing. Your timing should be based on the entering and exiting frame rather than time based on processing. You are considering that delay for calculating time here which is not accurate.
I do totally agree with what you say. This project needs to be considered purely as a demonstration. I would say that with an accurate calibration and also with the exact timestamp of each single frame we can get a very good accuracy.
Hi @happypumpkinpm7434, I think the time that's calculated is not the system processing time, it should be the actual travel time. As the timestamp is captured based on the vehicle's position in the frame, it should be the approximate travel time.
Hi Thank you for the tutorial! I am doing similar project but I have some problems when counting objects passing roi. Image distortion in roi causing wrong object counting. I am using nvidia geforce rtx 3090. Help me to fix this problem, please
You wouldn't just use the distance from one side of the roundabout to the other, that would be a straight line. The actual track the vehicles take would be a curved path so you would need to do some math to calculate the circumference of the roundabout and the length of the segment used. Otherwise the estimated speeds are going to come out slower than they are actually travelling -- they need to go faster along the curved route to get to the exit in the same time as a straight line calculation.
Hi Gary, I think the easiest way to get the distance, by not having instruments to do that, is by using google maps. Select on google maps the starting point and the end point and you'll get the distance. Definitely will be more precise than using a own vehicle at a certain speed
Hi Sergio, a question what's the reason of this kind of situation "I have a camera footage from the road, yolo alghoritm does detection quite well, but in length of a few frames exactly same object is detected many times and it's label with number changed" ? Especially it's visible during car passing by.
You need to consider that Detection and Tracking are two separate stages. Once you have object detection in place, you need to implement the algorithm for a proper object tracking, otherwise it's normal that it loses the id.
Deep Sort is an open source library that you can find online, but the specific one is a custom implementation that's available only on the course Object Detection (with Opencv and Deep Leraning) pysource.com/object-detection-opencv-deep-learning-video-course/
Dear sir...You did not put the code of this in your site "Detect vehicles speed from CCTV Cameras with Opencv and Deep Learning" can you let me know where i can download it sir
Deep sort is an open source object tracking algorithm. Its source is available on github but its implementation is not so easy. I've created a custom and simple implamentation of deep sort in a few lines of codes and I share that on my videocourse Object Detection with Opencv and Deep Learning.
🔥Learn how to build your own AI vision solutions: pysource.com/community
Where can I get this video sources i didn't see in the blog ?
@@tamilmanir6730 the specific video source I used in this project is not available to download.
Hi,
Would it be possible to detect the speed of vehicles, but with a camera at the same horizontal level as them? That is to say, a view which is not plunging, as in your example.
We have a street; we place a camera on a pole about six feet high. We record passing vehicles and later, using Open CV or other programs, we are able to obtain the speed of everything in the camera's field of view.
Of course, we took the distances beforehand, for example using a 100-foot measuring tape.
Thank you for sharing your knowledge.
Hi Sergio, can you make a video where it can determine (heavy congestion, moderate congestion, no/light congestion) based on speed/ number of vehicles passing through point 1 to point 2? This might be very helpful for a student like me who wanted to explore more on object tracking. Thank you.
Yeah that would be good
Botak Berguna, terimakasih telah memberikan TUTORIAL. GOOD JOB,
where can we find the python file named deep_sort.deep_sort that you used in the video?
TYSM for this video, I love it. But anyone have the code for execute this? Or using the one´s you let us see on the screen could work? I mean at leas the parts we see for every instance in the video. TYSM
can you please make the video to predict trajectory of multiple objects in different polygon?? i will be thankful to you
Love it, I really like ur motivation and ideas. I also think that there is a lot of potential in cv for ip cameras
Thanks for the video. I want to give my thoughts about this. 16seconds traveling time does not seem correct. I do not think that is a 65 meters distance, it is lower than that. The time that you are calculating is not the actual traveling time, you are calculating the processing time in your computer. You are using deep sort (heavy computation), the processing time is slow, which makes time look longer and in fact that is due to the slow processing. Your timing should be based on the entering and exiting frame rather than time based on processing. You are considering that delay for calculating time here which is not accurate.
I do totally agree with what you say. This project needs to be considered purely as a demonstration.
I would say that with an accurate calibration and also with the exact timestamp of each single frame we can get a very good accuracy.
Hi @happypumpkinpm7434, I think the time that's calculated is not the system processing time, it should be the actual travel time. As the timestamp is captured based on the vehicle's position in the frame, it should be the approximate travel time.
can you give the video footage clip?
its a great videos
i get mini problem where is the full video that you croped it to implement this project
Your videos helped me a lot , really really thank you
Hi
Thank you for the tutorial!
I am doing similar project but I have some problems when counting objects passing roi. Image distortion in roi causing wrong object counting. I am using nvidia geforce rtx 3090. Help me to fix this problem, please
sergio, could you please make a video where the camera is not fixed? so the vertexces of the area of interest should get refreshed.
Thanks!
HI Tomas,
please share some video footage of a moving camera and I'll take it into account for further updates
You wouldn't just use the distance from one side of the roundabout to the other, that would be a straight line. The actual track the vehicles take would be a curved path so you would need to do some math to calculate the circumference of the roundabout and the length of the segment used. Otherwise the estimated speeds are going to come out slower than they are actually travelling -- they need to go faster along the curved route to get to the exit in the same time as a straight line calculation.
V good video - you could add a suggestion to calibrate it by driving the road at a known set speed. Then tweak the estimated distance figure to match
Hi Gary,
I think the easiest way to get the distance, by not having instruments to do that, is by using google maps.
Select on google maps the starting point and the end point and you'll get the distance. Definitely will be more precise than using a own vehicle at a certain speed
how can we take this implementation to PyTorch yolov5 detection?
Hi Sergio, a question what's the reason of this kind of situation "I have a camera footage from the road, yolo alghoritm does detection quite well, but in length of a few frames exactly same object is detected many times and it's label with number changed" ? Especially it's visible during car passing by.
You need to consider that Detection and Tracking are two separate stages.
Once you have object detection in place, you need to implement the algorithm for a proper object tracking, otherwise it's normal that it loses the id.
a rewarding video. However, do you have datasets on the velocities of the vehicles for ground truth?
Nope, I used pretrained models for this example.
Thaks. I have a question.
How to get and install object_detection and deep_sort?
Deep Sort is an open source library that you can find online, but the specific one is a custom implementation that's available only on the course Object Detection (with Opencv and Deep Leraning) pysource.com/object-detection-opencv-deep-learning-video-course/
sir can we measure the distance ? please answer..
Hey hi.. can u please give me a guide on detect speed of turbine rotation using opencv plzzz
Where can I get the deep_sort source like yours sir?
Hi, this code is on the course Object Detection (with Opencv and Deep Learning) on pysource.com
Dear sir...You did not put the code of this in your site "Detect vehicles speed from CCTV Cameras with Opencv and Deep Learning" can you let me know where i can download it sir
Hi, this code is not available to download
@@pysource-com OK Sir but how to follow on this program then Sir?
Another nice object , Thanks
I need to capture torpedo speeds for my project those it work underwater.
Where is deep sort come from? Can I install via pip command?
Deep sort is an open source object tracking algorithm. Its source is available on github but its implementation is not so easy.
I've created a custom and simple implamentation of deep sort in a few lines of codes and I share that on my videocourse Object Detection with Opencv and Deep Learning.
yolo4 custom pleaseeeee
kindly upload the vedio which you had uesd
hello sir which software are using in programming
I use pycharm
great videos............
Can you share the source code for this ??
Can we delete CCTV footage and replace it with another CCTV footage
Can you send me the car footage in that video.
thanks for your amazing video i need this video_test plzz
plz soucre code ?
code
👍
There are example source code ?
Sir, would you give me the code for free?