Ajout des tests sur HaarCascade
This commit is contained in:
parent
406e6d9b5d
commit
5ea3bd93c8
54 changed files with 8111 additions and 1 deletions
25
ongoing/HaarCascade_tests/LICENSE
Normal file
25
ongoing/HaarCascade_tests/LICENSE
Normal file
|
@ -0,0 +1,25 @@
|
|||
`createsamples.pl`: Copyright (c) 2008, Naotoshi Seo
|
||||
From: https://code.google.com/p/tutorial-haartraining/
|
||||
`mergevec.py`: Copyright (c) 2014, Blake Wulfe
|
||||
From: https://github.com/wulfebw/mergevec
|
||||
|
||||
Copyright (c) 2013, Thorsten Ball. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
119
ongoing/HaarCascade_tests/README.md
Normal file
119
ongoing/HaarCascade_tests/README.md
Normal file
|
@ -0,0 +1,119 @@
|
|||
# Train your own OpenCV Haar classifier
|
||||
|
||||
**Important**: This guide assumes you work with OpenCV 2.4.x. Since I no longer work with OpenCV, and don't have the time to keep up with changes and fixes, this guide is **unmaintained**. Pull requests will be merged of course, and if someone else wants commit access, feel free to ask!
|
||||
|
||||
This repository aims to provide tools and information on training your own
|
||||
OpenCV Haar classifier. Use it in conjunction with this blog post: [Train your own OpenCV Haar
|
||||
classifier](http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html).
|
||||
|
||||
|
||||
|
||||
## Instructions
|
||||
|
||||
1. Install OpenCV & get OpenCV source
|
||||
|
||||
brew tap homebrew/science
|
||||
brew install --with-tbb opencv
|
||||
wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.9/opencv-2.4.9.zip
|
||||
unzip opencv-2.4.9.zip
|
||||
|
||||
2. Clone this repository
|
||||
|
||||
git clone https://github.com/mrnugget/opencv-haar-classifier-training
|
||||
|
||||
3. Put your positive images in the `./positive_images` folder and create a list
|
||||
of them:
|
||||
|
||||
find ./positive_images -iname "*.jpg" > positives.txt
|
||||
|
||||
4. Put the negative images in the `./negative_images` folder and create a list of them:
|
||||
|
||||
find ./negative_images -iname "*.jpg" > negatives.txt
|
||||
|
||||
5. Create positive samples with the `bin/createsamples.pl` script and save them
|
||||
to the `./samples` folder:
|
||||
|
||||
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"
|
||||
|
||||
6. Use `tools/mergevec.py` to merge the samples in `./samples` into one file:
|
||||
|
||||
python ./tools/mergevec.py -v samples/ -o samples.vec
|
||||
|
||||
Note: If you get the error `struct.error: unpack requires a string argument of length 12`
|
||||
then go into your **samples** directory and delete all files of length 0.
|
||||
|
||||
7. Start training the classifier with `opencv_traincascade`, which comes with
|
||||
OpenCV, and save the results to `./classifier`:
|
||||
|
||||
opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt\
|
||||
-numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000\
|
||||
-numNeg 600 -w 80 -h 40 -mode ALL -precalcValBufSize 1024\
|
||||
-precalcIdxBufSize 1024
|
||||
|
||||
If you want to train it faster, configure feature type option with LBP:
|
||||
|
||||
opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt\
|
||||
-numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 1000\
|
||||
-numNeg 600 -w 80 -h 40 -mode ALL -precalcValBufSize 1024\
|
||||
-precalcIdxBufSize 1024 -featureType LBP
|
||||
|
||||
After starting the training program it will print back its parameters and then start training. Each stage will print out some analysis as it is trained:
|
||||
|
||||
```
|
||||
===== TRAINING 0-stage =====
|
||||
<BEGIN
|
||||
POS count : consumed 1000 : 1000
|
||||
NEG count : acceptanceRatio 600 : 1
|
||||
Precalculation time: 11
|
||||
+----+---------+---------+
|
||||
| N | HR | FA |
|
||||
+----+---------+---------+
|
||||
| 1| 1| 1|
|
||||
+----+---------+---------+
|
||||
| 2| 1| 1|
|
||||
+----+---------+---------+
|
||||
| 3| 1| 1|
|
||||
+----+---------+---------+
|
||||
| 4| 1| 1|
|
||||
+----+---------+---------+
|
||||
| 5| 1| 1|
|
||||
+----+---------+---------+
|
||||
| 6| 1| 1|
|
||||
+----+---------+---------+
|
||||
| 7| 1| 0.711667|
|
||||
+----+---------+---------+
|
||||
| 8| 1| 0.54|
|
||||
+----+---------+---------+
|
||||
| 9| 1| 0.305|
|
||||
+----+---------+---------+
|
||||
END>
|
||||
Training until now has taken 0 days 3 hours 19 minutes 16 seconds.
|
||||
```
|
||||
|
||||
Each row represents a feature that is being trained and contains some output about its HitRatio and FalseAlarm ratio. If a training stage only selects a few features (e.g. N = 2) then its possible something is wrong with your training data.
|
||||
|
||||
At the end of each stage the classifier is saved to a file and the process can be stopped and restarted. This is useful if you are tweaking a machine/settings to optimize training speed.
|
||||
|
||||
8. Wait until the process is finished (which takes a long time — a couple of days probably, depending on the computer you have and how big your images are).
|
||||
|
||||
9. Use your finished classifier!
|
||||
|
||||
cd ~/opencv-2.4.9/samples/c
|
||||
chmod +x build_all.sh
|
||||
./build_all.sh
|
||||
./facedetect --cascade="~/finished_classifier.xml"
|
||||
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
A huge thanks goes to Naotoshi Seo, who wrote the `mergevec.cpp` and
|
||||
`createsamples.cpp` tools and released them under the MIT licencse. His notes
|
||||
on OpenCV Haar training were a huge help. Thank you, Naotoshi!
|
||||
|
||||
## References & Links:
|
||||
|
||||
- [Naotoshi Seo - Tutorial: OpenCV haartraining (Rapid Object Detection With A Cascade of Boosted Classifiers Based on Haar-like Features)](http://note.sonots.com/SciSoftware/haartraining.html)
|
||||
- [Material for Naotoshi Seo's tutorial](https://code.google.com/p/tutorial-haartraining/)
|
||||
- [OpenCV Documentation - Cascade Classifier Training](http://docs.opencv.org/doc/user_guide/ug_traincascade.html)
|
243
ongoing/HaarCascade_tests/bin/createsamples.cpp
~
Normal file
243
ongoing/HaarCascade_tests/bin/createsamples.cpp
~
Normal file
|
@ -0,0 +1,243 @@
|
|||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// Intel License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000, Intel Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// * The name of Intel Corporation may not be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// This software is provided by the copyright holders and contributors "as is" and
|
||||
// any express or implied warranties, including, but not limited to, the implied
|
||||
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
||||
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
||||
// indirect, incidental, special, exemplary, or consequential damages
|
||||
// (including, but not limited to, procurement of substitute goods or services;
|
||||
// loss of use, data, or profits; or business interruption) however caused
|
||||
// and on any theory of liability, whether in contract, strict liability,
|
||||
// or tort (including negligence or otherwise) arising in any way out of
|
||||
// the use of this software, even if advised of the possibility of such damage.
|
||||
//
|
||||
//M*/
|
||||
|
||||
/*
|
||||
* createsamples.cpp
|
||||
*
|
||||
* Create test/training samples
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <cvhaartraining.h>
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
srand(time(NULL));
|
||||
int i = 0;
|
||||
char* nullname = "(NULL)";
|
||||
char* vecname = NULL; /* .vec file name */
|
||||
char* infoname = NULL; /* file name with marked up image descriptions */
|
||||
char* imagename = NULL; /* single sample image */
|
||||
char* bgfilename = NULL; /* background */
|
||||
int num = 1000;
|
||||
int bgcolor = 0;
|
||||
int bgthreshold = 80;
|
||||
int invert = 0;
|
||||
int maxintensitydev = 40;
|
||||
double maxxangle = 1.1;
|
||||
double maxyangle = 1.1;
|
||||
double maxzangle = 0.5;
|
||||
int showsamples = 0;
|
||||
/* the samples are adjusted to this scale in the sample preview window */
|
||||
double scale = 4.0;
|
||||
int width = 24;
|
||||
int height = 24;
|
||||
|
||||
if( argc == 1 )
|
||||
{
|
||||
printf( "Usage: %s\n [-info <collection_file_name>]\n"
|
||||
" [-img <image_file_name>]\n"
|
||||
" [-vec <vec_file_name>]\n"
|
||||
" [-bg <background_file_name>]\n [-num <number_of_samples = %d>]\n"
|
||||
" [-bgcolor <background_color = %d>]\n"
|
||||
" [-inv] [-randinv] [-bgthresh <background_color_threshold = %d>]\n"
|
||||
" [-maxidev <max_intensity_deviation = %d>]\n"
|
||||
" [-maxxangle <max_x_rotation_angle = %f>]\n"
|
||||
" [-maxyangle <max_y_rotation_angle = %f>]\n"
|
||||
" [-maxzangle <max_z_rotation_angle = %f>]\n"
|
||||
" [-show [<scale = %f>]]\n"
|
||||
" [-w <sample_width = %d>]\n [-h <sample_height = %d>]\n",
|
||||
argv[0], num, bgcolor, bgthreshold, maxintensitydev,
|
||||
maxxangle, maxyangle, maxzangle, scale, width, height );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for( i = 1; i < argc; ++i )
|
||||
{
|
||||
if( !strcmp( argv[i], "-info" ) )
|
||||
{
|
||||
infoname = argv[++i];
|
||||
}
|
||||
else if( !strcmp( argv[i], "-img" ) )
|
||||
{
|
||||
imagename = argv[++i];
|
||||
}
|
||||
else if( !strcmp( argv[i], "-vec" ) )
|
||||
{
|
||||
vecname = argv[++i];
|
||||
}
|
||||
else if( !strcmp( argv[i], "-bg" ) )
|
||||
{
|
||||
bgfilename = argv[++i];
|
||||
}
|
||||
else if( !strcmp( argv[i], "-num" ) )
|
||||
{
|
||||
num = atoi( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-bgcolor" ) )
|
||||
{
|
||||
bgcolor = atoi( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-bgthresh" ) )
|
||||
{
|
||||
bgthreshold = atoi( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-inv" ) )
|
||||
{
|
||||
invert = 1;
|
||||
}
|
||||
else if( !strcmp( argv[i], "-randinv" ) )
|
||||
{
|
||||
invert = CV_RANDOM_INVERT;
|
||||
}
|
||||
else if( !strcmp( argv[i], "-maxidev" ) )
|
||||
{
|
||||
maxintensitydev = atoi( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-maxxangle" ) )
|
||||
{
|
||||
maxxangle = atof( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-maxyangle" ) )
|
||||
{
|
||||
maxyangle = atof( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-maxzangle" ) )
|
||||
{
|
||||
maxzangle = atof( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-show" ) )
|
||||
{
|
||||
showsamples = 1;
|
||||
if( i+1 < argc && strlen( argv[i+1] ) > 0 && argv[i+1][0] != '-' )
|
||||
{
|
||||
double d;
|
||||
d = strtod( argv[i+1], 0 );
|
||||
if( d != -HUGE_VAL && d != HUGE_VAL && d > 0 ) scale = d;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
else if( !strcmp( argv[i], "-w" ) )
|
||||
{
|
||||
width = atoi( argv[++i] );
|
||||
}
|
||||
else if( !strcmp( argv[i], "-h" ) )
|
||||
{
|
||||
height = atoi( argv[++i] );
|
||||
}
|
||||
}
|
||||
|
||||
printf( "Info file name: %s\n", ((infoname == NULL) ? nullname : infoname ) );
|
||||
printf( "Img file name: %s\n", ((imagename == NULL) ? nullname : imagename ) );
|
||||
printf( "Vec file name: %s\n", ((vecname == NULL) ? nullname : vecname ) );
|
||||
printf( "BG file name: %s\n", ((bgfilename == NULL) ? nullname : bgfilename ) );
|
||||
printf( "Num: %d\n", num );
|
||||
printf( "BG color: %d\n", bgcolor );
|
||||
printf( "BG threshold: %d\n", bgthreshold );
|
||||
printf( "Invert: %s\n", (invert == CV_RANDOM_INVERT) ? "RANDOM"
|
||||
: ( (invert) ? "TRUE" : "FALSE" ) );
|
||||
printf( "Max intensity deviation: %d\n", maxintensitydev );
|
||||
printf( "Max x angle: %g\n", maxxangle );
|
||||
printf( "Max y angle: %g\n", maxyangle );
|
||||
printf( "Max z angle: %g\n", maxzangle );
|
||||
printf( "Show samples: %s\n", (showsamples) ? "TRUE" : "FALSE" );
|
||||
if( showsamples )
|
||||
{
|
||||
printf( "Scale: %g\n", scale );
|
||||
}
|
||||
printf( "Width: %d\n", width );
|
||||
printf( "Height: %d\n", height );
|
||||
|
||||
/* determine action */
|
||||
if( imagename && vecname )
|
||||
{
|
||||
printf( "Create training samples from single image applying distortions...\n" );
|
||||
|
||||
cvCreateTrainingSamples( vecname, imagename, bgcolor, bgthreshold, bgfilename,
|
||||
num, invert, maxintensitydev,
|
||||
maxxangle, maxyangle, maxzangle,
|
||||
showsamples, width, height );
|
||||
|
||||
printf( "Done\n" );
|
||||
}
|
||||
else if( imagename && bgfilename && infoname )
|
||||
{
|
||||
printf( "Create test samples from single image applying distortions...\n" );
|
||||
|
||||
cvCreateTestSamples( infoname, imagename, bgcolor, bgthreshold, bgfilename, num,
|
||||
invert, maxintensitydev,
|
||||
maxxangle, maxyangle, maxzangle, showsamples, width, height );
|
||||
|
||||
printf( "Done\n" );
|
||||
}
|
||||
else if( infoname && vecname )
|
||||
{
|
||||
int total;
|
||||
|
||||
printf( "Create training samples from images collection...\n" );
|
||||
|
||||
total = cvCreateTrainingSamplesFromInfo( infoname, vecname, num, showsamples,
|
||||
width, height );
|
||||
|
||||
printf( "Done. Created %d samples\n", total );
|
||||
}
|
||||
else if( vecname )
|
||||
{
|
||||
printf( "View samples from vec file (press ESC to exit)...\n" );
|
||||
|
||||
cvShowVecSamples( vecname, width, height, scale );
|
||||
|
||||
printf( "Done\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "Nothing to do\n" );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
79
ongoing/HaarCascade_tests/bin/createsamples.pl
Executable file
79
ongoing/HaarCascade_tests/bin/createsamples.pl
Executable file
|
@ -0,0 +1,79 @@
|
|||
#!/usr/bin/perl
|
||||
use File::Basename;
|
||||
use strict;
|
||||
##########################################################################
|
||||
# Create samples from an image applying distortions repeatedly
|
||||
# (create many many samples from many images applying distortions)
|
||||
#
|
||||
# perl createtrainsamples.pl <positives.dat> <negatives.dat> <vec_output_dir>
|
||||
# [<totalnum = 7000>] [<createsample_command_options = ./createsamples -w 20 -h 20...>]
|
||||
# ex) perl createtrainsamples.pl positives.dat negatives.dat samples
|
||||
#
|
||||
# Author: Naotoshi Seo
|
||||
# Date : 09/12/2008 Add <totalnum> and <createsample_command_options> options
|
||||
# Date : 06/02/2007
|
||||
# Date : 03/12/2006
|
||||
#########################################################################
|
||||
my $cmd = './createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 20 -h 20';
|
||||
my $totalnum = 7000;
|
||||
my $tmpfile = 'tmp';
|
||||
|
||||
if ($#ARGV < 2) {
|
||||
print "Usage: perl createtrainsamples.pl\n";
|
||||
print " <positives_collection_filename>\n";
|
||||
print " <negatives_collection_filename>\n";
|
||||
print " <output_dirname>\n";
|
||||
print " [<totalnum = " . $totalnum . ">]\n";
|
||||
print " [<createsample_command_options = '" . $cmd . "'>]\n";
|
||||
exit;
|
||||
}
|
||||
my $positive = $ARGV[0];
|
||||
my $negative = $ARGV[1];
|
||||
my $outputdir = $ARGV[2];
|
||||
$totalnum = $ARGV[3] if ($#ARGV > 2);
|
||||
$cmd = $ARGV[4] if ($#ARGV > 3);
|
||||
|
||||
open(POSITIVE, "< $positive");
|
||||
my @positives = <POSITIVE>;
|
||||
close(POSITIVE);
|
||||
|
||||
open(NEGATIVE, "< $negative");
|
||||
my @negatives = <NEGATIVE>;
|
||||
close(NEGATIVE);
|
||||
|
||||
# number of generated images from one image so that total will be $totalnum
|
||||
my $numfloor = int($totalnum / $#positives);
|
||||
my $numremain = $totalnum - $numfloor * $#positives;
|
||||
|
||||
# Get the directory name of positives
|
||||
my $first = $positives[0];
|
||||
my $last = $positives[$#positives];
|
||||
while ($first ne $last) {
|
||||
$first = dirname($first);
|
||||
$last = dirname($last);
|
||||
if ( $first eq "" ) { last; }
|
||||
}
|
||||
my $imgdir = $first;
|
||||
my $imgdirlen = length($first);
|
||||
|
||||
for (my $k = 0; $k < $#positives; $k++ ) {
|
||||
my $img = $positives[$k];
|
||||
my $num = ($k < $numremain) ? $numfloor + 1 : $numfloor;
|
||||
|
||||
# Pick up negative images randomly
|
||||
my @localnegatives = ();
|
||||
for (my $i = 0; $i < $num; $i++) {
|
||||
my $ind = int(rand($#negatives));
|
||||
push(@localnegatives, $negatives[$ind]);
|
||||
}
|
||||
open(TMP, "> $tmpfile");
|
||||
print TMP @localnegatives;
|
||||
close(TMP);
|
||||
#system("cat $tmpfile");
|
||||
|
||||
!chomp($img);
|
||||
my $vec = $outputdir . substr($img, $imgdirlen) . ".vec" ;
|
||||
print "$cmd -img $img -bg $tmpfile -vec $vec -num $num" . "\n";
|
||||
system("$cmd -img $img -bg $tmpfile -vec $vec -num $num");
|
||||
}
|
||||
unlink($tmpfile);
|
0
ongoing/HaarCascade_tests/classifier/.gitkeep
Normal file
0
ongoing/HaarCascade_tests/classifier/.gitkeep
Normal file
2191
ongoing/HaarCascade_tests/classifier/cascade.xml
Normal file
2191
ongoing/HaarCascade_tests/classifier/cascade.xml
Normal file
File diff suppressed because it is too large
Load diff
19
ongoing/HaarCascade_tests/classifier/params.xml
Normal file
19
ongoing/HaarCascade_tests/classifier/params.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<params>
|
||||
<stageType>BOOST</stageType>
|
||||
<featureType>HAAR</featureType>
|
||||
<height>40</height>
|
||||
<width>80</width>
|
||||
<stageParams>
|
||||
<boostType>GAB</boostType>
|
||||
<minHitRate>9.9900001287460327e-01</minHitRate>
|
||||
<maxFalseAlarm>5.0000000000000000e-01</maxFalseAlarm>
|
||||
<weightTrimRate>9.4999999999999996e-01</weightTrimRate>
|
||||
<maxDepth>1</maxDepth>
|
||||
<maxWeakCount>100</maxWeakCount></stageParams>
|
||||
<featureParams>
|
||||
<maxCatCount>0</maxCatCount>
|
||||
<featSize>1</featSize>
|
||||
<mode>ALL</mode></featureParams></params>
|
||||
</opencv_storage>
|
27
ongoing/HaarCascade_tests/classifier/stage0.xml
Normal file
27
ongoing/HaarCascade_tests/classifier/stage0.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage0>
|
||||
<maxWeakCount>4</maxWeakCount>
|
||||
<stageThreshold>-1.0557038784027100e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5334943 -6.1255004256963730e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.7242046594619751e-01 -7.1225577592849731e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3406097 -9.1979682445526123e-02</internalNodes>
|
||||
<leafValues>
|
||||
8.5950666666030884e-01 -5.6599384546279907e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5464794 -7.4063672218471766e-04</internalNodes>
|
||||
<leafValues>
|
||||
8.4704905748367310e-01 -5.1533699035644531e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 1824321 6.4185885712504387e-03</internalNodes>
|
||||
<leafValues>
|
||||
-5.3197431564331055e-01 7.3788273334503174e-01</leafValues></_></weakClassifiers></stage0>
|
||||
</opencv_storage>
|
32
ongoing/HaarCascade_tests/classifier/stage1.xml
Normal file
32
ongoing/HaarCascade_tests/classifier/stage1.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage1>
|
||||
<maxWeakCount>5</maxWeakCount>
|
||||
<stageThreshold>-1.1398526430130005e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6021714 -1.7777483910322189e-02</internalNodes>
|
||||
<leafValues>
|
||||
8.6206895112991333e-01 -4.7945204377174377e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4145756 2.3743551224470139e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.3439662456512451e-01 8.2215088605880737e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6265710 -6.0039879754185677e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.5790786743164062e-01 -4.6309715509414673e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5464794 -1.3670222833752632e-03</internalNodes>
|
||||
<leafValues>
|
||||
8.6037290096282959e-01 -4.0961334109306335e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5134522 -9.9409371614456177e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.8303009271621704e-01 -5.7429856061935425e-01</leafValues></_></weakClassifiers></stage1>
|
||||
</opencv_storage>
|
57
ongoing/HaarCascade_tests/classifier/stage10.xml
Normal file
57
ongoing/HaarCascade_tests/classifier/stage10.xml
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage10>
|
||||
<maxWeakCount>10</maxWeakCount>
|
||||
<stageThreshold>-1.1790993213653564e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 19850 -1.0749980807304382e-01</internalNodes>
|
||||
<leafValues>
|
||||
-9.2307692766189575e-01 4.5095169544219971e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6383664 3.6282204091548920e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.3561431765556335e-01 6.4863377809524536e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5672443 -1.9125394464936107e-04</internalNodes>
|
||||
<leafValues>
|
||||
7.9198676347732544e-01 -2.6785668730735779e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 7078309 2.5610751472413540e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.5887122154235840e-01 5.7739567756652832e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6112247 4.2799808084964752e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.0818111300468445e-01 8.6457198858261108e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4780573 2.3918901570141315e-03</internalNodes>
|
||||
<leafValues>
|
||||
-5.0708097219467163e-01 3.9419853687286377e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5670083 5.2268966101109982e-04</internalNodes>
|
||||
<leafValues>
|
||||
-2.5683295726776123e-01 7.1523237228393555e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5200502 -1.8801804631948471e-02</internalNodes>
|
||||
<leafValues>
|
||||
4.4412004947662354e-01 -4.7601011395454407e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 638644 -2.0516995573416352e-04</internalNodes>
|
||||
<leafValues>
|
||||
-7.3430734872817993e-01 2.7412560582160950e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3011578 8.1876497715711594e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.9500880837440491e-01 7.6856881380081177e-01</leafValues></_></weakClassifiers></stage10>
|
||||
</opencv_storage>
|
62
ongoing/HaarCascade_tests/classifier/stage11.xml
Normal file
62
ongoing/HaarCascade_tests/classifier/stage11.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage11>
|
||||
<maxWeakCount>11</maxWeakCount>
|
||||
<stageThreshold>-1.2136906385421753e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2548639 7.9761212691664696e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.6329115033149719e-01 7.5061726570129395e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3863993 -7.1366974152624607e-03</internalNodes>
|
||||
<leafValues>
|
||||
4.5392939448356628e-01 -5.2305990457534790e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4826177 1.3655596412718296e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.0884775519371033e-01 7.6920127868652344e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5464794 -1.6341549344360828e-03</internalNodes>
|
||||
<leafValues>
|
||||
6.6684818267822266e-01 -3.6782276630401611e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3844829 9.8115793662145734e-05</internalNodes>
|
||||
<leafValues>
|
||||
-3.8031581044197083e-01 5.7487684488296509e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6973917 1.8207035958766937e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.5124689936637878e-01 7.3933559656143188e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4789586 1.7359548946842551e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.9734661579132080e-01 6.2891435623168945e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 479606 1.4757625758647919e-03</internalNodes>
|
||||
<leafValues>
|
||||
2.1867121756076813e-01 -8.0109864473342896e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6611614 7.5696203857660294e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.5235512256622314e-01 6.1455774307250977e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3247423 1.1386678088456392e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.6051363348960876e-01 6.1844825744628906e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6296065 -9.7137264674529433e-04</internalNodes>
|
||||
<leafValues>
|
||||
8.1104975938796997e-01 -2.4966773390769958e-01</leafValues></_></weakClassifiers></stage11>
|
||||
</opencv_storage>
|
47
ongoing/HaarCascade_tests/classifier/stage12.xml
Normal file
47
ongoing/HaarCascade_tests/classifier/stage12.xml
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage12>
|
||||
<maxWeakCount>8</maxWeakCount>
|
||||
<stageThreshold>-8.9855605363845825e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4446480 -2.1266389638185501e-02</internalNodes>
|
||||
<leafValues>
|
||||
7.5962662696838379e-01 -3.3781963586807251e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3987601 -2.5097068864852190e-03</internalNodes>
|
||||
<leafValues>
|
||||
-7.4217349290847778e-01 3.7758478522300720e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 7270666 2.3525862488895655e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.7755615115165710e-01 8.4097403287887573e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4469812 -1.0660489089787006e-02</internalNodes>
|
||||
<leafValues>
|
||||
8.9270591735839844e-01 -2.4468661844730377e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3708261 2.2806471213698387e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.1090390682220459e-01 6.7939525842666626e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4825655 -8.9554805308580399e-03</internalNodes>
|
||||
<leafValues>
|
||||
8.7543725967407227e-01 -1.7979109287261963e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6875596 -1.3423584401607513e-02</internalNodes>
|
||||
<leafValues>
|
||||
5.6206727027893066e-01 -3.6763671040534973e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5238246 -3.0376299400813878e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.2464032173156738e-01 -3.5799154639244080e-01</leafValues></_></weakClassifiers></stage12>
|
||||
</opencv_storage>
|
57
ongoing/HaarCascade_tests/classifier/stage13.xml
Normal file
57
ongoing/HaarCascade_tests/classifier/stage13.xml
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage13>
|
||||
<maxWeakCount>10</maxWeakCount>
|
||||
<stageThreshold>-1.2344558238983154e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 64580 5.7471403852105141e-04</internalNodes>
|
||||
<leafValues>
|
||||
4.3063583970069885e-01 -9.0740740299224854e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4781083 4.2914412915706635e-03</internalNodes>
|
||||
<leafValues>
|
||||
-4.2048737406730652e-01 5.5999004840850830e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 7154816 1.2094721198081970e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.1019067764282227e-01 5.8193504810333252e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5464817 -4.4739717850461602e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.3049582242965698e-01 -3.5649526119232178e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6229117 -7.7575305476784706e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.5134570598602295e-01 -3.3935609459877014e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5837573 -3.9379179477691650e-02</internalNodes>
|
||||
<leafValues>
|
||||
8.3912080526351929e-01 -2.0921953022480011e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5360769 -1.4109613839536905e-03</internalNodes>
|
||||
<leafValues>
|
||||
6.9258832931518555e-01 -2.9845607280731201e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5369292 6.4991146326065063e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.2013919055461884e-01 7.1406865119934082e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3248862 5.8889649808406830e-03</internalNodes>
|
||||
<leafValues>
|
||||
3.0268713831901550e-01 -6.7810201644897461e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5777590 -3.6501786671578884e-03</internalNodes>
|
||||
<leafValues>
|
||||
6.4427900314331055e-01 -2.9659023880958557e-01</leafValues></_></weakClassifiers></stage13>
|
||||
</opencv_storage>
|
62
ongoing/HaarCascade_tests/classifier/stage14.xml
Normal file
62
ongoing/HaarCascade_tests/classifier/stage14.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage14>
|
||||
<maxWeakCount>11</maxWeakCount>
|
||||
<stageThreshold>-1.6017471551895142e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2407103 6.3523324206471443e-03</internalNodes>
|
||||
<leafValues>
|
||||
-1.3568985462188721e-01 7.1784234046936035e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5321682 -4.0579847991466522e-03</internalNodes>
|
||||
<leafValues>
|
||||
3.7964171171188354e-01 -5.0524675846099854e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5467450 5.9949874412268400e-04</internalNodes>
|
||||
<leafValues>
|
||||
-2.3831744492053986e-01 6.9320493936538696e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2191500 1.1320451274514198e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.3946433067321777e-01 4.4063070416450500e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5155666 -6.6953850910067558e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.6555390357971191e-01 -2.9760795831680298e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5363514 -1.6301067080348730e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.6978367567062378e-01 -2.0543955266475677e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5358305 -5.2268290892243385e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.2546741962432861e-01 -2.8095382452011108e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5438289 -1.0911213466897607e-03</internalNodes>
|
||||
<leafValues>
|
||||
6.9004940986633301e-01 -2.2914317250251770e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5662375 -4.1752462275326252e-03</internalNodes>
|
||||
<leafValues>
|
||||
4.0621888637542725e-01 -4.1578367352485657e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5449921 -4.8904903233051300e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.0994277000427246e-01 -3.8216280937194824e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5254299 -1.5894984826445580e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.3706626892089844e-01 -2.5429221987724304e-01</leafValues></_></weakClassifiers></stage14>
|
||||
</opencv_storage>
|
72
ongoing/HaarCascade_tests/classifier/stage15.xml
Normal file
72
ongoing/HaarCascade_tests/classifier/stage15.xml
Normal file
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage15>
|
||||
<maxWeakCount>13</maxWeakCount>
|
||||
<stageThreshold>-1.6141852140426636e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5831936 3.0752183869481087e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.7164750695228577e-01 5.5102038383483887e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3957008 -7.7398195862770081e-02</internalNodes>
|
||||
<leafValues>
|
||||
7.6413309574127197e-01 -1.8512850999832153e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2483548 1.7947454750537872e-01</internalNodes>
|
||||
<leafValues>
|
||||
-1.2920907139778137e-01 9.3113201856613159e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5021272 -4.4148374581709504e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.3158652782440186e-01 -2.8859263658523560e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4911013 5.2896775305271149e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.4687551856040955e-01 4.6362590789794922e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6127286 8.0148520646616817e-04</internalNodes>
|
||||
<leafValues>
|
||||
-2.4686294794082642e-01 7.1972709894180298e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6137719 -6.4526568166911602e-04</internalNodes>
|
||||
<leafValues>
|
||||
7.2305929660797119e-01 -2.8854888677597046e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4144829 2.2730385884642601e-02</internalNodes>
|
||||
<leafValues>
|
||||
2.5252798199653625e-01 -9.6875768899917603e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2978449 3.8273946847766638e-04</internalNodes>
|
||||
<leafValues>
|
||||
-4.5448541641235352e-01 3.3295068144798279e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4080349 -2.7588799595832825e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.8124520778656006e-01 -2.3295682668685913e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4455378 7.7964398078620434e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.7381548285484314e-01 6.4846020936965942e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5664864 -4.3723877752199769e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.4323586225509644e-01 -2.1882009506225586e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 23465 -3.8261886220425367e-04</internalNodes>
|
||||
<leafValues>
|
||||
-8.8057130575180054e-01 2.0363965630531311e-01</leafValues></_></weakClassifiers></stage15>
|
||||
</opencv_storage>
|
52
ongoing/HaarCascade_tests/classifier/stage16.xml
Normal file
52
ongoing/HaarCascade_tests/classifier/stage16.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage16>
|
||||
<maxWeakCount>9</maxWeakCount>
|
||||
<stageThreshold>-1.1815985441207886e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4628099 -9.8001433070749044e-04</internalNodes>
|
||||
<leafValues>
|
||||
-6.8211919069290161e-01 4.6687209606170654e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5751325 2.3405072279274464e-03</internalNodes>
|
||||
<leafValues>
|
||||
-5.3582334518432617e-01 3.5968494415283203e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6530784 -5.0893491134047508e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.7512277364730835e-01 -3.7197539210319519e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4915749 1.0380810126662254e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.7916350364685059e-01 6.6724634170532227e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3181013 1.6550511645618826e-05</internalNodes>
|
||||
<leafValues>
|
||||
-4.9805903434753418e-01 3.8211247324943542e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 58527 2.6863450184464455e-03</internalNodes>
|
||||
<leafValues>
|
||||
2.7388849854469299e-01 -7.0080268383026123e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6084768 -9.5270592719316483e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.0599151849746704e-01 -3.6601147055625916e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5570078 -4.7977536451071501e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.5132683515548706e-01 -2.6886576414108276e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2593553 3.1825132668018341e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.2007172703742981e-01 6.1813461780548096e-01</leafValues></_></weakClassifiers></stage16>
|
||||
</opencv_storage>
|
67
ongoing/HaarCascade_tests/classifier/stage17.xml
Normal file
67
ongoing/HaarCascade_tests/classifier/stage17.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage17>
|
||||
<maxWeakCount>12</maxWeakCount>
|
||||
<stageThreshold>-9.4175177812576294e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2346434 1.3413447886705399e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.2143864631652832e-01 6.2514030933380127e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2521056 -6.7124560475349426e-02</internalNodes>
|
||||
<leafValues>
|
||||
-7.6311528682708740e-01 2.8783240914344788e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6965892 2.4094688706099987e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.4763059020042419e-01 4.7549289464950562e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6743189 2.0817190408706665e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.2627016305923462e-01 5.0296902656555176e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4459796 5.2533462643623352e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.5412850975990295e-01 6.1106353998184204e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5467450 7.1393151301890612e-04</internalNodes>
|
||||
<leafValues>
|
||||
-2.0654715597629547e-01 7.9317712783813477e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6161893 1.1175924446433783e-03</internalNodes>
|
||||
<leafValues>
|
||||
-1.9923585653305054e-01 7.5660812854766846e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5262148 -3.3205276122316718e-04</internalNodes>
|
||||
<leafValues>
|
||||
7.9737639427185059e-01 -1.7094835638999939e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2247630 -4.6837840229272842e-02</internalNodes>
|
||||
<leafValues>
|
||||
-8.0098342895507812e-01 2.3009921610355377e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6123501 -2.6307101361453533e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.7686089277267456e-01 -2.4088244140148163e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6198566 -2.3639167193323374e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.9396690130233765e-01 -2.5076922774314880e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5307230 1.6444047912955284e-02</internalNodes>
|
||||
<leafValues>
|
||||
2.3513989150524139e-01 -7.6919788122177124e-01</leafValues></_></weakClassifiers></stage17>
|
||||
</opencv_storage>
|
62
ongoing/HaarCascade_tests/classifier/stage18.xml
Normal file
62
ongoing/HaarCascade_tests/classifier/stage18.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage18>
|
||||
<maxWeakCount>11</maxWeakCount>
|
||||
<stageThreshold>-7.9091215133666992e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5552598 2.2583438549190760e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.4516766667366028e-01 5.2607500553131104e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5446559 -6.8641304969787598e-03</internalNodes>
|
||||
<leafValues>
|
||||
4.5807263255119324e-01 -3.0947107076644897e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4083698 -2.8661310672760010e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.8682104349136353e-01 -2.1287234127521515e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5469961 -2.1815100626554340e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.6910789012908936e-01 -2.7819129824638367e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6877115 2.7778699994087219e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.1554158627986908e-01 6.7852944135665894e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3691834 1.8888133764266968e-01</internalNodes>
|
||||
<leafValues>
|
||||
-2.2545242309570312e-01 6.4780122041702271e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5360765 4.8941001296043396e-04</internalNodes>
|
||||
<leafValues>
|
||||
-1.8552508950233459e-01 7.5173664093017578e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5357936 -6.3694064738228917e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.8883955478668213e-01 -2.2326049208641052e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6477611 1.2742819264531136e-02</internalNodes>
|
||||
<leafValues>
|
||||
-1.8941468000411987e-01 7.8270876407623291e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5999396 1.7147921025753021e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.0309405326843262e-01 4.2827814817428589e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3396451 5.9373714029788971e-03</internalNodes>
|
||||
<leafValues>
|
||||
1.8223567306995392e-01 -8.4566026926040649e-01</leafValues></_></weakClassifiers></stage18>
|
||||
</opencv_storage>
|
72
ongoing/HaarCascade_tests/classifier/stage19.xml
Normal file
72
ongoing/HaarCascade_tests/classifier/stage19.xml
Normal file
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage19>
|
||||
<maxWeakCount>13</maxWeakCount>
|
||||
<stageThreshold>-1.2151402235031128e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2477564 2.8508510440587997e-03</internalNodes>
|
||||
<leafValues>
|
||||
-1.8851435184478760e-01 6.8961203098297119e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5767983 -3.7194188917055726e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.8834054470062256e-01 -2.2686544060707092e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5435622 -7.2470661252737045e-03</internalNodes>
|
||||
<leafValues>
|
||||
3.1112310290336609e-01 -6.0889953374862671e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5672443 -3.5364486393518746e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.6673213243484497e-01 -2.5371745228767395e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2354046 2.3483697324991226e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.4340032935142517e-01 4.5103815197944641e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6849881 7.5656850822269917e-04</internalNodes>
|
||||
<leafValues>
|
||||
-3.9627179503440857e-01 5.1694852113723755e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6304558 5.5908717215061188e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.1723985671997070e-01 6.9305503368377686e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6619242 3.6975359544157982e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.1726816296577454e-01 4.9445587396621704e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6315032 -5.5430391803383827e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.7705235481262207e-01 -3.7490817904472351e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5033047 5.3016911260783672e-04</internalNodes>
|
||||
<leafValues>
|
||||
-3.6123612523078918e-01 4.7430756688117981e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 93238 2.9055424965918064e-04</internalNodes>
|
||||
<leafValues>
|
||||
1.8285752832889557e-01 -8.8321834802627563e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 7089734 1.2511686654761434e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.7899905443191528e-01 4.4968444108963013e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5843927 -8.2685047527775168e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.4223343133926392e-01 -2.9110759496688843e-01</leafValues></_></weakClassifiers></stage19>
|
||||
</opencv_storage>
|
47
ongoing/HaarCascade_tests/classifier/stage2.xml
Normal file
47
ongoing/HaarCascade_tests/classifier/stage2.xml
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage2>
|
||||
<maxWeakCount>8</maxWeakCount>
|
||||
<stageThreshold>-9.4922059774398804e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2396840 1.0431748814880848e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.4243175387382507e-01 8.5138541460037231e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6222068 1.7129037529230118e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.1060457229614258e-01 7.9508054256439209e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5467450 4.0712629561312497e-04</internalNodes>
|
||||
<leafValues>
|
||||
-2.9358071088790894e-01 9.7165352106094360e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4079048 -8.0133148003369570e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.3514846563339233e-01 -4.9989247322082520e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5134690 -1.7988225445151329e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.4996314048767090e-01 -4.6733775734901428e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5464794 -7.3597184382379055e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.5466618537902832e-01 -5.3771013021469116e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6615029 3.4532047808170319e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.3722141385078430e-01 7.8262948989868164e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6318561 -1.7202894669026136e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.3387306928634644e-01 -3.6649671196937561e-01</leafValues></_></weakClassifiers></stage2>
|
||||
</opencv_storage>
|
42
ongoing/HaarCascade_tests/classifier/stage3.xml
Normal file
42
ongoing/HaarCascade_tests/classifier/stage3.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage3>
|
||||
<maxWeakCount>7</maxWeakCount>
|
||||
<stageThreshold>-1.4982649087905884e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5653050 2.6453498285263777e-03</internalNodes>
|
||||
<leafValues>
|
||||
-4.5937961339950562e-01 7.7031421661376953e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5251440 -4.9049186054617167e-04</internalNodes>
|
||||
<leafValues>
|
||||
8.5675507783889771e-01 -3.0365657806396484e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6350381 -6.9734808057546616e-03</internalNodes>
|
||||
<leafValues>
|
||||
6.2530416250228882e-01 -4.0575742721557617e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 1774297 1.7324250191450119e-02</internalNodes>
|
||||
<leafValues>
|
||||
-5.4163134098052979e-01 5.3285014629364014e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5363514 1.7069303430616856e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.0198717117309570e-01 9.2841923236846924e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4468048 1.9969230517745018e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.6788323521614075e-01 7.8370809555053711e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5363514 -1.0842503979802132e-03</internalNodes>
|
||||
<leafValues>
|
||||
8.2461130619049072e-01 -2.7838116884231567e-01</leafValues></_></weakClassifiers></stage3>
|
||||
</opencv_storage>
|
42
ongoing/HaarCascade_tests/classifier/stage4.xml
Normal file
42
ongoing/HaarCascade_tests/classifier/stage4.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage4>
|
||||
<maxWeakCount>7</maxWeakCount>
|
||||
<stageThreshold>-1.4942907094955444e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6097684 1.9832536578178406e-02</internalNodes>
|
||||
<leafValues>
|
||||
-5.1601421833038330e-01 6.6473990678787231e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2989597 -1.2135242111980915e-02</internalNodes>
|
||||
<leafValues>
|
||||
5.6847703456878662e-01 -5.2866727113723755e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3484578 1.0051997378468513e-02</internalNodes>
|
||||
<leafValues>
|
||||
-2.5192338228225708e-01 7.9386711120605469e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5918237 3.2060276716947556e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.6736944317817688e-01 5.9266370534896851e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5239092 -1.2895530089735985e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.8578672409057617e-01 -3.1832396984100342e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5467791 4.8367399722337723e-04</internalNodes>
|
||||
<leafValues>
|
||||
-3.4358265995979309e-01 7.5980979204177856e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4923376 -2.5067629758268595e-04</internalNodes>
|
||||
<leafValues>
|
||||
7.2300755977630615e-01 -2.7180227637290955e-01</leafValues></_></weakClassifiers></stage4>
|
||||
</opencv_storage>
|
42
ongoing/HaarCascade_tests/classifier/stage5.xml
Normal file
42
ongoing/HaarCascade_tests/classifier/stage5.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage5>
|
||||
<maxWeakCount>7</maxWeakCount>
|
||||
<stageThreshold>-8.9513111114501953e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2422096 7.1755228564143181e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.4664765000343323e-01 7.1523916721343994e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4152008 -1.1159515939652920e-02</internalNodes>
|
||||
<leafValues>
|
||||
4.4286754727363586e-01 -6.5785908699035645e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 4192168 -3.6444932222366333e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.2337446212768555e-01 -4.2781525850296021e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5579292 -1.3623120030388236e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.0154279470443726e-01 -3.5026982426643372e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 7273277 -7.4735237285494804e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.3942059278488159e-01 -2.7020177245140076e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5462082 -2.7533981483429670e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.3899711370468140e-01 -4.1663372516632080e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5989817 -7.2895870544016361e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.0333309173583984e-01 -4.8206123709678650e-01</leafValues></_></weakClassifiers></stage5>
|
||||
</opencv_storage>
|
42
ongoing/HaarCascade_tests/classifier/stage6.xml
Normal file
42
ongoing/HaarCascade_tests/classifier/stage6.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage6>
|
||||
<maxWeakCount>7</maxWeakCount>
|
||||
<stageThreshold>-8.8963723182678223e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3406097 -8.9364483952522278e-02</internalNodes>
|
||||
<leafValues>
|
||||
7.3221755027770996e-01 -4.6583852171897888e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3732318 2.1431149914860725e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.1563612222671509e-01 6.9622164964675903e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5137160 -1.1985183227807283e-03</internalNodes>
|
||||
<leafValues>
|
||||
7.4425798654556274e-01 -3.7180989980697632e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6423205 -4.4963032007217407e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.4965981245040894e-01 -3.6152300238609314e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5462082 -4.6658696373924613e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.6287922859191895e-01 -3.7917545437812805e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5426769 3.5744084743782878e-04</internalNodes>
|
||||
<leafValues>
|
||||
-2.8912180662155151e-01 7.7132213115692139e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 423587 -2.3924852721393108e-03</internalNodes>
|
||||
<leafValues>
|
||||
-7.3581212759017944e-01 3.5141283273696899e-01</leafValues></_></weakClassifiers></stage6>
|
||||
</opencv_storage>
|
57
ongoing/HaarCascade_tests/classifier/stage7.xml
Normal file
57
ongoing/HaarCascade_tests/classifier/stage7.xml
Normal file
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage7>
|
||||
<maxWeakCount>10</maxWeakCount>
|
||||
<stageThreshold>-1.5281771421432495e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5656292 2.0490270107984543e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.9255014061927795e-01 7.4722838401794434e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6353525 -1.9460737239569426e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.4928964376449585e-01 -3.9800989627838135e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6168806 1.7054250836372375e-01</internalNodes>
|
||||
<leafValues>
|
||||
-2.4620300531387329e-01 8.8145399093627930e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5533276 3.2776189036667347e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.6399293541908264e-01 8.0348426103591919e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 378319 -2.6250220835208893e-03</internalNodes>
|
||||
<leafValues>
|
||||
-7.3674768209457397e-01 3.2037591934204102e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5042799 2.0784616470336914e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.5788413882255554e-01 6.9435191154479980e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5337793 -6.1619927873834968e-04</internalNodes>
|
||||
<leafValues>
|
||||
6.4166831970214844e-01 -3.6269333958625793e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5445144 7.1200872771441936e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.4116935729980469e-01 6.6018533706665039e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5670041 -3.8107874570414424e-04</internalNodes>
|
||||
<leafValues>
|
||||
8.1331157684326172e-01 -2.4599665403366089e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6918864 2.3992178030312061e-03</internalNodes>
|
||||
<leafValues>
|
||||
-2.9936182498931885e-01 6.9683182239532471e-01</leafValues></_></weakClassifiers></stage7>
|
||||
</opencv_storage>
|
42
ongoing/HaarCascade_tests/classifier/stage8.xml
Normal file
42
ongoing/HaarCascade_tests/classifier/stage8.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage8>
|
||||
<maxWeakCount>7</maxWeakCount>
|
||||
<stageThreshold>-8.3137303590774536e-01</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5134690 -1.5641596168279648e-02</internalNodes>
|
||||
<leafValues>
|
||||
6.9363540410995483e-01 -3.6106982827186584e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2417208 4.5635281130671501e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.0234682559967041e-01 7.3507410287857056e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3896226 3.0257165431976318e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.2548671364784241e-01 6.1946529150009155e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5351689 -3.8960363599471748e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.5970847606658936e-01 -4.2648985981941223e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6923954 -2.5097420439124107e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.0482910871505737e-01 -3.6784309148788452e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5161851 -1.9997386261820793e-03</internalNodes>
|
||||
<leafValues>
|
||||
5.9490412473678589e-01 -3.5654053092002869e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 1985270 6.0046585276722908e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.8007000088691711e-01 5.3573167324066162e-01</leafValues></_></weakClassifiers></stage8>
|
||||
</opencv_storage>
|
52
ongoing/HaarCascade_tests/classifier/stage9.xml
Normal file
52
ongoing/HaarCascade_tests/classifier/stage9.xml
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0"?>
|
||||
<opencv_storage>
|
||||
<stage9>
|
||||
<maxWeakCount>9</maxWeakCount>
|
||||
<stageThreshold>-1.0093878507614136e+00</stageThreshold>
|
||||
<weakClassifiers>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5549074 1.5215605963021517e-03</internalNodes>
|
||||
<leafValues>
|
||||
-4.8727983236312866e-01 5.9595960378646851e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 3753162 3.3136905403807759e-04</internalNodes>
|
||||
<leafValues>
|
||||
4.4657191634178162e-01 -6.4084166288375854e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 6537140 6.2655940651893616e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.7088698148727417e-01 7.7597630023956299e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 458382 1.8256155308336020e-03</internalNodes>
|
||||
<leafValues>
|
||||
3.0864655971527100e-01 -8.4123438596725464e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5363514 2.4676946923136711e-03</internalNodes>
|
||||
<leafValues>
|
||||
-3.0564785003662109e-01 8.6883884668350220e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5768025 -5.0480564823374152e-04</internalNodes>
|
||||
<leafValues>
|
||||
8.1099426746368408e-01 -3.0435630679130554e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5599393 1.7810413613915443e-02</internalNodes>
|
||||
<leafValues>
|
||||
-4.1755309700965881e-01 5.5445712804794312e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 2157790 1.7119385302066803e-02</internalNodes>
|
||||
<leafValues>
|
||||
-3.2808634638786316e-01 6.9305676221847534e-01</leafValues></_>
|
||||
<_>
|
||||
<internalNodes>
|
||||
0 -1 5464817 -1.4041164831724018e-04</internalNodes>
|
||||
<leafValues>
|
||||
5.0532776117324829e-01 -5.0529742240905762e-01</leafValues></_></weakClassifiers></stage9>
|
||||
</opencv_storage>
|
0
ongoing/HaarCascade_tests/haar.py~
Normal file
0
ongoing/HaarCascade_tests/haar.py~
Normal file
0
ongoing/HaarCascade_tests/negative_images/.gitkeep
Normal file
0
ongoing/HaarCascade_tests/negative_images/.gitkeep
Normal file
134
ongoing/HaarCascade_tests/negatives.txt
Normal file
134
ongoing/HaarCascade_tests/negatives.txt
Normal file
|
@ -0,0 +1,134 @@
|
|||
./negative_images/train_image_004.png
|
||||
./negative_images/train_image_000.png
|
||||
./negative_images/train_image_001.png
|
||||
./negative_images/train_image_005.png
|
||||
./negative_images/train_image_003.png
|
||||
./negative_images/train_image_002.png
|
||||
./negative_images/105.jpg
|
||||
./negative_images/246.jpg
|
||||
./negative_images/178.jpg
|
||||
./negative_images/159.jpg
|
||||
./negative_images/108.jpg
|
||||
./negative_images/258.jpg
|
||||
./negative_images/172.jpg
|
||||
./negative_images/186.jpg
|
||||
./negative_images/099.jpg
|
||||
./negative_images/128.jpg
|
||||
./negative_images/175.jpg
|
||||
./negative_images/153.jpg
|
||||
./negative_images/093.jpg
|
||||
./negative_images/254.jpg
|
||||
./negative_images/147.jpg
|
||||
./negative_images/173.jpg
|
||||
./negative_images/185.jpg
|
||||
./negative_images/126.jpg
|
||||
./negative_images/158.jpg
|
||||
./negative_images/084.jpg
|
||||
./negative_images/156.jpg
|
||||
./negative_images/103.jpg
|
||||
./negative_images/091.jpg
|
||||
./negative_images/167.jpg
|
||||
./negative_images/100.jpg
|
||||
./negative_images/116.jpg
|
||||
./negative_images/123.jpg
|
||||
./negative_images/134.jpg
|
||||
./negative_images/252.jpg
|
||||
./negative_images/155.jpg
|
||||
./negative_images/127.jpg
|
||||
./negative_images/145.jpg
|
||||
./negative_images/109.jpg
|
||||
./negative_images/144.jpg
|
||||
./negative_images/242.jpg
|
||||
./negative_images/149.jpg
|
||||
./negative_images/251.jpg
|
||||
./negative_images/141.jpg
|
||||
./negative_images/255.jpg
|
||||
./negative_images/179.jpg
|
||||
./negative_images/132.jpg
|
||||
./negative_images/110.jpg
|
||||
./negative_images/096.jpg
|
||||
./negative_images/140.jpg
|
||||
./negative_images/092.jpg
|
||||
./negative_images/148.jpg
|
||||
./negative_images/261.jpg
|
||||
./negative_images/163.jpg
|
||||
./negative_images/165.jpg
|
||||
./negative_images/090.jpg
|
||||
./negative_images/138.jpg
|
||||
./negative_images/130.jpg
|
||||
./negative_images/174.jpg
|
||||
./negative_images/131.jpg
|
||||
./negative_images/170.jpg
|
||||
./negative_images/243.jpg
|
||||
./negative_images/168.jpg
|
||||
./negative_images/082.jpg
|
||||
./negative_images/087.jpg
|
||||
./negative_images/259.jpg
|
||||
./negative_images/248.jpg
|
||||
./negative_images/094.jpg
|
||||
./negative_images/121.jpg
|
||||
./negative_images/135.jpg
|
||||
./negative_images/169.jpg
|
||||
./negative_images/136.jpg
|
||||
./negative_images/102.jpg
|
||||
./negative_images/098.jpg
|
||||
./negative_images/187.jpg
|
||||
./negative_images/256.jpg
|
||||
./negative_images/146.jpg
|
||||
./negative_images/177.jpg
|
||||
./negative_images/088.jpg
|
||||
./negative_images/161.jpg
|
||||
./negative_images/097.jpg
|
||||
./negative_images/095.jpg
|
||||
./negative_images/083.jpg
|
||||
./negative_images/085.jpg
|
||||
./negative_images/112.jpg
|
||||
./negative_images/143.jpg
|
||||
./negative_images/152.jpg
|
||||
./negative_images/117.jpg
|
||||
./negative_images/180.jpg
|
||||
./negative_images/107.jpg
|
||||
./negative_images/247.jpg
|
||||
./negative_images/114.jpg
|
||||
./negative_images/124.jpg
|
||||
./negative_images/253.jpg
|
||||
./negative_images/244.jpg
|
||||
./negative_images/249.jpg
|
||||
./negative_images/142.jpg
|
||||
./negative_images/133.jpg
|
||||
./negative_images/250.jpg
|
||||
./negative_images/151.jpg
|
||||
./negative_images/106.jpg
|
||||
./negative_images/157.jpg
|
||||
./negative_images/162.jpg
|
||||
./negative_images/241.jpg
|
||||
./negative_images/101.jpg
|
||||
./negative_images/160.jpg
|
||||
./negative_images/137.jpg
|
||||
./negative_images/176.jpg
|
||||
./negative_images/115.jpg
|
||||
./negative_images/164.jpg
|
||||
./negative_images/245.jpg
|
||||
./negative_images/113.jpg
|
||||
./negative_images/118.jpg
|
||||
./negative_images/262.jpg
|
||||
./negative_images/183.jpg
|
||||
./negative_images/119.jpg
|
||||
./negative_images/150.jpg
|
||||
./negative_images/086.jpg
|
||||
./negative_images/122.jpg
|
||||
./negative_images/104.jpg
|
||||
./negative_images/125.jpg
|
||||
./negative_images/184.jpg
|
||||
./negative_images/257.jpg
|
||||
./negative_images/171.jpg
|
||||
./negative_images/260.jpg
|
||||
./negative_images/139.jpg
|
||||
./negative_images/182.jpg
|
||||
./negative_images/111.jpg
|
||||
./negative_images/166.jpg
|
||||
./negative_images/129.jpg
|
||||
./negative_images/120.jpg
|
||||
./negative_images/154.jpg
|
||||
./negative_images/181.jpg
|
||||
./negative_images/089.jpg
|
6
ongoing/HaarCascade_tests/negatives.txt~
Normal file
6
ongoing/HaarCascade_tests/negatives.txt~
Normal file
|
@ -0,0 +1,6 @@
|
|||
./negative_images/train_image_004.png
|
||||
./negative_images/train_image_000.png
|
||||
./negative_images/train_image_001.png
|
||||
./negative_images/train_image_005.png
|
||||
./negative_images/train_image_003.png
|
||||
./negative_images/train_image_002.png
|
|
@ -1 +0,0 @@
|
|||
Subproject commit e357b150ad98cc975e65d24b6e866c2d269ad29e
|
0
ongoing/HaarCascade_tests/positive_images/.gitkeep
Normal file
0
ongoing/HaarCascade_tests/positive_images/.gitkeep
Normal file
14
ongoing/HaarCascade_tests/positives.txt
Normal file
14
ongoing/HaarCascade_tests/positives.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
./positive_images/192.png
|
||||
./positive_images/224.png
|
||||
./positive_images/160.png
|
||||
./positive_images/000.png
|
||||
./positive_images/128.png
|
||||
./positive_images/256.png
|
||||
./positive_images/032.png
|
||||
./positive_images/288.png
|
||||
./positive_images/064.png
|
||||
./positive_images/096.png
|
||||
./positive_images/012.jpg
|
||||
./positive_images/011.jpg
|
||||
./positive_images/001.jpg
|
||||
./positive_images/000.jpg
|
10
ongoing/HaarCascade_tests/positives.txt~
Normal file
10
ongoing/HaarCascade_tests/positives.txt~
Normal file
|
@ -0,0 +1,10 @@
|
|||
./positive_images/192.png
|
||||
./positive_images/224.png
|
||||
./positive_images/160.png
|
||||
./positive_images/000.png
|
||||
./positive_images/128.png
|
||||
./positive_images/256.png
|
||||
./positive_images/032.png
|
||||
./positive_images/288.png
|
||||
./positive_images/064.png
|
||||
./positive_images/096.png
|
BIN
ongoing/HaarCascade_tests/samples.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples.vec
Normal file
Binary file not shown.
0
ongoing/HaarCascade_tests/samples/.gitkeep
Normal file
0
ongoing/HaarCascade_tests/samples/.gitkeep
Normal file
BIN
ongoing/HaarCascade_tests/samples/000.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/000.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/001.jpg.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/001.jpg.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/011.jpg.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/011.jpg.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/012.jpg.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/012.jpg.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/032.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/032.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/064.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/064.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/096.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/096.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/128.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/128.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/160.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/160.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/192.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/192.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/224.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/224.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/256.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/256.png.vec
Normal file
Binary file not shown.
BIN
ongoing/HaarCascade_tests/samples/288.png.vec
Normal file
BIN
ongoing/HaarCascade_tests/samples/288.png.vec
Normal file
Binary file not shown.
171
ongoing/HaarCascade_tests/tools/mergevec.py
Executable file
171
ongoing/HaarCascade_tests/tools/mergevec.py
Executable file
|
@ -0,0 +1,171 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2014, Blake Wulfe
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
###############################################################################
|
||||
|
||||
"""
|
||||
File: mergevec.py
|
||||
Author: blake.w.wulfe@gmail.com
|
||||
Date: 6/13/2014
|
||||
File Description:
|
||||
|
||||
This file contains a function that merges .vec files called "merge_vec_files".
|
||||
I made it as a replacement for mergevec.cpp (created by Naotoshi Seo.
|
||||
See: http://note.sonots.com/SciSoftware/haartraining/mergevec.cpp.html)
|
||||
in order to avoid recompiling openCV with mergevec.cpp.
|
||||
|
||||
To use the function:
|
||||
(1) Place all .vec files to be merged in a single directory (vec_directory).
|
||||
(2) Navigate to this file in your CLI (terminal or cmd) and type "python mergevec.py -v your_vec_directory -o your_output_filename".
|
||||
|
||||
The first argument (-v) is the name of the directory containing the .vec files
|
||||
The second argument (-o) is the name of the output file
|
||||
|
||||
To test the output of the function:
|
||||
(1) Install openCV.
|
||||
(2) Navigate to the output file in your CLI (terminal or cmd).
|
||||
(2) Type "opencv_createsamples -w img_width -h img_height -vec output_filename".
|
||||
This should show the .vec files in sequence.
|
||||
|
||||
"""
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import struct
|
||||
import argparse
|
||||
import traceback
|
||||
|
||||
|
||||
def exception_response(e):
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
for line in lines:
|
||||
print(line)
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-v', dest='vec_directory')
|
||||
parser.add_argument('-o', dest='output_filename')
|
||||
args = parser.parse_args()
|
||||
return (args.vec_directory, args.output_filename)
|
||||
|
||||
def merge_vec_files(vec_directory, output_vec_file):
|
||||
"""
|
||||
Iterates throught the .vec files in a directory and combines them.
|
||||
|
||||
(1) Iterates through files getting a count of the total images in the .vec files
|
||||
(2) checks that the image sizes in all files are the same
|
||||
|
||||
The format of a .vec file is:
|
||||
|
||||
4 bytes denoting number of total images (int)
|
||||
4 bytes denoting size of images (int)
|
||||
2 bytes denoting min value (short)
|
||||
2 bytes denoting max value (short)
|
||||
|
||||
ex: 6400 0000 4605 0000 0000 0000
|
||||
|
||||
hex 6400 0000 4605 0000 0000 0000
|
||||
# images size of h * w min max
|
||||
dec 100 1350 0 0
|
||||
|
||||
:type vec_directory: string
|
||||
:param vec_directory: Name of the directory containing .vec files to be combined.
|
||||
Do not end with slash. Ex: '/Users/username/Documents/vec_files'
|
||||
|
||||
:type output_vec_file: string
|
||||
:param output_vec_file: Name of aggregate .vec file for output.
|
||||
Ex: '/Users/username/Documents/aggregate_vec_file.vec'
|
||||
|
||||
"""
|
||||
|
||||
# Check that the .vec directory does not end in '/' and if it does, remove it.
|
||||
if vec_directory.endswith('/'):
|
||||
vec_directory = vec_directory[:-1]
|
||||
# Get .vec files
|
||||
files = glob.glob('{0}/*.vec'.format(vec_directory))
|
||||
|
||||
# Check to make sure there are .vec files in the directory
|
||||
if len(files) <= 0:
|
||||
print('Vec files to be merged could not be found from directory: {0}'.format(vec_directory))
|
||||
sys.exit(1)
|
||||
# Check to make sure there are more than one .vec files
|
||||
if len(files) == 1:
|
||||
print('Only 1 vec file was found in directory: {0}. Cannot merge a single file.'.format(vec_directory))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# Get the value for the first image size
|
||||
prev_image_size = 0
|
||||
try:
|
||||
with open(files[0], 'rb') as vecfile:
|
||||
content = ''.join(str(line) for line in vecfile.readlines())
|
||||
val = struct.unpack('<iihh', content[:12])
|
||||
prev_image_size = val[1]
|
||||
except IOError as e:
|
||||
print('An IO error occured while processing the file: {0}'.format(f))
|
||||
exception_response(e)
|
||||
|
||||
|
||||
# Get the total number of images
|
||||
total_num_images = 0
|
||||
for f in files:
|
||||
try:
|
||||
with open(f, 'rb') as vecfile:
|
||||
content = ''.join(str(line) for line in vecfile.readlines())
|
||||
val = struct.unpack('<iihh', content[:12])
|
||||
num_images = val[0]
|
||||
image_size = val[1]
|
||||
if image_size != prev_image_size:
|
||||
err_msg = """The image sizes in the .vec files differ. These values must be the same. \n The image size of file {0}: {1}\n
|
||||
The image size of previous files: {0}""".format(f, image_size, prev_image_size)
|
||||
sys.exit(err_msg)
|
||||
|
||||
total_num_images += num_images
|
||||
except IOError as e:
|
||||
print('An IO error occured while processing the file: {0}'.format(f))
|
||||
exception_response(e)
|
||||
|
||||
|
||||
# Iterate through the .vec files, writing their data (not the header) to the output file
|
||||
# '<iihh' means 'little endian, int, int, short, short'
|
||||
header = struct.pack('<iihh', total_num_images, image_size, 0, 0)
|
||||
try:
|
||||
with open(output_vec_file, 'wb') as outputfile:
|
||||
outputfile.write(header)
|
||||
|
||||
for f in files:
|
||||
with open(f, 'rb') as vecfile:
|
||||
content = ''.join(str(line) for line in vecfile.readlines())
|
||||
data = content[12:]
|
||||
outputfile.write(data)
|
||||
except Exception as e:
|
||||
exception_response(e)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
vec_directory, output_filename = get_args()
|
||||
if not vec_directory:
|
||||
sys.exit('mergvec requires a directory of vec files. Call mergevec.py with -v /your_vec_directory')
|
||||
if not output_filename:
|
||||
sys.exit('mergevec requires an output filename. Call mergevec.py with -o your_output_filename')
|
||||
|
||||
merge_vec_files(vec_directory, output_filename)
|
||||
|
4038
ongoing/HaarCascade_tests/trained_classifiers/banana_classifier.xml
Normal file
4038
ongoing/HaarCascade_tests/trained_classifiers/banana_classifier.xml
Normal file
File diff suppressed because it is too large
Load diff
14
ongoing/HaarCascade_tests/trained_classifiers/haar.py
Normal file
14
ongoing/HaarCascade_tests/trained_classifiers/haar.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
import numpy as np
|
||||
import cv2 as cv
|
||||
face_cascade = cv.CascadeClassifier('banana_classifier.xml')
|
||||
img = cv.imread('000.jpg')
|
||||
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
|
||||
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
|
||||
for (x,y,w,h) in faces:
|
||||
print("hello")
|
||||
cv.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
|
||||
roi_gray = gray[y:y+h, x:x+w]
|
||||
roi_color = img[y:y+h, x:x+w]
|
||||
cv.imshow('img',img)
|
||||
cv.waitKey(0)
|
||||
cv.destroyAllWindows()
|
13
ongoing/HaarCascade_tests/trained_classifiers/haar.py~
Normal file
13
ongoing/HaarCascade_tests/trained_classifiers/haar.py~
Normal file
|
@ -0,0 +1,13 @@
|
|||
import numpy as np
|
||||
import cv2 as cv
|
||||
face_cascade = cv.CascadeClassifier('banana_classifier.xml')
|
||||
img = cv.imread('000.jpg')
|
||||
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
|
||||
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
|
||||
for (x,y,w,h) in faces:
|
||||
cv.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
|
||||
roi_gray = gray[y:y+h, x:x+w]
|
||||
roi_color = img[y:y+h, x:x+w]
|
||||
cv.imshow('img',img)
|
||||
cv.waitKey(0)
|
||||
cv.destroyAllWindows()
|
Loading…
Add table
Add a link
Reference in a new issue