Comments (5)
Which version of OpenCV are you using?
from opencv-haar-classifier-training.
Opencv 2.4.8
from opencv-haar-classifier-training.
I'm sorry to say, I don't have any idea. This looks good to me. The only thing I can recommend is reading through the remarks of the original author of opencv_createsamples.pl
from opencv-haar-classifier-training.
Try setting right chmod
to samples
folder.
Also this one liner is easier to use: perl bin/createsamples.pl positives.txt negatives.txt samples 1700 "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 24 -h 24"
from opencv-haar-classifier-training.
Hello, Iām trying to follow your tutorial to create Haar cascade Training Files but at the step 5, it create 19 .vec files, but their are all empty (0 byte) so the step 6 fail.
I have 20 positive photos and 100 negative photos, all with 4160 x 2340 pixels, so my -w and -h are 128 and 72 (same ratio). All the steps have been done on a linux virtual machine.I hope you can help my find the problem.
The command:
perl bin/createsamples.pl positives.txt negatives.txt samples 400 "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1\ -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72"
The log:
opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234350.jpg -bg tmp -vec samples/20161122_234350.jpg.vec -num 22 Info file name: (NULL) Img file name: ./positive_images/20161122_234350.jpg Vec file name: samples/20161122_234350.jpg.vec BG file name: tmp Num: 22 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234654.jpg -bg tmp -vec samples/20161122_234654.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234654.jpg Vec file name: samples/20161122_234654.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234418.jpg -bg tmp -vec samples/20161122_234418.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234418.jpg Vec file name: samples/20161122_234418.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234423.jpg -bg tmp -vec samples/20161122_234423.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234423.jpg Vec file name: samples/20161122_234423.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234305.jpg -bg tmp -vec samples/20161122_234305.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234305.jpg Vec file name: samples/20161122_234305.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234313.jpg -bg tmp -vec samples/20161122_234313.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234313.jpg Vec file name: samples/20161122_234313.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234432.jpg -bg tmp -vec samples/20161122_234432.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234432.jpg Vec file name: samples/20161122_234432.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234219.jpg -bg tmp -vec samples/20161122_234219.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234219.jpg Vec file name: samples/20161122_234219.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234244.jpg -bg tmp -vec samples/20161122_234244.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234244.jpg Vec file name: samples/20161122_234244.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234024.jpg -bg tmp -vec samples/20161122_234024.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234024.jpg Vec file name: samples/20161122_234024.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234659.jpg -bg tmp -vec samples/20161122_234659.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234659.jpg Vec file name: samples/20161122_234659.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234255.jpg -bg tmp -vec samples/20161122_234255.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234255.jpg Vec file name: samples/20161122_234255.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234335.jpg -bg tmp -vec samples/20161122_234335.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234335.jpg Vec file name: samples/20161122_234335.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234633.jpg -bg tmp -vec samples/20161122_234633.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234633.jpg Vec file name: samples/20161122_234633.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234339.jpg -bg tmp -vec samples/20161122_234339.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234339.jpg Vec file name: samples/20161122_234339.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234012.jpg -bg tmp -vec samples/20161122_234012.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234012.jpg Vec file name: samples/20161122_234012.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234021.jpg -bg tmp -vec samples/20161122_234021.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234021.jpg Vec file name: samples/20161122_234021.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234456.jpg -bg tmp -vec samples/20161122_234456.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234456.jpg Vec file name: samples/20161122_234456.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions... opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 128 -h 72 -img ./positive_images/20161122_234035.jpg -bg tmp -vec samples/20161122_234035.jpg.vec -num 21 Info file name: (NULL) Img file name: ./positive_images/20161122_234035.jpg Vec file name: samples/20161122_234035.jpg.vec BG file name: tmp Num: 21 BG color: 0 BG threshold: 0 Invert: FALSE Max intensity deviation: 40 Max x angle: 1.1 Max y angle: 1.1 Max z angle: 0.5 Show samples: FALSE Width: 128 Height: 72 Create training samples from single image applying distortions...
were you able to solve this issue, if yes, please help me
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
- Can not see finished_classifier.xml file HOT 15
- 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.