Realtime Object Detection Using OpenCV Python ON CPU | OpenCV Object Detection Tutorial

  Рет қаралды 46,728

TheCodingBug

TheCodingBug

Күн бұрын

Пікірлер: 77
@TheCodingBug
@TheCodingBug 3 жыл бұрын
► My Other Tutorials: Object Detection with OpenCV kzbin.info/www/bejne/nofEp4aba5WAack DETECTRON2 Custom Object Detection, Custom Instance Segmentation Tutorial: Part 2 (Training Models) kzbin.info/www/bejne/faCspauoZpuUm5o DETECTRON2 Custom Object Detection, Custom Instance Segmentation Tutorial: Part 1 (Preparing Data) kzbin.info/www/bejne/nJe3hoV3Za-AZ7M Detectron2 on Colab kzbin.info/www/bejne/mJvEqmqciZ5mars Instance Segmentation as Rendering kzbin.info/www/bejne/nZ-7nXhvd7RjotE Detectron2 Complete Tutorial kzbin.info/www/bejne/hpOWoKN7e7Vsarc Colorize Black and White Images and Videos using Python OpenCV kzbin.info/www/bejne/e4u6eXSaZa57Z68 Build and Install OpenCV 4.5.1 With CUDA GPU Support on Windows 10 kzbin.info/www/bejne/j6TQmX6Xp52ihcU Face Detection Using OpenCV Python with CUDA GPU Acceleration kzbin.info/www/bejne/fYnGqmp6npair9U YOLOv4 On Android Using TFLite kzbin.info/www/bejne/j6ukm3SJa7SmbsU Install TensorFlow GPU Under 90 Seconds kzbin.info/www/bejne/qqCtlmuQl6ube8U Install PyTorch GPU Under 90 Seconds kzbin.info/www/bejne/qJKlnJuLpMqCftU Custom YOLOv4 Object Detection with TensorFlow and TFLite kzbin.info/www/bejne/rKu3dH2DZp2opa8 Darknet YOLOv4 Custom Object Detection: Part 2 (Training YOLOv4 Darknet) kzbin.info/www/bejne/Y3-oc2iGYrh_n5I Darknet YOLOv4 Custom Object Detection: Part 1 (Preparing Custom Dataset) kzbin.info/www/bejne/qXynqqaEqdObgJY YOLOv4 Object Detection with TensorFlow, TFLite and TensorRT kzbin.info/www/bejne/qnTQdGqkrst9ppo Darknet YOLOv4 Object Detection for Windows 10 on Images, Videos, and Webcams kzbin.info/www/bejne/fHaVeHWbgNqkpsU Real Time Object Detection on Webcam and Videos Using OpenCV With YOLOv3 and YOLOv4 | Windows Linux kzbin.info/www/bejne/fJvcd2NpqsaqqaM Build and Install OpenCV 4.4.0 with CUDA (GPU) Support on Windows 10 kzbin.info/www/bejne/qpu7nIpmYpmag6c Install TensorFlow GPU and PyTorch with CUDA on Windows 10 Anaconda | CUDA 10.1 cuDNN 7.6 kzbin.info/www/bejne/hp26aq13nJmWrpo Real-time Multiple Object Tracking with YOLOv4 TensorFlow and Deep Sort | Linux, Windows kzbin.info/www/bejne/fZLKenxrhaaYgck
@mtasalloti
@mtasalloti 2 жыл бұрын
Hi - Great video and nice contrast to the TensorFlow one you have. Very clear, concise and to the point. Question - would you be able to recommend where I could get a similar overview of how to train / add / remove items into your model? Many Thanks again
@TheCodingBug
@TheCodingBug 2 жыл бұрын
I am planning a video on adding new classes to the model or only perform object detection on selected classes.
@cyberhard
@cyberhard 2 жыл бұрын
Excellent tutorial. You have a new subscriber.
@padmavathynarasareddygari1213
@padmavathynarasareddygari1213 Жыл бұрын
Hi- I have to say, a great video. It really helped me with my project. I made sure to recommend it to my friends. But I have a small doubt. Is opencv-contrib required to do it? Like can the project work without installing it? Thank you :)
@TheCodingBug
@TheCodingBug Жыл бұрын
It was needed back then but I am not sure about now.
@padmavathynarasareddygari1213
@padmavathynarasareddygari1213 Жыл бұрын
@@TheCodingBug hmm, what do you mean now? Did OPENCV update or something 🤔?
@TheCodingBug
@TheCodingBug Жыл бұрын
They add new methods and modules to opencv. Previously, DNN module was part of contrib. So had to install that as well.
@padmavathynarasareddygari1213
@padmavathynarasareddygari1213 Жыл бұрын
@@TheCodingBug okay. I'm unable to install contrib as it's getting stuck on building wheel, I'll try your code without installing it and I'll update what happens.
@TheCodingBug
@TheCodingBug Жыл бұрын
Sure
@opensourcethings
@opensourcethings 8 ай бұрын
heyy great video... but what if i want to add weapons in the object detection ... is there any method to modify your given model or let me know from where i can get this type of model which detect weapons also
@yopijulia
@yopijulia 11 ай бұрын
Hello, I don't have videos in the "test_videos" folder. Where can I get the "street1" and "street2" videos?
@TheCodingBug
@TheCodingBug 11 ай бұрын
Download any royalty free video from internet or KZbin.
@jhoanrodrigoperezvargas8824
@jhoanrodrigoperezvargas8824 2 жыл бұрын
Hi, great video tutorial. is it possible to implement tracking?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Hi. I covered tracking using DeepSort in another video.
@johnmelbolaybolay6269
@johnmelbolaybolay6269 2 жыл бұрын
why do i get this error SystemError: returned a result with an exception set
@aslanserafimov7141
@aslanserafimov7141 Жыл бұрын
because your three files are in the project folder and not in model_data
@BhishmaRane
@BhishmaRane 15 күн бұрын
same with me
@YbborNetsrek
@YbborNetsrek 3 жыл бұрын
Hi i keep getting an error with: def__init__ (self, vdeoPath, configPath, modelPath, classesPath): SyntaxError: invalid syntax Any suggestions?
@TheCodingBug
@TheCodingBug 3 жыл бұрын
init has two __ and there's a space after def.
@RethanyaS001
@RethanyaS001 Жыл бұрын
Output Virtual window ie.Result window is not showing but the code runs successfully What should I miss?
@travelstories5896
@travelstories5896 Жыл бұрын
Excellent Tutorial... Thanks a lot...
@maulanamahmuddin5826
@maulanamahmuddin5826 Жыл бұрын
Amazing content and really inspired me, permission to ask, is the difference between labelmap.pbtxt and coco.name the same or different? What I know is that a labelmap is a set of names that are used as json, if coco.name is just a list of names, right? If it's the same, can classesPath also use a labelmap? Please help and thank you
@TheCodingBug
@TheCodingBug Жыл бұрын
Yes it's the same file with names.
@panzznine713
@panzznine713 5 ай бұрын
Hi, is there a way to change vid source instead from recorded video, i want to direct it on my camera feed
@TheCodingBug
@TheCodingBug 5 ай бұрын
Use 0 instead of video path to use laptop or usb webcam
@panzznine713
@panzznine713 5 ай бұрын
Thank you for reply, i will try that and give my feedback ty so much
@aslanserafimov7141
@aslanserafimov7141 Жыл бұрын
Can you recognize the picture? If yes, what needs to be done?
@raymondmichael4987
@raymondmichael4987 2 жыл бұрын
New here but I like it, sadly you don't upload often. Greetings from Tanzania 🇹🇿 Subed
@raghulprasanth5619
@raghulprasanth5619 2 жыл бұрын
How can I use Efficienet instead of SSD mobilenet. Will it work if I use pbtxt of SSD for efficientdet. I'm facing trouble finding pbtxt for Efficientdet. Can you please help me sir
@TheCodingBug
@TheCodingBug 2 жыл бұрын
No it'll not work. Efficient Det will work in TensorFlow. Check this video kzbin.info/www/bejne/aKq0opqVor2ohrM
@raghulprasanth5619
@raghulprasanth5619 2 жыл бұрын
@@TheCodingBug thank you
@pypoornith8516
@pypoornith8516 Жыл бұрын
Hey, great video. Your script runs perfectly runs for me. But I wanted to change it up a little bit. Instead of showing it on the video using imshow(), it should print the name and confidence in the console. so I did something like this: displaytext = "{}:{:.2f}".format(classLabel, classConfidence*100) print(displaytext) but it is not printing the names of all the objects, its only printing the name of the first object it sees(I think). Can you please help me to modify this code so that it works the way I intended it to? Thanks again for the video 😀
@reyamed720
@reyamed720 2 жыл бұрын
I trained a custom object detection model from a pretrained ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8. I freezed it and after everything was done. I couldn't deploy it with openCV. I'm stuck now and I'd be grateful for any kind of help
@stevi32800
@stevi32800 2 жыл бұрын
Very very good content. Very well explain !!!! thanks a lot
@hrithikrana7788
@hrithikrana7788 2 жыл бұрын
from where can i get test videos
@ahmedgamberli2250
@ahmedgamberli2250 2 жыл бұрын
Greetings from Azerbaijan! I've a very simple question but not meaningless. Can we add our own models to this method?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Yes as long as it's compatible with OpenCv. You can use YOLO, Caffe and TF models.
@ahmedgamberli2250
@ahmedgamberli2250 2 жыл бұрын
@@TheCodingBug Ok, I tested them all! I looked for a new one! Thanks for reply!
@salmanahmad4565
@salmanahmad4565 11 ай бұрын
Sir how to get these sample videos. They are not in zip file.
@shashwatmishra4974
@shashwatmishra4974 3 ай бұрын
Ye wala pre-trained algorithm model use karke Kiya hai na ?Ya model train karke Kiya hai Plz anyone reply
@TheCodingBug
@TheCodingBug 3 ай бұрын
Pertained model is used.
@tungduong910
@tungduong910 3 жыл бұрын
I use yolov3 to detect 1 video but my computer's cpu is always running at 100% and the fps is very low, is there any way to fix it?
@TheCodingBug
@TheCodingBug 3 жыл бұрын
YOLOv3 would never go beyond 2-3 FPS on CPU. Even with GPU, YOLO would give around 12-15 FPS (unless you use Darknet). You should use the model shared in this video if you plan to run object detection on CPU.
@tungduong910
@tungduong910 3 жыл бұрын
@@TheCodingBug how to use gpu to run it, i wanna try
@TheCodingBug
@TheCodingBug 3 жыл бұрын
@@tungduong910 you have to build opencv with GPU support. I have made a tutorial about running YOLO with GPU support. You can find it on the channel.
@robertraafat413
@robertraafat413 Жыл бұрын
Hey sir! How can i use this code with yolov7 and with custom data?
@TheCodingBug
@TheCodingBug Жыл бұрын
No this cannot be used with yolov7.
@robertraafat413
@robertraafat413 Жыл бұрын
@@TheCodingBug Then can you handle one for yolo?
@dzulgonzalezmarcosadalbert6511
@dzulgonzalezmarcosadalbert6511 Жыл бұрын
any tutorial to generate the .pb and .pbtxt files of the video in yolov4?please
@amansinghal6267
@amansinghal6267 2 жыл бұрын
Hi please make tutorial on human pose detection
@RahulMishra-ze2ue
@RahulMishra-ze2ue Жыл бұрын
Hlo sir error is coming saying that detector () take no argument
@user-rh6cq2pl3z
@user-rh6cq2pl3z 2 жыл бұрын
sir i have written the code line by line while watching your video but project is not running plzzz help me
@user-rh6cq2pl3z
@user-rh6cq2pl3z 2 жыл бұрын
this is the error ::::::::::::: plz help me sir to fix this cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\caffe\caffe_io.cpp:1138: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open "model_data\frozen_inference_graph.pb" in function 'cv::dnn::ReadProtoFromBinaryFile' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "c:\Users\user\Desktop eal_time_object_detection\model data\main.py", line 17, in main() File "c:\Users\user\Desktop eal_time_object_detection\model data\main.py", line 13, in main detector = Detector(videoPath, configPath, modelPath, classesPath) File "c:\Users\user\Desktop eal_time_object_detection\model data\Detector.py", line 18, in __init__ self.net = cv2.dnn_DetectionModel(self.modelPath , self.configPath) SystemError: returned a result with an exception set
@stevi32800
@stevi32800 2 жыл бұрын
Amazing content, are you planing to make more tutorial like this in the future ? I watched a lot of tutorial video about object detection and I can tell you it's one of the best. Thank you
@TheCodingBug
@TheCodingBug 2 жыл бұрын
I am glad it was helpful... Yes I plan to make more tutorials but I hardly find time these days.
@michaelautery2474
@michaelautery2474 2 жыл бұрын
For some reason, it will only play the first 3 seconds of my video. Any ideas what that could be about?
@BarbieKen7
@BarbieKen7 Жыл бұрын
Did you manage to solve this problem?
@mb3420.
@mb3420. Жыл бұрын
test videos file ???
@murathanyildirim9469
@murathanyildirim9469 Жыл бұрын
Just to let you know, making code available only for supporters when you are already a very small channel is off-setting.
@tabaskas4808
@tabaskas4808 Жыл бұрын
I hate these kind of KZbinrs tbh
@navtejsingh2532
@navtejsingh2532 5 ай бұрын
source code? please
@TheCodingBug
@TheCodingBug 5 ай бұрын
Codes for all videos are available for our Patreon supporters.
@abhichore
@abhichore 2 жыл бұрын
my video getting stuck in between
@akhileshdesai3950
@akhileshdesai3950 2 жыл бұрын
an error of Detector is not defined is coming pls help
@manishmishra1984
@manishmishra1984 Жыл бұрын
from detector import Detector This should work
@civilengineer194
@civilengineer194 Жыл бұрын
ur problem resolved?? plz help its urgent
@civilengineer194
@civilengineer194 Жыл бұрын
@@manishmishra1984 it dosent works. anyother idea??
@manishmishra1984
@manishmishra1984 Жыл бұрын
@@civilengineer194 I've edited the code. Pls check.
@civilengineer194
@civilengineer194 Жыл бұрын
@@manishmishra1984 still notworking. in Detector.py itself showing " Detector is not defined Pylance(reportundefinedVariable) " plz help🙏🙏
@squezy2240
@squezy2240 9 ай бұрын
Detector(videoPath, configPath, modelPath, classesPath) ^^^^^^^^ NameError: name 'Detector' is not defined
@WarzoSandy
@WarzoSandy 8 ай бұрын
Did you resolved this issue?
@dannydunavetsky694
@dannydunavetsky694 Жыл бұрын
Great tutorial but im getting an error has anyone encounted this before? File "c:\Users\Danio\Downloads\model_data\main.py", line 6 videoPath = ("C:\Users\Danio\Pictures\Camera Roll\WIN_20230823_10_54_49_Pro.mp4") ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Object Tracking with Opencv and Python
30:03
Pysource
Рет қаралды 616 М.
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 77 МЛН
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 114 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 726 М.
Football AI Tutorial: From Basics to Advanced Stats with Python
1:30:19
Yolov11 Object Detection on Custom Dataset | Step-by-Step Guide
19:58
Object Detection in 10 minutes with YOLOv5 & Python!
10:45
Rob Mulla
Рет қаралды 271 М.
REAL TIME OBJECT MEASUREMENT | OpenCV Python (2020)
53:25
Murtaza's Workshop - Robotics and AI
Рет қаралды 250 М.
Real-Time Object Detection in 10 Lines of Python Code on Jetson Nano
26:18
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57