CUSTOM HAARCASCADE - Data Collection And Training Process Made Easy [10]
Object Detection using the Haar cascade. We will learn how to run pre-trained models and how to collect data for custom Objects. Later we will train using this data and create an Xml file for deploying it in python and OpenCV.
🚀🚀 My Urdu/Hindi AI KZread Channel 🚀🚀
/ @murtazahassan01
Code & Complete Course:
coming soon
Premium Courses:
✔️ Computer Vision Game Development Course:
bit.ly/3ttLZ2s
✔️ Computer Vision with Arduino Course:
bit.ly/3wzLB4m
✔️ Advanced Drone Programming Course:
bit.ly/3qs3v5g
✔️ Learn to Build Computer Vision Mobile Apps:
bit.ly/3uioY1J
✔️ Jetson Nano Premium Course:
bit.ly/3L8uIlF
⚙️⚙️⚙️--My Gear - ⚙️⚙️⚙️
👉 Complete Gear 💈: www.computervision.zone/tech-...
👉 My PC Specs 🖥️: www.computervision.zone/tech-...
👉 My Video Shooting Gear📽️ : www.computervision.zone/tech-...
👉 My Laptops 💻: www.computervision.zone/tech-...
👉 Educational Products🧑🎓: www.computervision.zone/tech-...
👉 KZread Starter Kit 🔴: www.computervision.zone/tech-...
Follow Me:
TikTok: bit.ly/3Vo76OQ
Facebook Group: bit.ly/3irDcb7
Discord: bit.ly/3JvyxAM
Facebook Page: bit.ly/3IvpU7W
Instagram : bit.ly/3NdGME3
Website: bit.ly/3ICFTS0
Github: bit.ly/3woU6PS
#ComputerVision
#OpenCV
#CVZone
--------------------------------Music --------------------------------
• JPB - High | Trap | NC...
Пікірлер: 160
I love this video this time it is again proved fruitful in terms of learning. Best thing about your videos is that you apply simple and conventional methods which are more fast and efficient than modern classifiers. I would love if you make a video on shape context and OCR. It would get alot of hits as these old algorithms are long forgotten but they work best in some applications. With minimal training data and fast execution time.
@murtazasworkshop
4 жыл бұрын
Thank you for your suggestion. I will try to cover this topic as well .
@Arindam_Mukherjee98
2 жыл бұрын
Hey, can you pls tell me from where can I get the code of this workshop.
Thanks for this workshop. Could you also post a video on how to detect tables in document images or segregate tables, text, charts and figures. Tx.
Your coding style is very unique. 🔥👌
Your tutorial helped me a lot. 😊
Hi, can u explain, why sometimes we need tensorflow and keras for image processing especially object detection,and why somestimes just use opencv, can opencv handle itu without TF and keras?
very cool tutorial. thank you Murtaza.
I keep having the same issue when trying to use the Cascade Trainer, an error message shows up when i begin the training. OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in cv::resize, file D:\cv\opencv_3.2.0\sources_withTextModule\modules\imgproc\src\imgwarp.cpp, line 3492 Any ideia of what it could be?
thanks for your video, it's nice ~
good job 👌👌 thank you for vid 😊😊
I find your video very informative, I thank you a lot for that. But can you please tell me wheater cascades can be used for face recognition also ???
You should deserve with 1M subscriber. Amazing
is it possible for me to use the casade trainer in order to detect the printed single rules lines of a CR or excercise book, if so what sort of images should i give the positive and negative folders??? I hope you can help me in this matter.Thank you.
very good channel to follow
i love your content
ver sus tutoriales es como ver a Ronaldiño jugando futbol "Fantastico"
Thank you Very much
Cool tool and thanks for sharing this workflow! The cascade.xml file is not generated with my costume dataset..may you can help?
I read on forums that the negative image size can be larger than positive images but aspect ratio must match. Is that true?
to virando teu fã
Nice work bro, Can you help me how to integrate python program with jetson nano to detect traffic light? Is it possible to do using just openCV and custom cascade?
tnx it was easy
thanks sir for the wonderful tutorial .....i juste need haar cascade for steering wheel any idea ?
greart, thank you
Do you know any any haar cascade classifier for hand detection?
please help ! OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file. ) in CvCascadeImageReader::PosReader::get, file D:\cv\opencv_3.2.0\sources_withTextModule\apps\traincascade\imagestorage.cpp, line 158 this keeps on showing :'(
Can I use haar cascade to classify different arduinos like arduino nano, arduino uno, arduino micro etc
not possible to have more image for "p" and "n" ? because me it's not great with picture of google and my picture...
hi, where can i find the code files ? the new redirected site doesnt seem to have it.
can anyone help which course to enroll and where the code is in that blog
Thanks so much for your videos
@murtazasworkshop
4 жыл бұрын
Glad you like them!
@sankasuvarna1764
4 жыл бұрын
Tq so much sir for ur response i just wanted to do face detection and motion detection in live video along with saving the recorded video...pls sir is this possible if yes pls let me know
Hello and thank you for all the video you make , it is possible to run multiple cascade in one program ? like one for arduino and one for car
@zy9dh
4 жыл бұрын
eyes = eyeCascade.detectMultiScale(imgGray, 1.1, 4) faces = faceCascade.detectMultiScale(imgGray, 1.1, 4) for (x, y, w, h) in eyes: cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2) for (x, y, w, h) in faces: cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2) cv2.imshow("Result", img) cv2.waitKey(0)
Hello sir, I encounter a problem while I tried to use my web cam. whenever I change the parameter of "cv2.Capture( ) ", it still uses my laptop cam. any solution to fix this issue? Thank you!
A lot of time i get error false alarm when I run cascade trainer. What is thr reason. Thanks
Great video!! ive been wanting to do this for a while now.. but uhm... ive been waiting 3 years ... can we please have the source code ... ?
Hello Sir, where can I get the source code to this workshop, I just want to run it as I am not getting the xml file properlly. Thank You.
May i know how does to solve the error OpenCV Error: Insufficient memory?
Nice work bro Can you help me to detect Vehicles from live IP camera feed.. is it possible to do using openCV?
@murtazasworkshop
4 жыл бұрын
Yes it is possible . To detect cars u can find some cascade online or you can train your own using this method . For the live IP you can look into the urllib library for python
The software is not working for me it is showing insufficient number of positive samples in the log
OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file. ) in CvCascadeImageReader::PosReader::get, file D:\cv\opencv_3.2.0\sources_withTextModule\apps\traincascade\imagestorage.cpp, line 158
You are so good. Can you plz tell how did you become so experienced in Opencv? I am still struggling
@murtazasworkshop
4 жыл бұрын
Practice Practice Practice Try these projects : www.murtazahassan.com/courses/opencv-projects/
@ayanjit9196
4 жыл бұрын
@@murtazasworkshop thanks. I am trying that out.
I cant find this code in your website, can you please give the link to the code?
How can i get the Haar cascade file on the video ???
The code is running without any errors , But it is not detecting the object trained. Kindly help!!
Its a nice one, can you help me to detect object as Text from image, I have a data set of images but dont know how to train using opencv and detect text.
@murtazasworkshop
4 жыл бұрын
try this kzread.info/dash/bejne/q2WO1LGsadaYgaQ.html
@nisarggandhewar8242
4 жыл бұрын
@@murtazasworkshop thanks, I will try and get back to you.
@nisarggandhewar8242
4 жыл бұрын
Dear sir i have refereed your digit classification video for above task, but when I am try to execute test.py I am getting error TypeError: Expected Ptr for argument 'src'
Nice video, it is posible to train it with more than one object? For exemplo to recognize the Arduino UNO and the Lamborgini in the same .xml
@tanmaykhatri6061
2 жыл бұрын
yes we can but the modal cannot diffrencate between UNO and Lamborgini
@ahmedgamberli2250
2 жыл бұрын
Why? You can already use 2 cascades in 1 python file or opencv project.
OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file. ) in CvCascadeImageReader::PosReader::get, file D:\cv\opencv_3.2.0\sources_withTextModule\apps\traincascade\imagestorage.cpp, line 158 PLEASE TELL ME HOW TO RESOLVE THIS ISSUE!!!!!!!!!!!!!!!!
Can you provide the GitHub link for this sample code?
I need to detect tomatoes, and some tomatoes are behind leaves or other tomatoes, what can i do to detect them, like seeing a part of the tomato and guessing where the other part should be? What can I do?
@murtazasworkshop
3 жыл бұрын
better to use deep learning models instead.
Code & Complete Course please
Hey Murtaza i am facing an issue when i try to run your code error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' Please let me know how do it solve it
@TechInventorAman
3 жыл бұрын
@TECHNOROZ GAMINGS hey thankyou so much it did worked for me
@ayarzuki
3 жыл бұрын
@TECHNOROZ GAMINGS i have still got an error. File "c:\Users\user\Belajar_OpenCV_2\haar_cascade.py", line 31, in cascade = cv2.CascadeClassifier(cv2.data.haarcascade + 'kemasan.xml') AttributeError: module 'cv2.data' has no attribute 'haarcascade'
while runing the code iam getting this error: Traceback (most recent call last): File "C:/Users/Talha/Desktop/project/obtwo.py", line 37, in gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
@murtazasworkshop
4 жыл бұрын
it seems it is not finding an image.
If we have a bigger data set will it worknon more "busy" backgrounds?
Hi, I want to track health bars in league of legends (numbers of them on the screen) and this isn;t working well :( (I did lots of pos and neg screenshots) what am I doing wrong or shold I do it diffrent way trying to detect smth from game?
@ahmetcihatboz
4 жыл бұрын
Looks like someone trying to code league scripts :))
@veskinpalm8584
4 жыл бұрын
@@ahmetcihatboz Just for fun :P
This video looks perfect for me but the link to the code is broken :( can you please fix?
will making a custom haarcascade have better facial detection than the standard opencv one?
@Lycoriste
Жыл бұрын
depends
I cannot find the link in description and it is not the first time Good job anyway
Bro please tell me which is best for object detection.... YOLO or OPEN CV.
@murtazasworkshop
4 жыл бұрын
Depends on the object. If you are trying to find a simple object based on color or shape it could be done with images processing techniques. But if you have complicated object then you might want to look at AI models such as Yolo
Murtaza in my folder i have only log.txt, params xml and stage0 xml file noone like classifier xml file
@pramanikamitkumar
3 жыл бұрын
it means it doesn't train properly checked the dataset properly
please make more tutorials about Computer Vision and openCv in python
@murtazasworkshop
4 жыл бұрын
yes i have a lot more topics planned.
@polagergesyounan27
4 жыл бұрын
@@murtazasworkshop you really make a very good computer vision tutorial
OpenCV Error: Insufficient memory (Failed to allocate 428572356 bytes) in cv::OutOfMemoryError, file D:\cv\opencv_3.2.0\sources_withTextModule\modules\core\src\alloc.cpp, line 52 what to do next ?
@tanmaykhatri6061
2 жыл бұрын
use less amount of images
Hey. Why No of stages 15???
I have already used these cascade creator is there any min no of sample req for this trainer
@murtazasworkshop
4 жыл бұрын
i would suggest atleast 100
nice tutorial, sir i have a question, can i use this method for detect just my eyes ? so i want to recognize my eyes with haar cascade and make own cascade with positive data my eyes like that, pls answer my question, thanks
@murtazasworkshop
4 жыл бұрын
Yes. But its better to use face cascade and then apply eye cascade only on the face image. There is already a eye cascade provided by opencv . You can try that .
@mohamadalief8697
4 жыл бұрын
@@murtazasworkshop i did, but when other people inside on area webcam they will detected, so can i train this cascade with only my face ?
@mohamadalief8697
4 жыл бұрын
@@murtazasworkshop 1 more question sir, what the meaning of cap.set(3, 640) and cap.set(4, 480) what will happen if i increase or decrease this value ? pls help me, thanks
@MrMAMCHANNEL
4 жыл бұрын
@@mohamadalief8697 cap.set(3, 640) and cap.set(4, 480) dimensions of the video
where can i get your created arduino XML because its not in github
@ziaurrehman2180
3 жыл бұрын
its generated via software and link of the software is available
where i can get this project
the link is not working
hi,can I detect multiple item at the same time?..for example, while detecting arduino ,face also detected Pls reply. Thx in advance
@murtazasworkshop
4 жыл бұрын
yes but it will be slow
@chewminjian6571
4 жыл бұрын
Ok,I will try later ..thx for replying
@afeefm8966
4 жыл бұрын
@@chewminjian6571 could you tried this
@crowhawk9756
3 жыл бұрын
@@chewminjian6571 can i know how u do multiple cascade
Hi thanks for this video My question is can I use same on raspberry Pi. I mean, will raspberry Pi can handle this amount of load?
@murtazasworkshop
4 жыл бұрын
yes i have tested this on pi, but it works slower.
@prajwalparve1834
4 жыл бұрын
@@murtazasworkshop Hi, thanks for replay :-) How can I implement the same for multiple objects and based on the found object it should show text on the rectangle.
@crowhawk9756
3 жыл бұрын
@@prajwalparve1834 are you already done it?
@prajwalparve1834
3 жыл бұрын
Yes, I modified that code. Using multithreading
@crowhawk9756
3 жыл бұрын
@@prajwalparve1834 can i contact you via discord ?
OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file. ) in CvCascadeImageReader::PosReader::get, file D:\cv\opencv_3.2.0\sources_withTextModule\apps\traincascade\imagestorage.cpp, line 158 Why do i get this error in the GUI Trainer???
@nithinsai2250
3 жыл бұрын
set positive number of samples to be used to 80%
@ayarzuki
3 жыл бұрын
@@nithinsai2250 Hi, you help me with set positive to 80%. How can you know? Any resource?
@nithinsai2250
3 жыл бұрын
@@ayarzuki I do not know the reason but it works trust me
@nithinsai2250
3 жыл бұрын
@@ayarzuki Don't forget to mention the number of negative images too in that software
Where coode? ?
Can you show how to make a custom haar cascade on mac, pls?
which camera you are using?
@murtazasworkshop
3 жыл бұрын
logitech c270
Mine was failing at about stage 4 of training until I reduced from 100% the positive image useage.
Can you recoment another webcam for computer vision
@murtazasworkshop
4 жыл бұрын
if you are using low resolution like 640 x 480 you can pretty much use any webcam.
where is the code and files
couldnt find the code
Aslaamu Alaikum bro.. Actually i tried this and collected 500 positive images and 500 negative images after makin xml files and applying them.. It didn't work
@moneezhussainkhan1314
3 жыл бұрын
Same problem here...Did you fixed it somehow??
@muminibnaadm3361
3 жыл бұрын
@@moneezhussainkhan1314 yes bro.. Manual training though it's time consuming but worth it
@moneezhussainkhan1314
3 жыл бұрын
@@muminibnaadm3361 Can I get your number?? Or maybe any other social account?? Can you hlep me please?? My Project submission is in few days and m so worried..Can you help me please sir?
uhhh sir....I've followed each and every step of this video.... program is working fine but it is not detecting the objct...I also did the training.....i've captured 64 Positive and 66 Negative objects.So can you help me with this???
@murtazasworkshop
3 жыл бұрын
It depends on the images as well. Post a few on my discord channel and share your issue.
@mohammedkamran8559
2 жыл бұрын
Did u resolve it?? Even I have the same issue
Hi, could you please share the positive and negative images too ? Thank you very much
@sts7685
3 жыл бұрын
can you share the link where u get the code inside that blog
@Arindam_Mukherjee98
2 жыл бұрын
@@sts7685 have u got the source code.
@sts7685
2 жыл бұрын
@@Arindam_Mukherjee98 sorry I don't even remember anything about it😅
What about Mac users ? how do they get cascade trained ?
@murtazasworkshop
4 жыл бұрын
i am afraid its not available for mac
@minyang3988
4 жыл бұрын
@@murtazasworkshop do you have any other apps recommend for mac?
I cannot find the code for the project. Kindly help me out.
@murtazasworkshop
3 жыл бұрын
You can follow the link in the description and enroll to get access to the code. This tutorial is in the 'Intermediate Section' by the title 'Face and Object Detection'.
@nithinsai2250
3 жыл бұрын
@@murtazasworkshop the code is nt working the recording one :(
where is the link of the file sir? I want to download it
@murtazasworkshop
3 жыл бұрын
Follow the link on the description
well it worked with default cascade it detected 2 chip from arduino uno board below usb connect i was like wow. later test it detected pamela anderson face as arduino lol
@nithinsai2250
3 жыл бұрын
bro can u share me the code pls, the code for recording objects
where can i get this code??
@murtazasworkshop
3 жыл бұрын
Follow the link in the description and enroll
can I get the rectangle position (x, y)?
@murtazasworkshop
4 жыл бұрын
yes the x y w h are values you are looking for . its explained in the video
hello man can i detect the person identify with mask
@murtazasworkshop
4 жыл бұрын
yes if you collect enough data this could work
@abdengineer6225
4 жыл бұрын
@@murtazasworkshop do you mean alot of pictures for this person
@bharadwajvedula4696
4 жыл бұрын
@@abdengineer6225 hey I wanaa do the same thing. Have u done it ???
@abdengineer6225
4 жыл бұрын
@@bharadwajvedula4696 not yet
@bharadwajvedula4696
4 жыл бұрын
@@abdengineer6225 u have any clue how to do it. Are u planning to train custom Haar Cascade ?