Comments (15)
Dear @johnd3v !
Can you get your result?
I still waiting for the author...he do not reply my question!
:( :( :(
from opencv-haar-classifier-training.
@johnd3v
I hope it's not too late. I had the same issue as you do. It was an OpenCV bug. I was working with a newer version of OpenCV (3.4.1). The code works when I use it with OpenCV version 3.2.0.
No files were generated because a segmentation fault was thrown by opencv_createsamples.
Hope this helps.
The issue can be closed.
from opencv-haar-classifier-training.
Dear @johnd3v !
naotoshio seo explained this mechanism in creating samples. how means, vector samples are images which include positives in negative background images.
so, it all depends on your object how complex it is and whether +ve images needed more or -ve images needed more to generate the .vec files.
i got this error many times while creating samples using createsamples.pl file at that time i change the ratio of +ves and -ves then it will work fine.
and one noticeable point is here size also matters because if positive image is having more resolution than -ve image then it cant be impose its features on -ve background. so its good if all images having same size.
but one thing disappointing me is i haven't get exact information on this! till searching for this..........
from opencv-haar-classifier-training.
hi man. what did you do to have vec files in perl bin/createsample.bin
. i have try the code yet not creating any file in samples forlder
from opencv-haar-classifier-training.
Dear @johnd3v !
I do as the guide in this repository:
Step 5
perl bin/createsamples.pl positives.txt negatives.txt samples 1500\
"opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1\
-maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40"
Which error occured with you?
from opencv-haar-classifier-training.
@lyhoangnam-archway thanks for the reply.
i got only this sir.
no file created in sample folder
from opencv-haar-classifier-training.
Dear @johnd3v !
It did not throw any error, I think that all seem to be done
Try next step(number 6). I think so!
from opencv-haar-classifier-training.
@lyhoangnam-archway thanks for the reply.
i tried step6 yet this is the result.
badly need to create my own classifier for my last year research
from opencv-haar-classifier-training.
@lyhoangnam-archway !
There were 1 params.xml file and 9 stage.xml file
I wonder where is the finished_classifier.xml ?
because classifier achieved the accuracy in training the .vec files at the stage of 9th. please look this image.
f you want to convert an intermediate haartraining output dir tree data into a xml file, there is a software at the OpenCV/samples/c/convert_cascade.c (that is, in your installation directory). Compile it.
how to compile ? -->> https://www.learnopencv.com/how-to-compile-opencv-sample-code/
so, you can create the cascade.xml file using this command
$ convert_cascade --size="<sample_width>x<sampe_height>" <haartraining_ouput_dir> <ouput_file>
example : convert_cascade --size="20x20" classifier haarcascade.xml
from opencv-haar-classifier-training.
Dear @saideepthik !
It means that I have to manually merge all stage.xml file to finished_classifier.xml
I think that this tool will do all of this step...
from opencv-haar-classifier-training.
@lyhoangnam-archway
"I have to manually merge all stage.xml file to finished_classifier.xml
I think that this tool will do all of this step..."
for this, actually say no need to do manually just give less number of stages while training or else give more positives and negatives do same from first step (delete .vec files in samples folder then do) you will get cascade.xml file
from opencv-haar-classifier-training.
i already run
perl bin/createsamples.pl positives.txt negatives.txt samples 1500
"opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1
-maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40"
but there is no sample.vec created, anyone can help me ?
from opencv-haar-classifier-training.
@saideepthik
how to change the image ratio ? can you help my problem ?
from opencv-haar-classifier-training.
@arizalzr
Ratio in the sense increase or decrease the number of input images (positive images and negative images) for the training.
check while testing the image detection whether r u getting more false positives or not, if getting false positives means just take (save as images ) those false positives give as negative images and train the same.
observable thing is sometime u need to give more appropriate positive images (depends on how complicated is your object to be detected) it will give good results.
try u will get...........
from opencv-haar-classifier-training.
@saideepthik
why after run this :
perl bin/createsamples.pl positives.txt negatives.txt samples 1500 "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1
-maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40"
there is no sample.vec created ? can you help me to solve this ?
from opencv-haar-classifier-training.
Related Issues (20)
- hi, i'm getting like this while creating my own harr-cascade classifier, please let me correct if anything wrong, and please tell the reason for why classifier cant be trained? and thanks in advance HOT 3
- Illegal division by zero at bin/createsamples.pl line 45. HOT 3
- OpenCV error : Bad Arguement - Can not get new Positive Sample
- no vec files
- unable to create .vec files with create samples file HOT 1
- how createsamples.pl will works? HOT 1
- Error when create samples HOT 1
- Cannot create sample.vec HOT 14
- opencv_createsamples not creating anything inside the 'samples' folder HOT 1
- not able to create final classifier HOT 1
- File not found - '*.jpg' HOT 1
- Please Help
- std::logic_error
- opencv error assertion failed
- sh: 1: Syntax error: Unterminated quoted string HOT 1
- opencv_traincascade assertion error HOT 2
- vec files can't be created HOT 1
- mergevec.py error
- 'opencv_createsamples' is not recognized as an internal or external command, HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv-haar-classifier-training.