OpenCV Tutorial: Training your own detector | packtpub.com

  Рет қаралды 117,213

Packt

Packt

Күн бұрын

Пікірлер: 119
@gemhan2079
@gemhan2079 5 жыл бұрын
opencv version 4 does not provide createsamples and haartraining any longer...
@makingglitches1856
@makingglitches1856 3 жыл бұрын
yeah so how do you train a dnn model is what I've been trying to find out !
@laurasaad8616
@laurasaad8616 6 жыл бұрын
I really liked the video, congrats! Unfortunatly some people prefers reclaim than say thank you. Don't worry about that. It is clean, simple. That´s my first time using OpenCV, I'm tryng to make OpenCV be read to use. I did the download and installed it. But maybe I should download more stuff. Just reading about. Any tip about the environment would be great.
@littlecplants
@littlecplants 9 жыл бұрын
I was following this and my program was hanging, it couldn't even get results from stage 0 and it was really frustrating. Previous comments mentioned that the training should take longer then it looks like in this video, and that the video is modified(?). But after I fixed my problem (by reinstalling openCV to 2.4.12) I realized it really only takes seconds to complete the first stages.... so if training with LBP hangs at early stages, its probably something wrong
@ashraf1824
@ashraf1824 7 жыл бұрын
How to create my own SVM detector, which can be used for object detection and tracking in a video?
@ikkik1781
@ikkik1781 7 жыл бұрын
Simply amazing, keep the good work my friend. Regards from Brasil
@kartikpandit7441
@kartikpandit7441 5 жыл бұрын
Can we also use the classifier trained in this method to detect objects in live stream?
@circuitdesigner7489
@circuitdesigner7489 4 жыл бұрын
ye windows pe chlta hi
@jibinjohn8263
@jibinjohn8263 6 жыл бұрын
how did you create .info file
@aiyazm7278
@aiyazm7278 3 жыл бұрын
How did you create the cars.info file
@6PsYChO6MaGoTT6
@6PsYChO6MaGoTT6 6 жыл бұрын
usually we have to use feature engineering in machine learning. i dont understand what opencv_createsamples does. does opencv_createsamples have feature extraction built in? is classifier using raw pixel data?
@rachitbhargava8744
@rachitbhargava8744 9 жыл бұрын
Hi, Great Video!! I am planning to use a cascade classifier to detect traffic lights. I was wondering whether it is possible to train my classifier to classify into 4 different classes namely, go, stop , warn and negative???
@nanogear164
@nanogear164 11 жыл бұрын
Once you have your trained detector, what is next? How do you transport the algorithm to a fpga or dsp for autonomous function?
@behnamkiani3736
@behnamkiani3736 7 жыл бұрын
Hello,thanks for your tutorial,just one very big problem is if you can upload somewhere your exact setup condition os/bit/.... and upload all resources that you used that would be beneficial for every body to not to mess with different version and setup environment and directly focus on the content, and second would be very helpful and added value to this course to look a little bit into KZbin, your course is good and gives basic knowledge and idea and there is some cool projects like traffic monitoring and counting,distance measurement, vr keyboard,face swap........ all tremendously put on the content value thanks in advanced
@karthikeyan-of9cu
@karthikeyan-of9cu 6 жыл бұрын
I tried with Windows (haar training) but output of XML is not working with python. what software you are using for haar training
@MohMayaDetoxing
@MohMayaDetoxing 11 жыл бұрын
Could you also publish the training tutorial for latentSVM?
@brc0520
@brc0520 8 жыл бұрын
For the positive samples. will the background of the object affects the result? Does it mean that we have to keep the object as tight as possible within the square bounding box to increase accuracy?
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Brian Chow Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Brian Chow Thank you for your patience. We have received an update from the author for your query which is mentioned below: “Correct. The best is to use as many real images as you can, and as varied as possible. The more varied images you have, with different backgrounds, the better the training should be. Think of it this way, the algorithm will learn that the background is not an important feature of the class if it is changing all the time, so it will try to ignore it.” We hope this helps. Best Regards, Packt Publishing.
@wardells.6739
@wardells.6739 10 жыл бұрын
Does anyone know a good guide for judging how many iterations and positive samples an experimenter would need judging on the complexity of a image.
@andresarango2331
@andresarango2331 8 жыл бұрын
HI, I compiled the code and all found good, I tested with different images but always is the blue rectangle. Always. Can you help me?
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Andres Arango Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@philippepangestu8321
@philippepangestu8321 8 жыл бұрын
I get this error when trying to train it Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Philippe Pangestu Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@hanngrcee
@hanngrcee 7 жыл бұрын
Train dataset for temp stage can not be filled. Branch training terminated
@austinfenne428
@austinfenne428 8 жыл бұрын
how many pictures would you need if you wanted to detect object in a sphere instead of just looking at the side of the car.
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Austin Fenne Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Austin Fenne Thank you for your patience. We have received an update from the author for your query which is mentioned below: “This type of object detection in particular only works in 2D. This means that if you want to detect an object in different views, like a side view, front view, etc, you will need to train different models; one for each sufficiently different view. The alternative here would be to use 3D object recognition, which tries to learn the 3D structure of the object instead of the 2D view, but you would need to have the 3D data in the first place, and it is a more difficult problem. Basically, to answer your question, divide the object into different views, such as frontal, side, back, etc, and train an independent model for each one of them. Then, if you detect any of them, you detected the object.” We hope this helps. Best Regards, Packt Publishing.
@stuartfarmer2890
@stuartfarmer2890 9 жыл бұрын
Why do you generate a vec file width and height of 48 x 24 but you specify the size of your images as 100 x 40?
@SpongeWarlock
@SpongeWarlock 8 жыл бұрын
+Stuart Farmer I think it only needs the small size, because such kind of algorithm will detect is there 48 x 24 car. And then resize the picture into a smaller one and detect 48x24car. And then resize the picture again and agian. After that, you will detect each size of cars.
@darshanbaburajan6912
@darshanbaburajan6912 8 жыл бұрын
I am getting the below error. I used the same code as shown in the video ===== TRAINING 0-stage =====
@philippepangestu8321
@philippepangestu8321 8 жыл бұрын
+Darshan Baburajan Have you found a solution to this?
@jayakrishnaalapati
@jayakrishnaalapati 8 жыл бұрын
Training algorithm was able to read your Positive examples, and so you see "POS count : ...". In your case, training algorithm fails to read Negative examples. Mostly it has to do with 'paths' in the bg.txt. Suggestion, try using complete path, say "C:\users\ .... egative_eample_01.jpg" for windows. same suggestion goes for linux users.
@kabbajkaoutar7829
@kabbajkaoutar7829 7 жыл бұрын
it's an error concerning numPos value. you should calculate it by this equation that help you to estimate the number of samples on vec file: vec-file has to contain : >= (numPos+(numStages-1)*(1-minHitRate)* umPos)+S. Where S is numNeg.
@CameronChristiansenCan
@CameronChristiansenCan 9 жыл бұрын
Can you share your cardetect.cpp code? I'd like to see what you do it test it so easily
@husseinalaa47
@husseinalaa47 9 жыл бұрын
i did the same steps but it stopped at stage 5. why is that?
@MrCool7225
@MrCool7225 9 жыл бұрын
the tutorial was great...can anyone share your detection code ....i find a problem with my detection code in python....
@matteogennari6217
@matteogennari6217 9 жыл бұрын
can i do this for lbph?
@BenBotto
@BenBotto 5 жыл бұрын
Very cool. Thank you for the tutorial!
@irfansalimi1160
@irfansalimi1160 7 жыл бұрын
Sir, can you please provide me with the source code of object detection? Thanks
@turquoise8064
@turquoise8064 4 жыл бұрын
Great job bro thank you very much!!
@WeAreSuiteR
@WeAreSuiteR 8 жыл бұрын
should background (negative) files be same size as positive files?
@Soulless0815
@Soulless0815 7 жыл бұрын
does not need to be the same size, the algorithm takes its own samples out of your background pictures, if you have big pictures you can also choose the number of negatives higher than your actual picture ammount as the samples will be much smaller than your pictures there can be created multiple ones out of one picture
@CezarGobbo
@CezarGobbo 8 жыл бұрын
I followed your tutorial but seems like my xml generated is in wrong format. Im using detectMultiScale in my algorithm but it is not recognizing the xml. Can someone help me? tnx
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Cezar Gobbo Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Cezar Gobbo Thank you for your patience. We have received an update from the author for your query which is mentioned below: “Maybe there is a mistake in the file path, or the training didn't finish correctly. Try repeating the tutorial step by step carefully, and it should work. ”. We hope this helps. Best Regards, Packt Publishing.
@Soulless0815
@Soulless0815 7 жыл бұрын
if you use haar features instead of LBP there is a paramter called -baseFormatSave, you can set it true and retrain your cascade
@atineshs
@atineshs 6 жыл бұрын
Thanks for the tutorials, was very helpful
@ravaldhrushit799
@ravaldhrushit799 9 жыл бұрын
how can i solve parse error it says : " parse errorDone. Created 0 samples"
@marcelochong4065
@marcelochong4065 10 жыл бұрын
I follow the instructions and try. (I am using OPENCV 3.0 alpha) but it doesnt work When I detect it with the cascade.xml the blue rect is always draw on the middle of the photo, doesnt match the car Is anyone encounter the same result like mine ?
@vishanthbharadwaj
@vishanthbharadwaj 10 жыл бұрын
Use Opencv 2.9.4 it's stable you wont get errors
@aurinonew
@aurinonew 8 жыл бұрын
where i can find the cardetect.cpp that you use when you finish the proccess
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+ augusto uricochea This playlist/video has been uploaded for marketing purposes and contains only introductory videos. To purchase the entire video course, please visit the direct link: www.packtpub.com/application-development/opencv-computer-vision-application-programming-video The codes are free to download once you sign up on our website, please visit the ‘Support’ section: www.packtpub.com/books/content/support Once the file is downloaded and if it is in .html you will need to rename the file to .zip and then unzip or extract using the latest version of: • Winrar / 7zip for Windows • Zipeg / iZip / Unrarx for Mac • 7-zip / Peazip for Linux The above mentioned applications support all extension files. If you still need help, you can email us at ‘customercare@packtpub.com’ and we will help you further with it.
@youhou90
@youhou90 7 жыл бұрын
lemme tell you something, there is like alot of tutorials with easy steps personnelly i wouldnt pay for something that can be free
@anupamyedida5484
@anupamyedida5484 8 жыл бұрын
How do I create the positive images description file ? Can you please help me out ?
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Anupam Yedida Thank you for your query. We appreciate your interests in our videos. We will look into your query and get back to you with a solution shortly. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Anupam Yedida Thank you for your patience. We had contacted the author of this title for your query and this is what the author has to say about it: “You just need to generate a simple text file with the path to the images, the number of objects on each image, and the location of a bounding box of the object inside the image in pixel units. You can use a normal text editor, or you can create a simple script using bash, python, or any other language. You can even use a spreadsheet editor, it doesn't matter which tool you use.” We hope this information helps and happy learning.
@BenBotto
@BenBotto 5 жыл бұрын
Nowadays, use opencv_annotation.
@akutimestwo
@akutimestwo 8 жыл бұрын
Is there an easier way to create the .info file? I want to detect birds by using images that I found online, but it will take a long time to write down where all the birds are located in the pictures (800 total). Is there no way around this?
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Paul Narrea Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@akutimestwo
@akutimestwo 8 жыл бұрын
I know that there are scripts in python to get extract the image dimensions, except there idea is a bit convoluted. If it is just as effective to use the images entire dimension I would prefer to just do that, since I already cropped my images to only contain the information I want to train for. I appreciate the help!
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Paul Narrea Thank you for replying back to us. We are still looking into your query and will get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Paul Narrea Thank you for your patience. I have raised this query with the author. Once we get a reply from the author, I will get back to you. We appreciate your patience in this matter. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+Paul Narrea I appreciate your patience. I have received a reply from the author of this video for the below query raised by you and this is what the author has to say: “It would be more complicated to change the program that reads the file. Just provide the location of the object. If it's in the entire image, it will have to be the rectangle that covers the entire image. You can just create a simple script in any language, Python if you want, that reads all the images and outputs the image dimensions as text.” We hope this helps. Best Regards Packt Publishing
@duongphuoc9200
@duongphuoc9200 6 жыл бұрын
How do you make the cars.info?
@ErDeWu15
@ErDeWu15 9 жыл бұрын
That's what I was looking for! Great job and thank you very much (:
@ayakoyamaguchi6873
@ayakoyamaguchi6873 8 жыл бұрын
how much training time it takes to achieve an above 90% recognition accuracy ?
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+ayako yamaguchi Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+ayako yamaguchi Thank you for patience. I have received a reply from the author and this is what he has to say: The training time will depend on many different factors, such as the computer used, the number of images, the type of features, the complexity of the object, and so on, so it is not possible to give you an estimate. But, for real life application, where complex objects need to be trained, the training time can be days. You can always start with a simple training, save the file, and then gradually increase the complexity. We hope this helps. Best Regards Packt Publishing
@arizalzanuarrisqi11
@arizalzanuarrisqi11 6 жыл бұрын
how to create cars.info file ?
@eelay86
@eelay86 10 жыл бұрын
I followed your tutorial and have exactly the same images and everything. Your training finishes in seconds. I'm already waiting for half an hour and it is still at the Taining 0-Stage... Why is it so fast for you? I got a very high CPU load, so something is working. I use the latest Macbook Air from 2013.
@landlight
@landlight 10 жыл бұрын
he did said u will need a couple of weeks lol :D
@AnkitChandra
@AnkitChandra 10 жыл бұрын
very nicely done!
@ayakoyamaguchi6873
@ayakoyamaguchi6873 8 жыл бұрын
I have an urgent question: Since all car images in your training set have constant size: (100X40) , will your car detector be able to recognize a car with much larger or much smaller size?
@unoakaso
@unoakaso 8 жыл бұрын
+ayako yamaguchi scale your image to (100x40)
@ayakoyamaguchi6873
@ayakoyamaguchi6873 8 жыл бұрын
+Lorenzo Berlincioni Scaling the image to (100x40) can not guarantee that the bonding box of the car is also scaled to (100x400). Since a car might be only a small portion of the entire image. A robust object detector should be scaling invarant。
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+ayako yamaguchi Thank you for your query. We will look into this and get back to you with a solution shortly. We appreciate your patience in this matter. Best Regards Packt Publishing
@unoakaso
@unoakaso 8 жыл бұрын
Got it. I don't know much about cv but maybe this can help docs.opencv.org/3.1.0/dc/dff/tutorial_py_pyramids.html
@OfficialPackt
@OfficialPackt 8 жыл бұрын
+ayako yamaguchi Thank you for patience. I have received a reply from the author and this is what he has to say: This means that you have a problem in the images path. Double check the path of the background images in particular. Have a look here: answers.opencv.org/question/10872/cascade-training-error-opencv-244-train-dataset-for-temp-stage-can-not-filled-branch-training-terminated-cascade-classifier-cant-be-trained-check-the/ We hope this helps. Best Regards Packt Publishing
@yohanweerasinghe5182
@yohanweerasinghe5182 10 жыл бұрын
How your training finished within seconds?
@sergiomartinipopoli5913
@sergiomartinipopoli5913 10 жыл бұрын
I think he stopped it
@yohanweerasinghe5182
@yohanweerasinghe5182 10 жыл бұрын
hmm..Yeah
@yohanweerasinghe5182
@yohanweerasinghe5182 10 жыл бұрын
Sergio Martini Popoli hmm..yeah..
@ZirJo
@ZirJo 10 жыл бұрын
Yohan Weerasinghe I mean, he stopped it because he had it already trained somewhere else. He sayd that it takes something like 2 hours to train.
@yohanweerasinghe5182
@yohanweerasinghe5182 10 жыл бұрын
ZirJo 2 hours is pretty quick you know! wow, what could be his RAM? maybe 8GB?
@freddyb9619
@freddyb9619 5 жыл бұрын
Hello, people. I have 800 positive images and 500 negatives. I'm able to create the bg.txt with a batch file (.bat) with the following lines dir /b *.jpg >bg.txt. With a double click of this, the list is created instantly. For the positives, I want to also create the positive image file referred in the video with data of the number of objects (in my case is always one), the coordinates x and y (always 0,0 because the object takes the whole image), plus the width and height (the maximum of each image because the object is the whole image). I will use the Cascade on OpenCV with Python. What have you tried? Any comments, suggestions.
@rodrigoloza4263
@rodrigoloza4263 9 жыл бұрын
Has anybody gotten to stage 19 and has seen that the training stops there, i left the computer 5 days but still nothing. The computer is a i7 of 16 gb of ram so...
@rodrigoloza4263
@rodrigoloza4263 9 жыл бұрын
Rodrigo Loza Lucero wait i guess it is because of the size of the data
@rodrigoloza4263
@rodrigoloza4263 9 жыл бұрын
***** i think i found the answer. It is because it cannot find any more negative samples, therefore, it stops.
@rodrigoloza4263
@rodrigoloza4263 9 жыл бұрын
***** oh thank you my friend. Have you tried it? Share me the results when possible please. I will catch up when i have some free time
@jayakrishnaalapati
@jayakrishnaalapati 8 жыл бұрын
The reason you found out is correct one. If want you are experimenting with small data set I suggest to use stage count 8 to 15. You need to have very large false example if you are going for stage 19.
@SonNguyenVirgo
@SonNguyenVirgo 7 жыл бұрын
This is for object detector. How about gender classification?
@leaoaugusto
@leaoaugusto 6 жыл бұрын
Every day the left create a new gender type! lol
@jibinjohn8263
@jibinjohn8263 6 жыл бұрын
i wrote a simple python script for generating .info file
@shwetalalwani9525
@shwetalalwani9525 5 жыл бұрын
can you share the script ?
@saider895
@saider895 6 жыл бұрын
how do you even create the cars.info file? please either provide complete details or don't make an incomplete video at all.
@Faux-King
@Faux-King 6 жыл бұрын
look into opencv_annotation to craete the cars.info.. creating the bg.txt is manual... i was able to quickly generate a txt file using python.
@StarringKevin
@StarringKevin 6 жыл бұрын
It's not that difficult really. He mentioned that in the positive images, the cars are covered in full width and height of the image. It's just a matter of creating a little bash script or some sort to generate the cars.info file. 1 0 0 .
@suolongdong994
@suolongdong994 10 жыл бұрын
really helpful
@jhonintriago9257
@jhonintriago9257 8 жыл бұрын
Thanks!
@bhupendrasingh59
@bhupendrasingh59 10 жыл бұрын
thanks a lot...
@scientistgeospatial
@scientistgeospatial 8 жыл бұрын
Thanks
@adityapaithon6499
@adityapaithon6499 6 жыл бұрын
Best tutorial to easily make your own Haar Cascade : kzbin.info/www/bejne/r5W2iZp4j5asmM0
@Zhak7
@Zhak7 3 жыл бұрын
Hello, how do you build the opencv_createsamples command ?
Training a Cascade Classifier - OpenCV Object Detection in Games #8
32:29
Learn Code By Gaming
Рет қаралды 155 М.
Object Tracking from scratch with OpenCV and Python
1:00:13
Pysource
Рет қаралды 261 М.
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 1,6 МЛН
Человек паук уже не тот
00:32
Miracle
Рет қаралды 4 МЛН
Maps - Part 1
22:24
Professor Lupoli
Рет қаралды 46
CUSTOM HAARCASCADE - Data Collection And Training Process Made Easy [10]
15:06
Murtaza's Workshop - Robotics and AI
Рет қаралды 86 М.
I tried to make a Valorant AI using computer vision
19:23
River's Educational Channel
Рет қаралды 1,5 МЛН