Full Code of oscarotero/imagecow for AI

master e87b16d728c7 cached
46 files
7.5 MB
2.0M tokens
160 symbols
1 requests
Download .txt
Showing preview only (7,888K chars total). Download the full file or copy to clipboard to get everything.
Repository: oscarotero/imagecow
Branch: master
Commit: e87b16d728c7
Files: 46
Total size: 7.5 MB

Directory structure:
gitextract_u4kyp6r5/

├── .gitattributes
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── composer.json
├── example/
│   ├── blur.php
│   ├── bootstrap.php
│   ├── crop-balanced.php
│   ├── facedetect.php
│   ├── opacity.php
│   ├── quality.php
│   ├── rotate.php
│   ├── watermark.php
│   └── webp.php
├── phpunit.xml
├── src/
│   ├── Crops/
│   │   ├── Balanced.php
│   │   ├── CropInterface.php
│   │   ├── Entropy.php
│   │   ├── Face.php
│   │   ├── LICENCE
│   │   └── classifier/
│   │       ├── haarcascade_frontalface_alt.xml
│   │       ├── haarcascade_frontalface_alt2.xml
│   │       ├── haarcascade_frontalface_alt_tree.xml
│   │       ├── haarcascade_frontalface_default.xml
│   │       └── haarcascade_profileface.xml
│   ├── Image.php
│   ├── ImageException.php
│   ├── Libs/
│   │   ├── AbstractLib.php
│   │   ├── Gd.php
│   │   ├── Imagick.php
│   │   ├── LibInterface.php
│   │   └── icc/
│   │       ├── black_us_web_uncoated.icm
│   │       ├── srgb.icm
│   │       └── us_web_uncoated.icc
│   ├── Utils/
│   │   ├── Color.php
│   │   ├── Dimmensions.php
│   │   ├── IconExtractor.php
│   │   └── SvgExtractor.php
│   └── autoloader.php
└── tests/
    ├── DimmensionsTest.php
    ├── GdTest.php
    ├── IconTest.php
    ├── ImageTest_.php
    ├── ImagickTest.php
    └── bootstrap.php

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
/tests/      export-ignore
/phpunit.xml export-ignore
/example     export-ignore
.*           export-ignore

# Set the line ending configuration
* text=lf


================================================
FILE: .gitignore
================================================
tests/images/tmp.*
local
vendor/
composer.lock

================================================
FILE: .travis.yml
================================================
sudo: true
dist: trusty
language: php

php:
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3

cache:
  directories:
    - $HOME/.composer/cache

script:
  - composer test

before_install:
  - sudo apt-get update
  - sudo apt-get -y --reinstall install libwebp-dev
  - sudo apt-get -y --reinstall install imagemagick
  - sudo mkdir imagemagick
  - cd imagemagick
  - sudo apt-get build-dep -y imagemagick
  - sudo apt-get install -y libwebp-dev devscripts
  - sudo apt-get source imagemagick
  - cd imagemagick-*
  - sudo debuild -uc -us
  - sudo dpkg -i ../*magick*.deb
  - cd ../..
  - printf "\n" | pecl install imagick-beta
  - composer install


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2016 Oscar Otero Marzoa

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.

Note: The content of the Crops directory has it's own LICENCE. See Crops/LICENCE for more information.

================================================
FILE: README.md
================================================
# Imagecow

[![Build Status](https://travis-ci.org/oscarotero/imagecow.svg?branch=master)](https://travis-ci.org/oscarotero/imagecow)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/oscarotero/imagecow/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/oscarotero/imagecow/?branch=master)

Created by Oscar Otero <http://oscarotero.com> <oom@oscarotero.com>


## What is Imagecow?

It's a php library to manipulate images to web.

* PHP >= 5.5
* Use GD2 or Imagick libraries
* Very simple, fast and easy to use. There is not a lot of features, just the basics: crop, resize, resizeCrop, etc.

Simple usage example:

```php
use Imagecow\Image;

Image::fromFile('my-image.gif')
    ->autoRotate()
    ->resizeCrop(300, 400, 'center', 'middle')
    ->format('png')
    ->save('converted-image.png')
    ->show();
```


## How use it?

### Installation

This package is installable and autoloadable via Composer as [imagecow/imagecow](https://packagist.org/packages/imagecow/imagecow).

```php
$ composer require imagecow/imagecow
```

### Creating a Imagecow\Image instance:

```php
use Imagecow\Image;

//Using Imagick:
$image = Image::fromFile('my-image.jpg', Image::LIB_IMAGICK);

//Detect the available library automatically
//(in order of preference: Imagick, Gd)
$image = Image::fromFile('my-image.jpg');

//Create an instance from a string
$image = Image::fromString(file_get_contents('my-image.jpg'));
```

### resize

`Image::resize($width, $height = 0, $cover = false)`

Resizes the image keeping the aspect ratio.

**Note:** If the new image is bigger than the original, the image wont be resized

* `$width`: The new max-width of the image. You can use percentages or numbers (pixels). If it's `0`, it will be calculated automatically using the height
* `$height`: The new max-height of the image. As width, you can use percentages or numbers and it will be calculated automatically if it's `0`
* `$cover`: If it's `true`, the new dimensions will cover both width and height values. It's like css's `image-size: cover`.

```php
//Assuming the original image is 1000x500

$image->resize(200);                    // change to 200x100
$image->resize(0, 200);                 // change to 400x200
$image->resize(200, 300);               // change to 200x100
$image->resize(2000, 2000);             // keeps 1000x500
```

### crop

`Image::crop($width, $height, $x = 'center', $y = 'middle')`

Crops the image:

* `$width`: The width of the cropped image. It can be number (pixels) or percentage
* `$height`: The height of the cropped image. It can be number (pixels) or percentage
* `$x`: The horizontal offset of the crop. It can be a number (for pixels) or percentage. You can also use the keywords `left`, `center` and `right`. If it's not defined, used the value by default (`center`).
* `$y`: The vertical offset of the crop. As with $x, it can be a number or percentage. You can also use the keywords `top`, `middle` and `bottom`. If it's not defined, used the value by default (`middle`).

```php
$image->crop(200, 300);                 // crops to 200x300px
$image->crop(200, 300, 'left', 'top');  // crops to 200x300px from left and top
$image->crop(200, 300, 20, '50%');      // crops to 200x300px from 20px left and 50% top
$image->crop('50%', '50%');             // crops to half size
```

#### Automatic cropping

Imagecow includes some code copied from the great library [stojg/crop](https://github.com/stojg/crop) to calculate the most important parts of the image to crop and resizeCrop automatically. The available methods are:

* `Image::CROP_ENTROPY` [more info](https://github.com/stojg/crop#cropentropy)
* `Image::CROP_BALANCED` [more info](https://github.com/stojg/crop#cropbalanced)

Note: **these methods are available only for Imagick**. If you use Gd, the methods fallback to "center", "middle" positions.

To use them:

```php
$image->crop(500, 200, Image::CROP_ENTROPY);  // crops to 500x200 using the Entropy method to calculate the center point
$image->crop(500, 200, Image::CROP_BALANCED); // The same as above but using the Balanced method
```

### resizeCrop

`Image::resizeCrop($width, $height, $x = 'center', $y = 'middle')`

Resizes and crops the image. See [resize](resize) and [crop](crop) for the arguments description.

```php
$image->resizeCrop(200, 300);                  //Resizes and crops to 200x300px.
$image->resizeCrop('50%', 300);                //Resizes and crops to half width and 300px height
$image->resizeCrop(200, 300, 'left', '100%'); //Resizes and crops to 200x300px from left and bottom
$image->resizeCrop(200, 300, Image::CROP_BALANCED); //Resizes and crops to 200x300px using the CROP_BALANCED method
```

### rotate

`Image::rotate($angle)`

Rotates the image

* `$angle`: Rotation angle in degrees (anticlockwise)

```php
$image->rotate(90); // rotates the image 90 degrees
```

### autoRotate

`Image::autoRotate()`

Autorotates the image according its EXIF data

```php
$image->autoRotate();
```

### opacity

`Image::opacity($value)`

Set the alpha channel of the image. The value must be between 0 (transparent) to 100 (opaque). Note that the image will be converted to png (if it's not already)

```php
$image->opacity(50);
```

### blur

`Image::blur($loops = 4)`

Applies the gaussian blur to the image. The more loops, the more the image blurs.

```php
$image->blur(8);
```

### watermark

`Image::watermark($image, $x = 'right', $y = 'bottom')`

Applies a image as a watermark. You can configure the position and opacity.

```php
$image = Image::fromFile('photo.jpg');
$logo = Image::fromFile('logo.png');

$logo->opacity(50);

$image->watermark($logo);
```

### format

`Image::format($format)`

Converts the image to other format.

* `$format`: The format name. It can be "jpg", "png", "gif", or "webp"*.

```php
$image->format('png'); // converts to png
```

*Note: `webp` format is only supported when using Imagick. [ImageMagick must be built with WEBP support](#installing-imagemagick-with-webp-support).

### save

Save the image to a file.

* `$filename`: The filename for the saved image. If it's not defined, overwrite the file (only if has been loaded from a file).

```php
$image->save('my-new-image.png'); // save to this file
$image->save(); // overwrite file
```

### setBackground

`Image::setBackground(array $background)`

Set a default background used in some transformations: for example on convert a transparent png to jpg.

* `$background`: An array with the RGB value of the color

```php
$image->setBackground(array(255, 255, 255)); // set the background to white
```

### quality

`Image::quality($quality)`

Defines the image compression quality for jpg images

* `$quality`: An integer value between 0 and 100

```php
$image->quality(80); // change the quality to 80
```

### setClientHints

`Image::setClientHints(array $clientHints)`

Defines the client hints to fix the final size of the image and generate responsive images. The available client hints are:

* `dpr` Device pixel ratio
* `width` The final image width
* `viewport-width` The viewport width

```php
$image->setClientHints([
    'dpr' => 2,
    'width' => 300,
    'viewport-width' => 1024,
]);
```

More information about [client hints below](#responsive-images).

### Display the image

Send the HTTP header with the content-type, output the image data and die:

```php
$image->show(); // you should see this image in your browser
```

Insert the image as base64 url:

```php
echo '<img src="' . $image->base64() . '">';
```

### Get image info:

There are other functions to returns image info:

* `$image->getWidth()`: Returns the image width in pixels
* `$image->getHeight()`: Returns the image height in pixels
* `$image->getMimeType()`: Returns the image mime-type
* `$image->getExifData()`: Returns the EXIF data of the image
* `$image->getString()`: Returns a string with the image content


#### Execute multiple functions

You can execute some of these functions defined as a string. This is useful to get images transformed dinamically using variables, for example: `image.php?transform=resize,200,300|format,png`. All operations are separated by `|` and use commas for the arguments:

```php
$image->transform('resize,200,50%|format,png|crop,100,100,CROP_ENTROPY');

//This is the same than:
$image
	->resize(200, '50%')
	->format('png')
	->crop(100, 100, Image::CROP_ENTROPY);
```

### Responsive images

Imagecow has support for client hints, that allows to generate responsive images without using cookies or javascript code (like in 1.x version of imagecow). Client Hints is introduced by Google becoming a standard. [Here's a deep explain of how to use it](https://www.smashingmagazine.com/2016/01/leaner-responsive-images-client-hints/)

Note that currently this is supported only by [chrome and opera browsers](http://caniuse.com/#feat=client-hints-dpr-width-viewport).

Simple example:

In your webpage, add the following code:

```html
<!DOCTYPE html>
<html>
<head>
    <title>My webpage</title>
    <!-- Activate client hints -->
    <meta http-equiv="Accept-CH" content="DPR,Width,Viewport-Width"> 
</head>
<body>
    <!-- Insert a responsive image -->
    <img src="image.php?file=flower.jpg&amp;transform=resize,1000" sizes="25vw">
</body>
</html>
```

Now, in the server side:

```php
use Imagecow\Image;

$file = __DIR__.'/'.$_GET['file'];
$transform = isset($_GET['transform']) ? $_GET['transform'] : null;

//Create the image instance
$image = Image::fromFile($file);

//Set the client hints
$image->setClientHints([
    'dpr' => isset($_SERVER['HTTP_DPR']) ? $_SERVER['HTTP_DPR'] : null,
    'width' => isset($_SERVER['HTTP_WIDTH']) ? $_SERVER['HTTP_WIDTH'] : null,
    'viewport-width' => isset($_SERVER['HTTP_VIEWPORT_WIDTH']) ? $_SERVER['HTTP_VIEWPORT_WIDTH'] : null,
]);

//Transform the image and display the result:
$image->transform($transform)->show();
```

### Other utils

#### IconExtractor.

**Only for Imagick**. Class to extract the images from an .ico file and convert to png.

```php
use Imagecow\Utils\IconExtractor;

$icon = new IconExtractor('favicon.ico');

//Gets the better image from the icon (quality = color_depth + (width * height))
$image = $icon->getBetterQuality();

//Do imagecow stuff
$image->resize(100)->save('my-image.png');
```

#### SvgExtractor.

**Only for Imagick** This class allows generate images from a svg file (useful for browsers that don't support svg format):

```php
use Imagecow\Utils\SvgExtractor;

$svg = new SvgExtractor('image.svg');

//Gets the image
$image = $svg->get();

//Now you can execute the imagecow methods:
$image->resize(200)->format('jpg')->save('image.jpg');
```

### Installing ImageMagick with WEBP support
#### macOS
Via Homebrew:
```bash
brew install webp
brew install imagemagick --with-webp
```

#### CentOS/RHEL
```bash
yum install libwebp-devel rpm-build
mkdir /tmp/imagemagick
cd /tmp/imagemagick
yum-builddep ImageMagick -y
yumdownloader --source ImageMagick
rpm -ivh ImageMagick*
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-*.rpm
yum-config-manager --save --setopt=updates.exclude=ImageMagick*;
```

#### Ubuntu
```bash
mkdir /tmp/imagemagick
cd /tmp/imagemagick
apt-get build-dep imagemagick
apt-get install libwebp-dev devscripts
apt-get source imagemagick
cd imagemagick-*
debuild -uc -us
dpkg -i ../*magick*.deb
```

### Maintainers:

* @oscarotero (creator)
* @eusonlito (collaborator)
* [and more...](https://github.com/oscarotero/imagecow/graphs/contributors)

### Thanks to

Stig Lindqvist and Julien Deniau jdeniau for the [stojg/crop library](https://github.com/stojg/crop)


================================================
FILE: composer.json
================================================
{
	"name": "imagecow/imagecow",
	"type": "library",
	"description": "PHP library to manipulate and generate responsive images",
	"keywords": ["image"],
	"homepage": "https://github.com/oscarotero/imagecow/",
	"license": "MIT",
	"authors": [
		{
			"name": "Oscar Otero",
			"email": "oom@oscarotero.com",
			"homepage": "http://oscarotero.com",
			"role": "Developer"
		}
	],
	"support": {
		"email": "oom@oscarotero.com",
		"issues": "https://github.com/oscarotero/imagecow/issues"
	},
	"require": {
		"php": ">=5.5"
	},
	"require-dev": {
		"phpunit/phpunit": "^4.8|^6.2"
	},
	"scripts": {
		"test": "phpunit"
	},
	"autoload": {
		"psr-4": {
			"Imagecow\\": "src"
		}
	}
}


================================================
FILE: example/blur.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$image = Image::fromFile(__DIR__.'/my-image.jpg', $library);
$image->blur();

$image->show();


================================================
FILE: example/bootstrap.php
================================================
<?php

require dirname(__DIR__).'/src/autoloader.php';

$library = isset($_GET['library']) && ($_GET['library'] === 'Imagick') ? 'Imagick' : 'Gd';


================================================
FILE: example/crop-balanced.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$paddedFilePath = __DIR__.'/square.jpg';

$imageCowPadded = Image::fromFile($paddedFilePath, Image::LIB_IMAGICK);

$imageCowPadded
     ->crop(50, 50, Image::CROP_BALANCED)
     ->format('png')
     ->show();


================================================
FILE: example/facedetect.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

Image::fromFile(__DIR__.'/my-image.jpg', $library)->crop(200, 200, Image::CROP_FACE)->show();


================================================
FILE: example/opacity.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$image = Image::fromFile(__DIR__.'/logo.png', $library);
$image->opacity(50);

$image->show();


================================================
FILE: example/quality.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$quality = 8;
$image = Image::fromFile(__DIR__.'/my-image.jpg');
$image->autoRotate();

$watermark = Image::fromFile('logo.png');
$image->watermark($watermark, $x = 'right', $y = 'bottom');

$image->quality($quality);
$image->resize(500, 500);

// $image->save('my-image-low.jpg');
$image->show();

================================================
FILE: example/rotate.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$image = Image::fromFile(__DIR__.'/my-image.jpg', $library);
$image->rotate(90);

$image->show();


================================================
FILE: example/watermark.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$image = Image::fromFile(__DIR__.'/my-image.jpg', $library);

$watermark = Image::fromFile(__DIR__.'/logo.png', $library);
$watermark->opacity(50);

$image->watermark($watermark, '100%-50px', 'bottom');

$image->show();


================================================
FILE: example/webp.php
================================================
<?php

require __DIR__.'/bootstrap.php';

use Imagecow\Image;

$image = Image::fromFile(__DIR__.'/my-image.jpg', $library);
$image->format('webp');

$image->show();


================================================
FILE: phpunit.xml
================================================
<phpunit bootstrap="./tests/bootstrap.php">
	<testsuites>
		<testsuite name="All tests">
			<directory>./tests/</directory>
		</testsuite>
	</testsuites>
</phpunit>


================================================
FILE: src/Crops/Balanced.php
================================================
<?php

namespace Imagecow\Crops;

use Exception;
use Imagick;
use Imagecow\Utils\Color;

/**
 * This class is adapted from Stig Lindqvist's great Crop library:
 * https://github.com/stojg/crop
 * Copyright (c) 2013, Stig Lindqvist.
 *
 * CropBalanced
 *
 * This class calculates the most interesting point in the image by:
 *
 * 1. Dividing the image into four equally squares
 * 2. Find the most energetic point per square
 * 3. Finding the images weighted mean interest point
 */
class Balanced implements CropInterface
{
    /**
     * {@inheritdoc}
     */
    public static function getOffsets(Imagick $original, $targetWidth, $targetHeight)
    {
        $measureImage = clone $original;
        // Enhance edges with radius 1
        $measureImage->edgeimage(1);
        // Turn image into a grayscale
        $measureImage->modulateImage(100, 0, 100);
        // Turn everything darker than this to pitch black
        $measureImage->blackThresholdImage('#101010');
        // Get the calculated offset for cropping
        return static::getOffsetBalanced($measureImage, $targetWidth, $targetHeight);
    }

    /**
     * @param int $targetWidth
     * @param int $targetHeight
     *
     * @return array
     */
    protected static function getOffsetBalanced(Imagick $original, $targetWidth, $targetHeight)
    {
        $size = $original->getImageGeometry();

        $points = [];

        $halfWidth = ceil($size['width'] / 2);
        $halfHeight = ceil($size['height'] / 2);

        // First quadrant
        $clone = clone $original;
        $clone->cropimage($halfWidth, $halfHeight, 0, 0);
        $point = static::getHighestEnergyPoint($clone);
        $points[] = ['x' => $point['x'], 'y' => $point['y'], 'sum' => $point['sum']];

        // Second quadrant
        $clone = clone $original;
        $clone->cropimage($halfWidth, $halfHeight, $halfWidth, 0);
        $point = static::getHighestEnergyPoint($clone);
        $points[] = ['x' => $point['x'] + $halfWidth, 'y' => $point['y'], 'sum' => $point['sum']];

        // Third quadrant
        $clone = clone $original;
        $clone->cropimage($halfWidth, $halfHeight, 0, $halfHeight);
        $point = static::getHighestEnergyPoint($clone);
        $points[] = ['x' => $point['x'], 'y' => $point['y'] + $halfHeight, 'sum' => $point['sum']];

        // Fourth quadrant
        $clone = clone $original;
        $clone->cropimage($halfWidth, $halfHeight, $halfWidth, $halfHeight);
        $point = $point = static::getHighestEnergyPoint($clone);
        $points[] = ['x' => $point['x'] + $halfWidth, 'y' => $point['y'] + $halfHeight, 'sum' => $point['sum']];

        // get the totalt sum value so we can find out a mean center point
        $totalWeight = array_reduce(
            $points,
            function ($result, $array) {
                return $result + $array['sum'];
            }
        );

        $centerX = 0;
        $centerY = 0;

        // Calulate the mean weighted center x and y
        $totalPoints = count($points);
        for ($idx = 0; $idx < $totalPoints; ++$idx) {
            $centerX += $points[$idx]['x'] * ($points[$idx]['sum'] / $totalWeight);
            $centerY += $points[$idx]['y'] * ($points[$idx]['sum'] / $totalWeight);
        }

        // From the weighted center point to the topleft corner of the crop would be
        $topleftX = max(0, ($centerX - $targetWidth / 2));
        $topleftY = max(0, ($centerY - $targetHeight / 2));

        // If we don't have enough width for the crop, back up $topleftX until
        // we can make the image meet $targetWidth
        if (($topleftX + $targetWidth) > $size['width']) {
            $topleftX -= ($topleftX + $targetWidth) - $size['width'];
        }
        // If we don't have enough height for the crop, back up $topleftY until
        // we can make the image meet $targetHeight
        if (($topleftY + $targetHeight) > $size['height']) {
            $topleftY -= ($topleftY + $targetHeight) - $size['height'];
        }

        return [$topleftX, $topleftY];
    }

    /**
     * By doing random sampling from the image, find the most energetic point on the passed in
     * image.
     *
     * @param Imagick $image
     *
     * @return array
     */
    protected static function getHighestEnergyPoint(Imagick $image)
    {
        // It's more performant doing random pixel uplook via GD
        if (($im = imagecreatefromstring($image->getImageBlob())) === false) {
            throw new Exception('GD failed to create image from string');
        }

        $size = $image->getImageGeometry();

        $xcenter = 0;
        $ycenter = 0;
        $sum = 0;

        // Only sample 1/50 of all the pixels in the image
        $sampleSize = round($size['height'] * $size['width']) / 50;

        for ($k = 0; $k < $sampleSize; ++$k) {
            $i = mt_rand(0, $size['width'] - 1);
            $j = mt_rand(0, $size['height'] - 1);

            $rgb = imagecolorat($im, $i, $j);
            $r = ($rgb >> 16) & 0xFF;
            $g = ($rgb >> 8) & 0xFF;
            $b = $rgb & 0xFF;

            $val = Color::rgb2bw($r, $g, $b);
            $sum += $val;
            $xcenter += ($i + 1) * $val;
            $ycenter += ($j + 1) * $val;
        }

        if ($sum) {
            $xcenter /= $sum;
            $ycenter /= $sum;
        }

        $sum = $sum / round($size['height'] * $size['width']);

        return ['x' => $xcenter, 'y' => $ycenter, 'sum' => $sum];
    }
}


================================================
FILE: src/Crops/CropInterface.php
================================================
<?php

namespace Imagecow\Crops;

use Imagick;

/**
 * Interface used by all crops.
 */
interface CropInterface
{
    /**
     * Returns the x,y values.
     *
     * @param Imagick $original
     * @param int     $targetWidth
     * @param int     $targetHeight
     *
     * @return array
     */
    public static function getOffsets(Imagick $original, $targetWidth, $targetHeight);
}


================================================
FILE: src/Crops/Entropy.php
================================================
<?php

namespace Imagecow\Crops;

use Imagick;
use Imagecow\Utils\Color;

/**
 * This class is adapted from Stig Lindqvist's great Crop library:
 * https://github.com/stojg/crop
 * Copyright (c) 2013, Stig Lindqvist.
 *
 * CropEntropy
 *
 * This class finds the a position in the picture with the most energy in it.
 *
 * Energy is in this case calculated by this
 *
 * 1. Take the image and turn it into black and white
 * 2. Run a edge filter so that we're left with only edges.
 * 3. Find a piece in the picture that has the highest entropy (i.e. most edges)
 * 4. Return coordinates that makes sure that this piece of the picture is not cropped 'away'
 */
class Entropy implements CropInterface
{
    const POTENTIAL_RATIO = 1.5;

    /**
     * {@inheritdoc}
     */
    public static function getOffsets(Imagick $original, $targetWidth, $targetHeight)
    {
        $measureImage = clone $original;
        // Enhance edges
        $measureImage->edgeimage(1);
        // Turn image into a grayscale
        $measureImage->modulateImage(100, 0, 100);
        // Turn everything darker than this to pitch black
        $measureImage->blackThresholdImage('#070707');
        // Get the calculated offset for cropping
        return static::getOffsetFromEntropy($measureImage, $targetWidth, $targetHeight);
    }

    /**
     * Get the offset of where the crop should start.
     *
     * @param Imagick $originalImage
     * @param int     $targetHeight
     * @param int     $targetHeight
     *
     * @return array
     */
    protected static function getOffsetFromEntropy(Imagick $originalImage, $targetWidth, $targetHeight)
    {
        // The entropy works better on a blured image
        $image = clone $originalImage;
        $image->blurImage(3, 2);

        $size = $image->getImageGeometry();

        $originalWidth = $size['width'];
        $originalHeight = $size['height'];

        $leftX = static::slice($image, $originalWidth, $targetWidth, 'h');
        $topY = static::slice($image, $originalHeight, $targetHeight, 'v');

        return [$leftX, $topY];
    }

    /**
     * slice.
     *
     * @param mixed $image
     * @param mixed $originalSize
     * @param mixed $targetSize
     * @param mixed $axis         h=horizontal, v = vertical
     */
    protected static function slice($image, $originalSize, $targetSize, $axis)
    {
        $aSlice = null;
        $bSlice = null;

        // Just an arbitrary size of slice size
        $sliceSize = ceil(($originalSize - $targetSize) / 25);

        $aBottom = $originalSize;
        $aTop = 0;

        // while there still are uninvestigated slices of the image
        while (($aBottom - $aTop) > $targetSize) {
            // Make sure that we don't try to slice outside the picture
            $sliceSize = min($aBottom - $aTop - $targetSize, $sliceSize);

            // Make a top slice image
            if (!$aSlice) {
                $aSlice = clone $image;

                if ($axis === 'h') {
                    $aSlice->cropImage($sliceSize, $originalSize, $aTop, 0);
                } else {
                    $aSlice->cropImage($originalSize, $sliceSize, 0, $aTop);
                }
            }

            // Make a bottom slice image
            if (!$bSlice) {
                $bSlice = clone $image;

                if ($axis === 'h') {
                    $bSlice->cropImage($sliceSize, $originalSize, $aBottom - $sliceSize, 0);
                } else {
                    $bSlice->cropImage($originalSize, $sliceSize, 0, $aBottom - $sliceSize);
                }
            }

            // calculate slices potential
            $aPosition = (($axis === 'h') ? 'left' : 'top');
            $bPosition = (($axis === 'h') ? 'right' : 'bottom');

            $aPot = static::getPotential($aPosition, $aTop, $sliceSize);
            $bPot = static::getPotential($bPosition, $aBottom, $sliceSize);

            $canCutA = ($aPot <= 0);
            $canCutB = ($bPot <= 0);

            // if no slices are "cutable", we force if a slice has a lot of potential
            if (!$canCutA && !$canCutB) {
                if (($aPot * self::POTENTIAL_RATIO) < $bPot) {
                    $canCutA = true;
                } elseif ($aPot > ($bPot * self::POTENTIAL_RATIO)) {
                    $canCutB = true;
                }
            }

            // if we can only cut on one side
            if ($canCutA xor $canCutB) {
                if ($canCutA) {
                    $aTop += $sliceSize;
                    $aSlice = null;
                } else {
                    $aBottom -= $sliceSize;
                    $bSlice = null;
                }
            } elseif (static::grayscaleEntropy($aSlice) < static::grayscaleEntropy($bSlice)) {
                // bSlice has more entropy, so remove aSlice and bump aTop down
                $aTop += $sliceSize;
                $aSlice = null;
            } else {
                $aBottom -= $sliceSize;
                $bSlice = null;
            }
        }

        return $aTop;
    }

    /**
     * getSafeZoneList.
     *
     * @return array
     */
    protected static function getSafeZoneList()
    {
        return [];
    }

    /**
     * getPotential.
     *
     * @param mixed $position
     * @param mixed $top
     * @param mixed $sliceSize
     */
    protected static function getPotential($position, $top, $sliceSize)
    {
        if (($position === 'top') || ($position === 'left')) {
            $start = $top;
            $end = $top + $sliceSize;
        } else {
            $start = $top - $sliceSize;
            $end = $top;
        }

        $safeZoneList = static::getSafeZoneList();
        $safeRatio = 0;

        for ($i = $start; $i < $end; ++$i) {
            foreach ($safeZoneList as $safeZone) {
                if (($position === 'top') || ($position === 'bottom')) {
                    if (($safeZone['top'] <= $i) && ($safeZone['bottom'] >= $i)) {
                        $safeRatio = max($safeRatio, ($safeZone['right'] - $safeZone['left']));
                    }
                } elseif (($safeZone['left'] <= $i) && ($safeZone['right'] >= $i)) {
                    $safeRatio = max($safeRatio, ($safeZone['bottom'] - $safeZone['top']));
                }
            }
        }

        return $safeRatio;
    }

    /**
     * Calculate the entropy for this image.
     *
     * A higher value of entropy means more noise / liveliness / color / business
     *
     * @param Imagick $image
     *
     * @return float
     *
     * @see http://brainacle.com/calculating-image-entropy-with-python-how-and-why.html
     * @see http://www.mathworks.com/help/toolbox/images/ref/entropy.html
     */
    protected static function grayscaleEntropy(Imagick $image)
    {
        // The histogram consists of a list of 0-254 and the number of pixels that has that value
        return static::getEntropy($image->getImageHistogram(), static::area($image));
    }

    /**
     * Find out the entropy for a color image.
     *
     * If the source image is in color we need to transform RGB into a grayscale image
     * so we can calculate the entropy more performant.
     *
     * @param Imagick $image
     *
     * @return float
     */
    protected static function colorEntropy(Imagick $image)
    {
        $histogram = $image->getImageHistogram();
        $newHistogram = [];

        // Translates a color histogram into a bw histogram
        $colors = count($histogram);

        for ($idx = 0; $idx < $colors; ++$idx) {
            $colors = $histogram[$idx]->getColor();
            $grey = Color::rgb2bw($colors['r'], $colors['g'], $colors['b']);

            if (isset($newHistogram[$grey])) {
                $newHistogram[$grey] += $histogram[$idx]->getColorCount();
            } else {
                $newHistogram[$grey] = $histogram[$idx]->getColorCount();
            }
        }

        return static::getEntropy($newHistogram, static::area($image));
    }

    /**
     * @param array $histogram - a value[count] array
     * @param int   $area
     *
     * @return float
     */
    protected static function getEntropy($histogram, $area)
    {
        $value = 0.0;
        $colors = count($histogram);

        for ($idx = 0; $idx < $colors; ++$idx) {
            // calculates the percentage of pixels having this color value
            $p = $histogram[$idx]->getColorCount() / $area;
            // A common way of representing entropy in scalar
            $value = $value + $p * log($p, 2);
        }

        // $value is always 0.0 or negative, so transform into positive scalar value
        return -$value;
    }

    /**
     * Get the area in pixels for this image.
     *
     * @param Imagick $image
     *
     * @return int
     */
    protected static function area(Imagick $image)
    {
        $size = $image->getImageGeometry();

        return $size['height'] * $size['width'];
    }
}


================================================
FILE: src/Crops/Face.php
================================================
<?php

namespace Imagecow\Crops;

use Imagick;
use Imagecow\ImageException;

/**
 * This class is adapted from Stig Lindqvist's great Crop library:
 * https://github.com/stojg/crop
 * Copyright (c) 2013, Stig Lindqvist.
 *
 * CropFace
 *
 * This class will try to find the most interesting point in the image by trying to find a face and
 * center the crop on that
 *
 * @todo implement
 * @see https://github.com/mauricesvay/php-facedetection/blob/master/FaceDetector.php
 */
class Face extends Entropy
{
    const CLASSIFIER_FACE = '/classifier/haarcascade_frontalface_default.xml';
    const CLASSIFIER_PROFILE = '/classifier/haarcascade_profileface.xml';

    /**
     * safeZoneList
     *
     * @var array
     * @access protected
     */
    protected static $safeZoneList = array();

    /**
     * originalImage
     *
     * @var object
     * @access protected
     */
    protected static $originalImage;

    /**
     * baseDimension
     *
     * @var array
     * @access protected
     */
    protected static $baseDimension = array();

    /**
     * Returns the x,y values.
     *
     * @param Imagick $original
     * @param int     $targetWidth
     * @param int     $targetHeight
     *
     * @return array
     */
    public static function getOffsets(Imagick $original, $targetWidth, $targetHeight)
    {
        static::$originalImage = $original;
        static::$baseDimension = [
            'width' => $original->getImageWidth(),
            'height' => $original->getImageWidth(),
        ];

        return parent::getOffsets($original, $targetWidth, $targetHeight);
    }

    /**
     * getBaseDimension
     *
     * @param string $key width|height
     *
     * @access protected
     *
     * @return int
     */
    protected static function getBaseDimension($key)
    {
        if (isset(static::$baseDimension)) {
            return static::$baseDimension[$key];
        } elseif ($key === 'width') {
            return static::$originalImage->getImageWidth();
        }

        return static::$originalImage->getImageHeight();
    }

    /**
     * getFaceList get faces positions and sizes
     *
     * @access protected
     *
     * @return array
     */
    protected static function getFaceList()
    {
        if (!function_exists('face_detect')) {
            throw new ImageException('PHP Facedetect extension must be installed. See http://www.xarg.org/project/php-facedetect/ for more details');
        }

        $faceList = static::getFaceListFromClassifier(self::CLASSIFIER_FACE);

        if (!is_array($faceList)) {
            $faceList = [];
        }

        $profileList = static::getFaceListFromClassifier(self::CLASSIFIER_PROFILE);

        if (!is_array($profileList)) {
            $profileList = [];
        }

        return array_merge($faceList, $profileList);
    }

    /**
     * getFaceListFromClassifier
     *
     * @param string $classifier
     *
     * @access protected
     *
     * @return array
     */
    protected static function getFaceListFromClassifier($classifier)
    {
        $file = tmpfile();

        static::$originalImage->writeImageFile($file);

        $faceList = face_detect(stream_get_meta_data($file)['uri'], __DIR__.$classifier);

        fclose($file);

        return $faceList;
    }

    /**
     * getSafeZoneList
     *
     * @access protected
     *
     * @return array
     */
    protected static function getSafeZoneList()
    {
        // the local key is the current image width-height
        $key = static::$originalImage->getImageWidth().'-'.static::$originalImage->getImageHeight();

        if (isset(static::$safeZoneList[$key])) {
            return static::$safeZoneList[$key];
        }

        $faceList = static::getFaceList();

        // getFaceList works on the main image, so we use a ratio between main/current image
        $xRatio = static::getBaseDimension('width') / static::$originalImage->getImageWidth();
        $yRatio = static::getBaseDimension('height') / static::$originalImage->getImageHeight();

        $safeZoneList = array();

        foreach ($faceList as $face) {
            $hw = ceil($face['w'] / 2);
            $hh = ceil($face['h'] / 2);

            $safeZone = array(
                'left' => $face['x'] - $hw,
                'right' => $face['x'] + $face['w'] + $hw,
                'top' => $face['y'] - $hh,
                'bottom' => $face['y'] + $face['h'] + $hh
            );

            $safeZoneList[] = array(
                'left' => round($safeZone['left'] / $xRatio),
                'right' => round($safeZone['right'] / $xRatio),
                'top' => round($safeZone['top'] / $yRatio),
                'bottom' => round($safeZone['bottom'] / $yRatio),
            );
        }

        static::$safeZoneList[$key] = $safeZoneList;

        return static::$safeZoneList[$key];
    }
}


================================================
FILE: src/Crops/LICENCE
================================================
Copyright (c) 2013, Stig Lindqvist
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

  Redistributions 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.

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 COPYRIGHT HOLDER 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.


================================================
FILE: src/Crops/classifier/haarcascade_frontalface_alt.xml
================================================
<?xml version="1.0"?>
<!--
    Stump-based 20x20 gentle adaboost frontal face detector.
    Created by Rainer Lienhart.

////////////////////////////////////////////////////////////////////////////////////////

  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.
-->
<opencv_storage>
<haarcascade_frontalface_alt type_id="opencv-haar-classifier">
  <size>20 20</size>
  <stages>
    <_>
      <!-- stage 0 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 7 14 4 -1.</_>
                <_>3 9 14 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.0141958743333817e-003</threshold>
            <left_val>0.0337941907346249</left_val>
            <right_val>0.8378106951713562</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 2 18 4 -1.</_>
                <_>7 2 6 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0151513395830989</threshold>
            <left_val>0.1514132022857666</left_val>
            <right_val>0.7488812208175659</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 7 15 9 -1.</_>
                <_>1 10 15 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.2109931819140911e-003</threshold>
            <left_val>0.0900492817163467</left_val>
            <right_val>0.6374819874763489</right_val></_></_></trees>
      <stage_threshold>0.8226894140243530</stage_threshold>
      <parent>-1</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 1 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 6 2 6 -1.</_>
                <_>5 9 2 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.6227109590545297e-003</threshold>
            <left_val>0.0693085864186287</left_val>
            <right_val>0.7110946178436279</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 5 6 3 -1.</_>
                <_>9 5 2 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.2906649392098188e-003</threshold>
            <left_val>0.1795803010463715</left_val>
            <right_val>0.6668692231178284</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 0 12 9 -1.</_>
                <_>4 3 12 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.0025708042085171e-003</threshold>
            <left_val>0.1693672984838486</left_val>
            <right_val>0.6554006934165955</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 9 10 8 -1.</_>
                <_>6 13 10 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.9659894108772278e-003</threshold>
            <left_val>0.5866332054138184</left_val>
            <right_val>0.0914145186543465</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 6 14 8 -1.</_>
                <_>3 10 14 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.5227010957896709e-003</threshold>
            <left_val>0.1413166970014572</left_val>
            <right_val>0.6031895875930786</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 1 6 10 -1.</_>
                <_>14 1 3 10 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0366676896810532</threshold>
            <left_val>0.3675672113895416</left_val>
            <right_val>0.7920318245887756</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 8 5 12 -1.</_>
                <_>7 12 5 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>9.3361474573612213e-003</threshold>
            <left_val>0.6161385774612427</left_val>
            <right_val>0.2088509947061539</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 1 18 3 -1.</_>
                <_>7 1 6 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.6961314082145691e-003</threshold>
            <left_val>0.2836230993270874</left_val>
            <right_val>0.6360273957252502</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 8 17 2 -1.</_>
                <_>1 9 17 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.1488880263641477e-003</threshold>
            <left_val>0.2223580926656723</left_val>
            <right_val>0.5800700783729553</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>16 6 4 2 -1.</_>
                <_>16 7 4 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.1484689787030220e-003</threshold>
            <left_val>0.2406464070081711</left_val>
            <right_val>0.5787054896354675</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 17 2 2 -1.</_>
                <_>5 18 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.1219060290604830e-003</threshold>
            <left_val>0.5559654831886292</left_val>
            <right_val>0.1362237036228180</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 2 6 12 -1.</_>
                <_>14 2 3 12 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0939491465687752</threshold>
            <left_val>0.8502737283706665</left_val>
            <right_val>0.4717740118503571</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 0 4 12 -1.</_>
                <_>4 0 2 6 2.</_>
                <_>6 6 2 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.3777789426967502e-003</threshold>
            <left_val>0.5993673801422119</left_val>
            <right_val>0.2834529876708984</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 11 18 8 -1.</_>
                <_>8 11 6 8 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0730631574988365</threshold>
            <left_val>0.4341886043548584</left_val>
            <right_val>0.7060034275054932</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 7 10 2 -1.</_>
                <_>5 8 10 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.6767389974556863e-004</threshold>
            <left_val>0.3027887940406799</left_val>
            <right_val>0.6051574945449829</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 11 5 3 -1.</_>
                <_>15 12 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.0479710809886456e-003</threshold>
            <left_val>0.1798433959484100</left_val>
            <right_val>0.5675256848335266</right_val></_></_></trees>
      <stage_threshold>6.9566087722778320</stage_threshold>
      <parent>0</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 2 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 3 10 9 -1.</_>
                <_>5 6 10 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0165106896311045</threshold>
            <left_val>0.6644225120544434</left_val>
            <right_val>0.1424857974052429</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 4 2 14 -1.</_>
                <_>9 11 2 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.7052499353885651e-003</threshold>
            <left_val>0.6325352191925049</left_val>
            <right_val>0.1288477033376694</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 5 4 12 -1.</_>
                <_>3 9 4 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.8069869149476290e-003</threshold>
            <left_val>0.1240288019180298</left_val>
            <right_val>0.6193193197250366</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 5 12 5 -1.</_>
                <_>8 5 4 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.5402400167658925e-003</threshold>
            <left_val>0.1432143002748489</left_val>
            <right_val>0.5670015811920166</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 6 10 8 -1.</_>
                <_>5 10 10 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.6386279175058007e-004</threshold>
            <left_val>0.1657433062791824</left_val>
            <right_val>0.5905207991600037</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 0 6 9 -1.</_>
                <_>8 3 6 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.9253729842603207e-003</threshold>
            <left_val>0.2695507109165192</left_val>
            <right_val>0.5738824009895325</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 12 1 8 -1.</_>
                <_>9 16 1 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.0214841030538082e-003</threshold>
            <left_val>0.1893538981676102</left_val>
            <right_val>0.5782774090766907</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 7 20 6 -1.</_>
                <_>0 9 20 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.6365420781075954e-003</threshold>
            <left_val>0.2309329062700272</left_val>
            <right_val>0.5695425868034363</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 0 6 17 -1.</_>
                <_>9 0 2 17 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.5127769438549876e-003</threshold>
            <left_val>0.2759602069854736</left_val>
            <right_val>0.5956642031669617</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 0 6 4 -1.</_>
                <_>11 0 2 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0101574398577213</threshold>
            <left_val>0.1732538044452667</left_val>
            <right_val>0.5522047281265259</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 1 6 4 -1.</_>
                <_>7 1 2 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0119536602869630</threshold>
            <left_val>0.1339409947395325</left_val>
            <right_val>0.5559014081954956</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 1 6 16 -1.</_>
                <_>14 1 2 16 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.8859491944313049e-003</threshold>
            <left_val>0.3628703951835632</left_val>
            <right_val>0.6188849210739136</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 5 18 8 -1.</_>
                <_>0 5 9 4 2.</_>
                <_>9 9 9 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0801329165697098</threshold>
            <left_val>0.0912110507488251</left_val>
            <right_val>0.5475944876670837</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 15 10 4 -1.</_>
                <_>13 15 5 2 2.</_>
                <_>8 17 5 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.0643280111253262e-003</threshold>
            <left_val>0.3715142905712128</left_val>
            <right_val>0.5711399912834168</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 1 4 8 -1.</_>
                <_>3 1 2 4 2.</_>
                <_>5 5 2 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.3419450260698795e-003</threshold>
            <left_val>0.5953313708305359</left_val>
            <right_val>0.3318097889423370</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 6 14 10 -1.</_>
                <_>10 6 7 5 2.</_>
                <_>3 11 7 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0546011403203011</threshold>
            <left_val>0.1844065934419632</left_val>
            <right_val>0.5602846145629883</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 1 6 16 -1.</_>
                <_>4 1 2 16 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.9071690514683723e-003</threshold>
            <left_val>0.3594244122505188</left_val>
            <right_val>0.6131715178489685</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 18 20 2 -1.</_>
                <_>0 19 20 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.4718717951327562e-004</threshold>
            <left_val>0.5994353294372559</left_val>
            <right_val>0.3459562957286835</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 13 4 3 -1.</_>
                <_>8 14 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.3013808317482471e-003</threshold>
            <left_val>0.4172652065753937</left_val>
            <right_val>0.6990845203399658</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 14 2 3 -1.</_>
                <_>9 15 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.5017572119832039e-003</threshold>
            <left_val>0.4509715139865875</left_val>
            <right_val>0.7801457047462463</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 12 9 6 -1.</_>
                <_>0 14 9 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0241385009139776</threshold>
            <left_val>0.5438212752342224</left_val>
            <right_val>0.1319826990365982</right_val></_></_></trees>
      <stage_threshold>9.4985427856445313</stage_threshold>
      <parent>1</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 3 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 7 3 4 -1.</_>
                <_>5 9 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.9212230108678341e-003</threshold>
            <left_val>0.1415266990661621</left_val>
            <right_val>0.6199870705604553</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 3 2 16 -1.</_>
                <_>9 11 2 8 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2748669541906565e-004</threshold>
            <left_val>0.6191074252128601</left_val>
            <right_val>0.1884928941726685</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 6 13 8 -1.</_>
                <_>3 10 13 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.1409931620582938e-004</threshold>
            <left_val>0.1487396955490112</left_val>
            <right_val>0.5857927799224854</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 3 8 2 -1.</_>
                <_>12 3 4 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.1878609918057919e-003</threshold>
            <left_val>0.2746909856796265</left_val>
            <right_val>0.6359239816665649</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 8 4 12 -1.</_>
                <_>8 12 4 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.1015717908740044e-003</threshold>
            <left_val>0.5870851278305054</left_val>
            <right_val>0.2175628989934921</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 3 8 6 -1.</_>
                <_>15 3 4 3 2.</_>
                <_>11 6 4 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.1448440384119749e-003</threshold>
            <left_val>0.5880944728851318</left_val>
            <right_val>0.2979590892791748</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 1 6 19 -1.</_>
                <_>9 1 2 19 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.8977119363844395e-003</threshold>
            <left_val>0.2373327016830444</left_val>
            <right_val>0.5876647233963013</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 0 6 4 -1.</_>
                <_>11 0 2 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0216106791049242</threshold>
            <left_val>0.1220654994249344</left_val>
            <right_val>0.5194202065467835</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 1 9 3 -1.</_>
                <_>6 1 3 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.6299318782985210e-003</threshold>
            <left_val>0.2631230950355530</left_val>
            <right_val>0.5817409157752991</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 15 10 4 -1.</_>
                <_>13 15 5 2 2.</_>
                <_>8 17 5 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.9393711853772402e-004</threshold>
            <left_val>0.3638620078563690</left_val>
            <right_val>0.5698544979095459</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 3 6 10 -1.</_>
                <_>3 3 3 10 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0538786612451077</threshold>
            <left_val>0.4303531050682068</left_val>
            <right_val>0.7559366226196289</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 4 15 15 -1.</_>
                <_>3 9 15 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.8887349870055914e-003</threshold>
            <left_val>0.2122603058815002</left_val>
            <right_val>0.5613427162170410</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 5 8 6 -1.</_>
                <_>6 7 8 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.3635339457541704e-003</threshold>
            <left_val>0.5631849169731140</left_val>
            <right_val>0.2642767131328583</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 12 10 -1.</_>
                <_>10 4 6 5 2.</_>
                <_>4 9 6 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0240177996456623</threshold>
            <left_val>0.5797107815742493</left_val>
            <right_val>0.2751705944538117</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 4 4 4 -1.</_>
                <_>8 4 2 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.0543030404951423e-004</threshold>
            <left_val>0.2705242037773132</left_val>
            <right_val>0.5752568840980530</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 11 1 2 -1.</_>
                <_>15 12 1 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.4790197433903813e-004</threshold>
            <left_val>0.5435624718666077</left_val>
            <right_val>0.2334876954555512</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 11 2 2 -1.</_>
                <_>3 12 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.4091329649090767e-003</threshold>
            <left_val>0.5319424867630005</left_val>
            <right_val>0.2063155025243759</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>16 11 1 3 -1.</_>
                <_>16 12 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.4642629539594054e-003</threshold>
            <left_val>0.5418980717658997</left_val>
            <right_val>0.3068861067295075</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 15 6 4 -1.</_>
                <_>3 15 3 2 2.</_>
                <_>6 17 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.6352549428120255e-003</threshold>
            <left_val>0.3695372939109802</left_val>
            <right_val>0.6112868189811707</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 7 8 2 -1.</_>
                <_>6 8 8 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.3172752056270838e-004</threshold>
            <left_val>0.3565036952495575</left_val>
            <right_val>0.6025236248970032</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 11 1 3 -1.</_>
                <_>3 12 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.0998890977352858e-003</threshold>
            <left_val>0.1913982033729553</left_val>
            <right_val>0.5362827181816101</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 0 12 2 -1.</_>
                <_>6 1 12 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.4213981861248612e-004</threshold>
            <left_val>0.3835555016994476</left_val>
            <right_val>0.5529310107231140</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 14 2 3 -1.</_>
                <_>9 15 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.2655049581080675e-003</threshold>
            <left_val>0.4312896132469177</left_val>
            <right_val>0.7101895809173584</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 15 6 2 -1.</_>
                <_>7 16 6 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.9134991867467761e-004</threshold>
            <left_val>0.3984830975532532</left_val>
            <right_val>0.6391963958740234</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 5 4 6 -1.</_>
                <_>0 7 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0152841797098517</threshold>
            <left_val>0.2366732954978943</left_val>
            <right_val>0.5433713793754578</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 12 12 2 -1.</_>
                <_>8 12 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.8381411470472813e-003</threshold>
            <left_val>0.5817500948905945</left_val>
            <right_val>0.3239189088344574</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 3 1 9 -1.</_>
                <_>6 6 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.1093179071322083e-004</threshold>
            <left_val>0.5540593862533569</left_val>
            <right_val>0.2911868989467621</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 17 3 2 -1.</_>
                <_>11 17 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.1275060288608074e-003</threshold>
            <left_val>0.1775255054235458</left_val>
            <right_val>0.5196629166603088</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 9 2 2 -1.</_>
                <_>9 10 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.4576259097084403e-004</threshold>
            <left_val>0.3024170100688934</left_val>
            <right_val>0.5533593893051148</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 6 6 4 -1.</_>
                <_>9 6 2 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0226465407758951</threshold>
            <left_val>0.4414930939674377</left_val>
            <right_val>0.6975377202033997</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 17 3 2 -1.</_>
                <_>8 17 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8804960418492556e-003</threshold>
            <left_val>0.2791394889354706</left_val>
            <right_val>0.5497952103614807</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 17 3 3 -1.</_>
                <_>11 17 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.0889107882976532e-003</threshold>
            <left_val>0.5263199210166931</left_val>
            <right_val>0.2385547012090683</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 12 3 2 -1.</_>
                <_>8 13 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.7318050377070904e-003</threshold>
            <left_val>0.4319379031658173</left_val>
            <right_val>0.6983600854873657</right_val></_></_>
        <_>
          <!-- tree 33 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 3 6 2 -1.</_>
                <_>11 3 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.8482700735330582e-003</threshold>
            <left_val>0.3082042932510376</left_val>
            <right_val>0.5390920042991638</right_val></_></_>
        <_>
          <!-- tree 34 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 11 14 4 -1.</_>
                <_>3 13 14 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.5062530110299122e-005</threshold>
            <left_val>0.5521922111511231</left_val>
            <right_val>0.3120366036891937</right_val></_></_>
        <_>
          <!-- tree 35 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 10 18 4 -1.</_>
                <_>10 10 9 2 2.</_>
                <_>1 12 9 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0294755697250366</threshold>
            <left_val>0.5401322841644287</left_val>
            <right_val>0.1770603060722351</right_val></_></_>
        <_>
          <!-- tree 36 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 10 3 3 -1.</_>
                <_>0 11 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.1387329846620560e-003</threshold>
            <left_val>0.5178617835044861</left_val>
            <right_val>0.1211019009351730</right_val></_></_>
        <_>
          <!-- tree 37 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 1 6 6 -1.</_>
                <_>11 1 2 6 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0209429506212473</threshold>
            <left_val>0.5290294289588928</left_val>
            <right_val>0.3311221897602081</right_val></_></_>
        <_>
          <!-- tree 38 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 7 3 6 -1.</_>
                <_>9 7 1 6 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.5665529370307922e-003</threshold>
            <left_val>0.7471994161605835</left_val>
            <right_val>0.4451968967914581</right_val></_></_></trees>
      <stage_threshold>18.4129695892333980</stage_threshold>
      <parent>2</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 4 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 0 18 9 -1.</_>
                <_>1 3 18 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.8206960996612906e-004</threshold>
            <left_val>0.2064086049795151</left_val>
            <right_val>0.6076732277870178</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 10 2 6 -1.</_>
                <_>12 13 2 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.6790600493550301e-003</threshold>
            <left_val>0.5851997137069702</left_val>
            <right_val>0.1255383938550949</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 5 19 8 -1.</_>
                <_>0 9 19 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.9827912375330925e-004</threshold>
            <left_val>0.0940184295177460</left_val>
            <right_val>0.5728961229324341</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 0 6 9 -1.</_>
                <_>9 0 2 9 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.8959012171253562e-004</threshold>
            <left_val>0.1781987994909287</left_val>
            <right_val>0.5694308876991272</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 3 6 1 -1.</_>
                <_>7 3 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.8560499195009470e-003</threshold>
            <left_val>0.1638399064540863</left_val>
            <right_val>0.5788664817810059</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 3 6 1 -1.</_>
                <_>13 3 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.8122469559311867e-003</threshold>
            <left_val>0.2085440009832382</left_val>
            <right_val>0.5508564710617065</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 10 4 6 -1.</_>
                <_>5 13 4 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.5896620461717248e-003</threshold>
            <left_val>0.5702760815620422</left_val>
            <right_val>0.1857215017080307</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 3 6 1 -1.</_>
                <_>13 3 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0100783398374915</threshold>
            <left_val>0.5116943120956421</left_val>
            <right_val>0.2189770042896271</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 12 6 -1.</_>
                <_>4 6 12 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0635263025760651</threshold>
            <left_val>0.7131379842758179</left_val>
            <right_val>0.4043813049793243</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 12 2 6 -1.</_>
                <_>15 14 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.1031491756439209e-003</threshold>
            <left_val>0.2567181885242462</left_val>
            <right_val>0.5463973283767700</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 3 2 2 -1.</_>
                <_>10 3 1 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.4035000242292881e-003</threshold>
            <left_val>0.1700665950775147</left_val>
            <right_val>0.5590974092483521</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 3 3 1 -1.</_>
                <_>10 3 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.5226360410451889e-003</threshold>
            <left_val>0.5410556793212891</left_val>
            <right_val>0.2619054019451141</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 1 4 14 -1.</_>
                <_>3 1 2 14 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0179974399507046</threshold>
            <left_val>0.3732436895370483</left_val>
            <right_val>0.6535220742225647</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 0 4 4 -1.</_>
                <_>11 0 2 2 2.</_>
                <_>9 2 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.4538191072642803e-003</threshold>
            <left_val>0.2626481950283051</left_val>
            <right_val>0.5537446141242981</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 5 1 14 -1.</_>
                <_>7 12 1 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0118807600811124</threshold>
            <left_val>0.2003753930330277</left_val>
            <right_val>0.5544745922088623</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>19 0 1 4 -1.</_>
                <_>19 2 1 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.2713660253211856e-003</threshold>
            <left_val>0.5591902732849121</left_val>
            <right_val>0.3031975924968720</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 5 6 4 -1.</_>
                <_>8 5 3 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.1376109905540943e-003</threshold>
            <left_val>0.2730407118797302</left_val>
            <right_val>0.5646508932113648</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 18 3 2 -1.</_>
                <_>10 18 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.2651998810470104e-003</threshold>
            <left_val>0.1405909061431885</left_val>
            <right_val>0.5461820960044861</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 18 3 2 -1.</_>
                <_>9 18 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.9602861031889915e-003</threshold>
            <left_val>0.1795035004615784</left_val>
            <right_val>0.5459290146827698</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 5 12 6 -1.</_>
                <_>4 7 12 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.8448226451873779e-003</threshold>
            <left_val>0.5736783146858215</left_val>
            <right_val>0.2809219956398010</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 12 2 6 -1.</_>
                <_>3 14 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.6430689767003059e-003</threshold>
            <left_val>0.2370675951242447</left_val>
            <right_val>0.5503826141357422</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 8 2 12 -1.</_>
                <_>10 12 2 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.9997808635234833e-003</threshold>
            <left_val>0.5608199834823608</left_val>
            <right_val>0.3304282128810883</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 18 3 2 -1.</_>
                <_>8 18 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.1221720166504383e-003</threshold>
            <left_val>0.1640105992555618</left_val>
            <right_val>0.5378993153572083</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 0 6 2 -1.</_>
                <_>11 0 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0156249096617103</threshold>
            <left_val>0.5227649211883545</left_val>
            <right_val>0.2288603931665421</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 11 9 3 -1.</_>
                <_>5 12 9 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0103564197197557</threshold>
            <left_val>0.7016193866729736</left_val>
            <right_val>0.4252927899360657</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 0 6 2 -1.</_>
                <_>11 0 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.7960809469223022e-003</threshold>
            <left_val>0.2767347097396851</left_val>
            <right_val>0.5355830192565918</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 1 18 5 -1.</_>
                <_>7 1 6 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.1622693985700607</threshold>
            <left_val>0.4342240095138550</left_val>
            <right_val>0.7442579269409180</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 0 4 4 -1.</_>
                <_>10 0 2 2 2.</_>
                <_>8 2 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.5542530715465546e-003</threshold>
            <left_val>0.5726485848426819</left_val>
            <right_val>0.2582125067710877</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 12 1 3 -1.</_>
                <_>3 13 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.1309209987521172e-003</threshold>
            <left_val>0.2106848061084747</left_val>
            <right_val>0.5361018776893616</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 14 5 3 -1.</_>
                <_>8 15 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0132084200158715</threshold>
            <left_val>0.7593790888786316</left_val>
            <right_val>0.4552468061447144</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 4 10 12 -1.</_>
                <_>5 4 5 6 2.</_>
                <_>10 10 5 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0659966766834259</threshold>
            <left_val>0.1252475976943970</left_val>
            <right_val>0.5344039797782898</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 6 9 12 -1.</_>
                <_>9 10 9 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.9142656177282333e-003</threshold>
            <left_val>0.3315384089946747</left_val>
            <right_val>0.5601043105125427</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 2 12 14 -1.</_>
                <_>2 2 6 7 2.</_>
                <_>8 9 6 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0208942797034979</threshold>
            <left_val>0.5506049990653992</left_val>
            <right_val>0.2768838107585907</right_val></_></_></trees>
      <stage_threshold>15.3241395950317380</stage_threshold>
      <parent>3</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 5 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 7 12 2 -1.</_>
                <_>8 7 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.1961159761995077e-003</threshold>
            <left_val>0.1762690991163254</left_val>
            <right_val>0.6156241297721863</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 4 6 4 -1.</_>
                <_>7 6 6 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8679830245673656e-003</threshold>
            <left_val>0.6118106842041016</left_val>
            <right_val>0.1832399964332581</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 5 11 8 -1.</_>
                <_>4 9 11 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.9579799845814705e-004</threshold>
            <left_val>0.0990442633628845</left_val>
            <right_val>0.5723816156387329</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 10 16 4 -1.</_>
                <_>3 12 16 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.0255657667294145e-004</threshold>
            <left_val>0.5579879879951477</left_val>
            <right_val>0.2377282977104187</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 0 16 2 -1.</_>
                <_>0 1 16 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.4510810617357492e-003</threshold>
            <left_val>0.2231457978487015</left_val>
            <right_val>0.5858935117721558</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 5 6 2 -1.</_>
                <_>9 5 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.0361850298941135e-004</threshold>
            <left_val>0.2653993964195252</left_val>
            <right_val>0.5794103741645813</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 2 6 10 -1.</_>
                <_>3 2 3 5 2.</_>
                <_>6 7 3 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.0293349884450436e-003</threshold>
            <left_val>0.5803827047348023</left_val>
            <right_val>0.2484865039587021</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 5 8 15 -1.</_>
                <_>10 10 8 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0144517095759511</threshold>
            <left_val>0.1830351948738098</left_val>
            <right_val>0.5484204888343811</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 14 8 6 -1.</_>
                <_>3 14 4 3 2.</_>
                <_>7 17 4 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.0380979403853416e-003</threshold>
            <left_val>0.3363558948040009</left_val>
            <right_val>0.6051092743873596</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 2 2 2 -1.</_>
                <_>14 3 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.6155190533027053e-003</threshold>
            <left_val>0.2286642044782639</left_val>
            <right_val>0.5441246032714844</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 10 7 6 -1.</_>
                <_>1 13 7 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.3458340913057327e-003</threshold>
            <left_val>0.5625913143157959</left_val>
            <right_val>0.2392338067293167</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 4 4 3 -1.</_>
                <_>15 4 2 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.6379579901695251e-003</threshold>
            <left_val>0.3906993865966797</left_val>
            <right_val>0.5964621901512146</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 9 14 6 -1.</_>
                <_>2 9 7 3 2.</_>
                <_>9 12 7 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0302512105554342</threshold>
            <left_val>0.5248482227325440</left_val>
            <right_val>0.1575746983289719</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 7 10 4 -1.</_>
                <_>5 9 10 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0372519902884960</threshold>
            <left_val>0.4194310903549194</left_val>
            <right_val>0.6748418807983398</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 9 8 8 -1.</_>
                <_>6 9 4 4 2.</_>
                <_>10 13 4 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0251097902655602</threshold>
            <left_val>0.1882549971342087</left_val>
            <right_val>0.5473451018333435</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 1 3 2 -1.</_>
                <_>14 2 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.3099058568477631e-003</threshold>
            <left_val>0.1339973062276840</left_val>
            <right_val>0.5227110981941223</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 4 4 2 -1.</_>
                <_>3 4 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.2086479691788554e-003</threshold>
            <left_val>0.3762088119983673</left_val>
            <right_val>0.6109635829925537</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 10 2 8 -1.</_>
                <_>11 14 2 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0219076797366142</threshold>
            <left_val>0.2663142979145050</left_val>
            <right_val>0.5404006838798523</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 0 5 3 -1.</_>
                <_>0 1 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.4116579703986645e-003</threshold>
            <left_val>0.5363578796386719</left_val>
            <right_val>0.2232273072004318</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 5 18 8 -1.</_>
                <_>11 5 9 4 2.</_>
                <_>2 9 9 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0699463263154030</threshold>
            <left_val>0.5358232855796814</left_val>
            <right_val>0.2453698068857193</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 6 1 6 -1.</_>
                <_>6 9 1 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.4520021290518343e-004</threshold>
            <left_val>0.2409671992063522</left_val>
            <right_val>0.5376930236816406</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>19 1 1 3 -1.</_>
                <_>19 2 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.2627709656953812e-003</threshold>
            <left_val>0.5425856709480286</left_val>
            <right_val>0.3155693113803864</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 6 6 6 -1.</_>
                <_>9 6 2 6 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0227195098996162</threshold>
            <left_val>0.4158405959606171</left_val>
            <right_val>0.6597865223884583</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>19 1 1 3 -1.</_>
                <_>19 2 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8111000536009669e-003</threshold>
            <left_val>0.2811253070831299</left_val>
            <right_val>0.5505244731903076</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 13 2 3 -1.</_>
                <_>3 14 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.3469670452177525e-003</threshold>
            <left_val>0.5260028243064880</left_val>
            <right_val>0.1891465038061142</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 4 8 12 -1.</_>
                <_>12 4 4 6 2.</_>
                <_>8 10 4 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.0791751234792173e-004</threshold>
            <left_val>0.5673509240150452</left_val>
            <right_val>0.3344210088253021</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 2 6 3 -1.</_>
                <_>7 2 2 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0127347996458411</threshold>
            <left_val>0.5343592166900635</left_val>
            <right_val>0.2395612001419067</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 1 9 10 -1.</_>
                <_>6 6 9 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.3119727894663811e-003</threshold>
            <left_val>0.6010890007019043</left_val>
            <right_val>0.4022207856178284</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 4 6 12 -1.</_>
                <_>2 4 2 12 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0569487512111664</threshold>
            <left_val>0.8199151158332825</left_val>
            <right_val>0.4543190896511078</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 13 2 3 -1.</_>
                <_>15 14 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.0116591155529022e-003</threshold>
            <left_val>0.2200281023979187</left_val>
            <right_val>0.5357710719108582</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 14 5 3 -1.</_>
                <_>7 15 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.0334368608891964e-003</threshold>
            <left_val>0.4413081109523773</left_val>
            <right_val>0.7181751132011414</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 13 3 3 -1.</_>
                <_>15 14 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.9437441155314445e-003</threshold>
            <left_val>0.5478860735893250</left_val>
            <right_val>0.2791733145713806</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 14 8 3 -1.</_>
                <_>6 15 8 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.6591119132936001e-003</threshold>
            <left_val>0.6357867717742920</left_val>
            <right_val>0.3989723920822144</right_val></_></_>
        <_>
          <!-- tree 33 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 13 3 3 -1.</_>
                <_>15 14 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.8456181064248085e-003</threshold>
            <left_val>0.3493686020374298</left_val>
            <right_val>0.5300664901733398</right_val></_></_>
        <_>
          <!-- tree 34 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 13 3 3 -1.</_>
                <_>2 14 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.1926261298358440e-003</threshold>
            <left_val>0.1119614988565445</left_val>
            <right_val>0.5229672789573669</right_val></_></_>
        <_>
          <!-- tree 35 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 7 12 12 -1.</_>
                <_>10 7 6 6 2.</_>
                <_>4 13 6 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0527989417314529</threshold>
            <left_val>0.2387102991342545</left_val>
            <right_val>0.5453451275825501</right_val></_></_>
        <_>
          <!-- tree 36 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 7 2 6 -1.</_>
                <_>10 7 1 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.9537667334079742e-003</threshold>
            <left_val>0.7586917877197266</left_val>
            <right_val>0.4439376890659332</right_val></_></_>
        <_>
          <!-- tree 37 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 9 5 2 -1.</_>
                <_>8 10 5 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.7344180271029472e-003</threshold>
            <left_val>0.2565476894378662</left_val>
            <right_val>0.5489321947097778</right_val></_></_>
        <_>
          <!-- tree 38 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 6 3 4 -1.</_>
                <_>9 6 1 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8507939530536532e-003</threshold>
            <left_val>0.6734347939491272</left_val>
            <right_val>0.4252474904060364</right_val></_></_>
        <_>
          <!-- tree 39 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 6 2 8 -1.</_>
                <_>9 10 2 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0159189198166132</threshold>
            <left_val>0.5488352775573731</left_val>
            <right_val>0.2292661964893341</right_val></_></_>
        <_>
          <!-- tree 40 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 7 3 6 -1.</_>
                <_>8 7 1 6 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2687679845839739e-003</threshold>
            <left_val>0.6104331016540527</left_val>
            <right_val>0.4022389948368073</right_val></_></_>
        <_>
          <!-- tree 41 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 3 3 3 -1.</_>
                <_>12 3 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.2883910723030567e-003</threshold>
            <left_val>0.5310853123664856</left_val>
            <right_val>0.1536193042993546</right_val></_></_>
        <_>
          <!-- tree 42 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 4 6 1 -1.</_>
                <_>7 4 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.2259892001748085e-003</threshold>
            <left_val>0.1729111969470978</left_val>
            <right_val>0.5241606235504150</right_val></_></_>
        <_>
          <!-- tree 43 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 6 10 3 -1.</_>
                <_>5 7 10 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0121325999498367</threshold>
            <left_val>0.6597759723663330</left_val>
            <right_val>0.4325182139873505</right_val></_></_></trees>
      <stage_threshold>21.0106391906738280</stage_threshold>
      <parent>4</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 6 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 3 6 9 -1.</_>
                <_>7 6 6 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.9184908382594585e-003</threshold>
            <left_val>0.6103435158729553</left_val>
            <right_val>0.1469330936670303</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 7 9 1 -1.</_>
                <_>9 7 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.5971299726516008e-003</threshold>
            <left_val>0.2632363140583038</left_val>
            <right_val>0.5896466970443726</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 8 16 8 -1.</_>
                <_>2 12 16 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0177801102399826</threshold>
            <left_val>0.5872874259948731</left_val>
            <right_val>0.1760361939668655</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 6 2 6 -1.</_>
                <_>14 9 2 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.5334769897162914e-004</threshold>
            <left_val>0.1567801982164383</left_val>
            <right_val>0.5596066117286682</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 5 6 15 -1.</_>
                <_>1 10 6 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.8353091329336166e-004</threshold>
            <left_val>0.1913153976202011</left_val>
            <right_val>0.5732036232948303</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 0 6 9 -1.</_>
                <_>10 3 6 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.6104689566418529e-003</threshold>
            <left_val>0.2914913892745972</left_val>
            <right_val>0.5623080730438232</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 6 7 14 -1.</_>
                <_>6 13 7 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0977506190538406</threshold>
            <left_val>0.1943476945161820</left_val>
            <right_val>0.5648233294487000</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 7 3 6 -1.</_>
                <_>13 9 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.5182358482852578e-004</threshold>
            <left_val>0.3134616911411285</left_val>
            <right_val>0.5504639744758606</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 8 15 4 -1.</_>
                <_>6 8 5 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0128582203760743</threshold>
            <left_val>0.2536481916904450</left_val>
            <right_val>0.5760142803192139</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 2 3 10 -1.</_>
                <_>11 7 3 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.1530239395797253e-003</threshold>
            <left_val>0.5767722129821777</left_val>
            <right_val>0.3659774065017700</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 7 4 6 -1.</_>
                <_>3 9 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.7092459602281451e-003</threshold>
            <left_val>0.2843191027641296</left_val>
            <right_val>0.5918939113616943</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 3 6 10 -1.</_>
                <_>15 3 2 10 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.5217359699308872e-003</threshold>
            <left_val>0.4052427113056183</left_val>
            <right_val>0.6183109283447266</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 7 8 10 -1.</_>
                <_>5 7 4 5 2.</_>
                <_>9 12 4 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.2479810286313295e-003</threshold>
            <left_val>0.5783755183219910</left_val>
            <right_val>0.3135401010513306</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 12 12 -1.</_>
                <_>10 4 6 6 2.</_>
                <_>4 10 6 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0520062111318111</threshold>
            <left_val>0.5541312098503113</left_val>
            <right_val>0.1916636973619461</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 4 6 9 -1.</_>
                <_>3 4 2 9 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0120855299755931</threshold>
            <left_val>0.4032655954360962</left_val>
            <right_val>0.6644591093063355</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 3 2 5 -1.</_>
                <_>11 3 1 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.4687820112158079e-005</threshold>
            <left_val>0.3535977900028229</left_val>
            <right_val>0.5709382891654968</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 3 2 5 -1.</_>
                <_>8 3 1 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.1395188570022583e-006</threshold>
            <left_val>0.3037444949150085</left_val>
            <right_val>0.5610269904136658</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 14 2 3 -1.</_>
                <_>10 15 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.6001640148460865e-003</threshold>
            <left_val>0.7181087136268616</left_val>
            <right_val>0.4580326080322266</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 12 6 2 -1.</_>
                <_>8 12 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.0058949012309313e-003</threshold>
            <left_val>0.5621951818466187</left_val>
            <right_val>0.2953684031963348</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 14 2 3 -1.</_>
                <_>9 15 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.5050270855426788e-003</threshold>
            <left_val>0.4615387916564941</left_val>
            <right_val>0.7619017958641052</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 11 12 6 -1.</_>
                <_>4 14 12 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0117468303069472</threshold>
            <left_val>0.5343837141990662</left_val>
            <right_val>0.1772529035806656</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 11 5 9 -1.</_>
                <_>11 14 5 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0583163388073444</threshold>
            <left_val>0.1686245948076248</left_val>
            <right_val>0.5340772271156311</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 15 3 2 -1.</_>
                <_>6 16 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.3629379575140774e-004</threshold>
            <left_val>0.3792056143283844</left_val>
            <right_val>0.6026803851127625</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 0 3 5 -1.</_>
                <_>12 0 1 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.8156180679798126e-003</threshold>
            <left_val>0.1512867063283920</left_val>
            <right_val>0.5324323773384094</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 5 6 7 -1.</_>
                <_>8 5 3 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0108761601150036</threshold>
            <left_val>0.2081822007894516</left_val>
            <right_val>0.5319945216178894</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 0 1 9 -1.</_>
                <_>13 3 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.7745519764721394e-003</threshold>
            <left_val>0.4098246991634369</left_val>
            <right_val>0.5210328102111816</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 2 4 8 -1.</_>
                <_>3 2 2 4 2.</_>
                <_>5 6 2 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.8276381827890873e-004</threshold>
            <left_val>0.5693274140357971</left_val>
            <right_val>0.3478842079639435</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 12 4 6 -1.</_>
                <_>13 14 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0138704096898437</threshold>
            <left_val>0.5326750874519348</left_val>
            <right_val>0.2257698029279709</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 12 4 6 -1.</_>
                <_>3 14 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0236749108880758</threshold>
            <left_val>0.1551305055618286</left_val>
            <right_val>0.5200707912445068</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 11 3 4 -1.</_>
                <_>13 13 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.4879409718560055e-005</threshold>
            <left_val>0.5500566959381104</left_val>
            <right_val>0.3820176124572754</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 4 3 -1.</_>
                <_>4 5 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.6190641112625599e-003</threshold>
            <left_val>0.4238683879375458</left_val>
            <right_val>0.6639748215675354</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 5 11 8 -1.</_>
                <_>7 9 11 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0198171101510525</threshold>
            <left_val>0.2150038033723831</left_val>
            <right_val>0.5382357835769653</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 8 3 4 -1.</_>
                <_>8 8 1 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.8154039066284895e-003</threshold>
            <left_val>0.6675711274147034</left_val>
            <right_val>0.4215297102928162</right_val></_></_>
        <_>
          <!-- tree 33 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 1 6 1 -1.</_>
                <_>11 1 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.9775829538702965e-003</threshold>
            <left_val>0.2267289012670517</left_val>
            <right_val>0.5386328101158142</right_val></_></_>
        <_>
          <!-- tree 34 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 5 3 3 -1.</_>
                <_>5 6 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.2441020701080561e-003</threshold>
            <left_val>0.4308691024780273</left_val>
            <right_val>0.6855735778808594</right_val></_></_>
        <_>
          <!-- tree 35 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 9 20 6 -1.</_>
                <_>10 9 10 3 2.</_>
                <_>0 12 10 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0122824599966407</threshold>
            <left_val>0.5836614966392517</left_val>
            <right_val>0.3467479050159454</right_val></_></_>
        <_>
          <!-- tree 36 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 6 3 5 -1.</_>
                <_>9 6 1 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.8548699337989092e-003</threshold>
            <left_val>0.7016944885253906</left_val>
            <right_val>0.4311453998088837</right_val></_></_>
        <_>
          <!-- tree 37 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 0 1 3 -1.</_>
                <_>11 1 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.7875669077038765e-003</threshold>
            <left_val>0.2895345091819763</left_val>
            <right_val>0.5224946141242981</right_val></_></_>
        <_>
          <!-- tree 38 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 2 4 2 -1.</_>
                <_>4 3 4 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2201230274513364e-003</threshold>
            <left_val>0.2975570857524872</left_val>
            <right_val>0.5481644868850708</right_val></_></_>
        <_>
          <!-- tree 39 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 6 4 3 -1.</_>
                <_>12 7 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0101605998352170</threshold>
            <left_val>0.4888817965984345</left_val>
            <right_val>0.8182697892189026</right_val></_></_>
        <_>
          <!-- tree 40 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 0 6 4 -1.</_>
                <_>7 0 2 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0161745697259903</threshold>
            <left_val>0.1481492966413498</left_val>
            <right_val>0.5239992737770081</right_val></_></_>
        <_>
          <!-- tree 41 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 7 3 8 -1.</_>
                <_>10 7 1 8 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0192924607545137</threshold>
            <left_val>0.4786309897899628</left_val>
            <right_val>0.7378190755844116</right_val></_></_>
        <_>
          <!-- tree 42 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 7 2 2 -1.</_>
                <_>10 7 1 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.2479539513587952e-003</threshold>
            <left_val>0.7374222874641419</left_val>
            <right_val>0.4470643997192383</right_val></_></_>
        <_>
          <!-- tree 43 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 7 14 4 -1.</_>
                <_>13 7 7 2 2.</_>
                <_>6 9 7 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.3803480267524719e-003</threshold>
            <left_val>0.3489154875278473</left_val>
            <right_val>0.5537996292114258</right_val></_></_>
        <_>
          <!-- tree 44 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 5 3 6 -1.</_>
                <_>0 7 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0126061299815774</threshold>
            <left_val>0.2379686981439591</left_val>
            <right_val>0.5315443277359009</right_val></_></_>
        <_>
          <!-- tree 45 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 11 3 4 -1.</_>
                <_>13 13 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0256219301372766</threshold>
            <left_val>0.1964688003063202</left_val>
            <right_val>0.5138769745826721</right_val></_></_>
        <_>
          <!-- tree 46 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 11 3 4 -1.</_>
                <_>4 13 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.5741496402770281e-005</threshold>
            <left_val>0.5590522885322571</left_val>
            <right_val>0.3365853130817413</right_val></_></_>
        <_>
          <!-- tree 47 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 9 12 8 -1.</_>
                <_>11 9 6 4 2.</_>
                <_>5 13 6 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0892108827829361</threshold>
            <left_val>0.0634046569466591</left_val>
            <right_val>0.5162634849548340</right_val></_></_>
        <_>
          <!-- tree 48 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 12 1 3 -1.</_>
                <_>9 13 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.7670480776578188e-003</threshold>
            <left_val>0.7323467731475830</left_val>
            <right_val>0.4490706026554108</right_val></_></_>
        <_>
          <!-- tree 49 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 15 2 4 -1.</_>
                <_>10 17 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.7152578695677221e-004</threshold>
            <left_val>0.4114834964275360</left_val>
            <right_val>0.5985518097877502</right_val></_></_></trees>
      <stage_threshold>23.9187908172607420</stage_threshold>
      <parent>5</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 7 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 7 6 1 -1.</_>
                <_>9 7 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.4786219689995050e-003</threshold>
            <left_val>0.2663545012474060</left_val>
            <right_val>0.6643316745758057</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 3 6 6 -1.</_>
                <_>15 3 3 3 2.</_>
                <_>12 6 3 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8741659587249160e-003</threshold>
            <left_val>0.6143848896026611</left_val>
            <right_val>0.2518512904644013</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 4 10 6 -1.</_>
                <_>0 6 10 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.7151009524241090e-003</threshold>
            <left_val>0.5766341090202332</left_val>
            <right_val>0.2397463023662567</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 3 8 14 -1.</_>
                <_>12 3 4 7 2.</_>
                <_>8 10 4 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8939269939437509e-003</threshold>
            <left_val>0.5682045817375183</left_val>
            <right_val>0.2529144883155823</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 7 15 -1.</_>
                <_>4 9 7 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.3006052039563656e-003</threshold>
            <left_val>0.1640675961971283</left_val>
            <right_val>0.5556079745292664</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 2 6 8 -1.</_>
                <_>15 2 3 4 2.</_>
                <_>12 6 3 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0466625317931175</threshold>
            <left_val>0.6123154163360596</left_val>
            <right_val>0.4762830138206482</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 2 6 8 -1.</_>
                <_>2 2 3 4 2.</_>
                <_>5 6 3 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.9431332414969802e-004</threshold>
            <left_val>0.5707858800888062</left_val>
            <right_val>0.2839404046535492</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 13 18 7 -1.</_>
                <_>8 13 6 7 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0148916700854898</threshold>
            <left_val>0.4089672863483429</left_val>
            <right_val>0.6006367206573486</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 3 8 14 -1.</_>
                <_>4 3 4 7 2.</_>
                <_>8 10 4 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2046529445797205e-003</threshold>
            <left_val>0.5712450742721558</left_val>
            <right_val>0.2705289125442505</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>18 1 2 6 -1.</_>
                <_>18 3 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.0619381256401539e-003</threshold>
            <left_val>0.5262504220008850</left_val>
            <right_val>0.3262225985527039</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 11 2 3 -1.</_>
                <_>9 12 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.5286648888140917e-003</threshold>
            <left_val>0.6853830814361572</left_val>
            <right_val>0.4199256896972656</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>18 1 2 6 -1.</_>
                <_>18 3 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.9010218828916550e-003</threshold>
            <left_val>0.3266282081604004</left_val>
            <right_val>0.5434812903404236</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 1 2 6 -1.</_>
                <_>0 3 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.6702760048210621e-003</threshold>
            <left_val>0.5468410849571228</left_val>
            <right_val>0.2319003939628601</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 5 18 6 -1.</_>
                <_>1 7 18 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.0304100364446640e-003</threshold>
            <left_val>0.5570667982101440</left_val>
            <right_val>0.2708238065242767</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 2 6 7 -1.</_>
                <_>3 2 3 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.9803649522364140e-003</threshold>
            <left_val>0.3700568974018097</left_val>
            <right_val>0.5890625715255737</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 3 6 14 -1.</_>
                <_>7 10 6 7 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0758405104279518</threshold>
            <left_val>0.2140070050954819</left_val>
            <right_val>0.5419948101043701</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 7 13 10 -1.</_>
                <_>3 12 13 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0192625392228365</threshold>
            <left_val>0.5526772141456604</left_val>
            <right_val>0.2726590037345886</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 15 2 2 -1.</_>
                <_>11 16 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.8888259364757687e-004</threshold>
            <left_val>0.3958011865615845</left_val>
            <right_val>0.6017209887504578</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 11 16 4 -1.</_>
                <_>2 11 8 2 2.</_>
                <_>10 13 8 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0293695498257875</threshold>
            <left_val>0.5241373777389526</left_val>
            <right_val>0.1435758024454117</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 7 6 4 -1.</_>
                <_>16 7 3 2 2.</_>
                <_>13 9 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.0417619487270713e-003</threshold>
            <left_val>0.3385409116744995</left_val>
            <right_val>0.5929983258247376</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 10 3 9 -1.</_>
                <_>6 13 3 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.6125640142709017e-003</threshold>
            <left_val>0.5485377907752991</left_val>
            <right_val>0.3021597862243652</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 6 1 6 -1.</_>
                <_>14 9 1 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>9.6977467183023691e-004</threshold>
            <left_val>0.3375276029109955</left_val>
            <right_val>0.5532032847404480</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 10 4 1 -1.</_>
                <_>7 10 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.9512659208849072e-004</threshold>
            <left_val>0.5631743073463440</left_val>
            <right_val>0.3359399139881134</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 8 15 5 -1.</_>
                <_>8 8 5 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.1015655994415283</threshold>
            <left_val>0.0637350380420685</left_val>
            <right_val>0.5230425000190735</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 6 5 4 -1.</_>
                <_>1 8 5 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0361566990613937</threshold>
            <left_val>0.5136963129043579</left_val>
            <right_val>0.1029528975486755</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 1 17 6 -1.</_>
                <_>3 3 17 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.4624140243977308e-003</threshold>
            <left_val>0.3879320025444031</left_val>
            <right_val>0.5558289289474487</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 7 8 2 -1.</_>
                <_>10 7 4 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0195549800992012</threshold>
            <left_val>0.5250086784362793</left_val>
            <right_val>0.1875859946012497</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 7 3 2 -1.</_>
                <_>10 7 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.3121440317481756e-003</threshold>
            <left_val>0.6672028899192810</left_val>
            <right_val>0.4679641127586365</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 7 3 2 -1.</_>
                <_>9 7 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8605289515107870e-003</threshold>
            <left_val>0.7163379192352295</left_val>
            <right_val>0.4334670901298523</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 9 4 2 -1.</_>
                <_>8 10 4 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.4026362057775259e-004</threshold>
            <left_val>0.3021360933780670</left_val>
            <right_val>0.5650203227996826</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 8 4 3 -1.</_>
                <_>8 9 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.2418331615626812e-003</threshold>
            <left_val>0.1820009052753449</left_val>
            <right_val>0.5250256061553955</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 5 6 4 -1.</_>
                <_>9 5 3 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.1729019752237946e-004</threshold>
            <left_val>0.3389188051223755</left_val>
            <right_val>0.5445973277091980</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 13 4 3 -1.</_>
                <_>8 14 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.1878840159624815e-003</threshold>
            <left_val>0.4085349142551422</left_val>
            <right_val>0.6253563165664673</right_val></_></_>
        <_>
          <!-- tree 33 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 7 12 6 -1.</_>
                <_>10 7 6 3 2.</_>
                <_>4 10 6 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0108813596889377</threshold>
            <left_val>0.3378399014472961</left_val>
            <right_val>0.5700082778930664</right_val></_></_>
        <_>
          <!-- tree 34 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 14 4 3 -1.</_>
                <_>8 15 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.7354859737679362e-003</threshold>
            <left_val>0.4204635918140411</left_val>
            <right_val>0.6523038744926453</right_val></_></_>
        <_>
          <!-- tree 35 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 7 3 3 -1.</_>
                <_>9 8 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.5119052305817604e-003</threshold>
            <left_val>0.2595216035842896</left_val>
            <right_val>0.5428143739700317</right_val></_></_>
        <_>
          <!-- tree 36 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 4 3 8 -1.</_>
                <_>8 4 1 8 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2136430013924837e-003</threshold>
            <left_val>0.6165143847465515</left_val>
            <right_val>0.3977893888950348</right_val></_></_>
        <_>
          <!-- tree 37 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 0 3 6 -1.</_>
                <_>11 0 1 6 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0103542404249310</threshold>
            <left_val>0.1628028005361557</left_val>
            <right_val>0.5219504833221436</right_val></_></_>
        <_>
          <!-- tree 38 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 3 4 8 -1.</_>
                <_>8 3 2 8 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.5858830455690622e-004</threshold>
            <left_val>0.3199650943279266</left_val>
            <right_val>0.5503574013710022</right_val></_></_>
        <_>
          <!-- tree 39 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 3 6 13 -1.</_>
                <_>14 3 3 13 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0152996499091387</threshold>
            <left_val>0.4103994071483612</left_val>
            <right_val>0.6122388243675232</right_val></_></_>
        <_>
          <!-- tree 40 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 13 3 6 -1.</_>
                <_>8 16 3 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0215882100164890</threshold>
            <left_val>0.1034912988543510</left_val>
            <right_val>0.5197384953498840</right_val></_></_>
        <_>
          <!-- tree 41 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 3 6 13 -1.</_>
                <_>14 3 3 13 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.1283462941646576</threshold>
            <left_val>0.8493865132331848</left_val>
            <right_val>0.4893102943897247</right_val></_></_>
        <_>
          <!-- tree 42 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 7 10 4 -1.</_>
                <_>0 7 5 2 2.</_>
                <_>5 9 5 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.2927189711481333e-003</threshold>
            <left_val>0.3130157887935638</left_val>
            <right_val>0.5471575260162354</right_val></_></_>
        <_>
          <!-- tree 43 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 3 6 13 -1.</_>
                <_>14 3 3 13 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0799151062965393</threshold>
            <left_val>0.4856320917606354</left_val>
            <right_val>0.6073989272117615</right_val></_></_>
        <_>
          <!-- tree 44 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 3 6 13 -1.</_>
                <_>3 3 3 13 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0794410929083824</threshold>
            <left_val>0.8394674062728882</left_val>
            <right_val>0.4624533057212830</right_val></_></_>
        <_>
          <!-- tree 45 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 1 4 1 -1.</_>
                <_>9 1 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.2800010889768600e-003</threshold>
            <left_val>0.1881695985794067</left_val>
            <right_val>0.5306698083877564</right_val></_></_>
        <_>
          <!-- tree 46 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 0 2 1 -1.</_>
                <_>9 0 1 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.0463109938427806e-003</threshold>
            <left_val>0.5271229147911072</left_val>
            <right_val>0.2583065927028656</right_val></_></_>
        <_>
          <!-- tree 47 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 16 4 4 -1.</_>
                <_>12 16 2 2 2.</_>
                <_>10 18 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.6317298761568964e-004</threshold>
            <left_val>0.4235304892063141</left_val>
            <right_val>0.5735440850257874</right_val></_></_>
        <_>
          <!-- tree 48 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 6 2 3 -1.</_>
                <_>10 6 1 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.6173160187900066e-003</threshold>
            <left_val>0.6934396028518677</left_val>
            <right_val>0.4495444893836975</right_val></_></_>
        <_>
          <!-- tree 49 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 5 12 2 -1.</_>
                <_>8 5 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0114218797534704</threshold>
            <left_val>0.5900921225547791</left_val>
            <right_val>0.4138193130493164</right_val></_></_>
        <_>
          <!-- tree 50 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 7 3 5 -1.</_>
                <_>9 7 1 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.9963278900831938e-003</threshold>
            <left_val>0.6466382741928101</left_val>
            <right_val>0.4327239990234375</right_val></_></_></trees>
      <stage_threshold>24.5278797149658200</stage_threshold>
      <parent>6</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 8 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 4 8 6 -1.</_>
                <_>6 6 8 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.9691245704889297e-003</threshold>
            <left_val>0.6142324209213257</left_val>
            <right_val>0.2482212036848068</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 5 2 12 -1.</_>
                <_>9 11 2 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.3073059320449829e-004</threshold>
            <left_val>0.5704951882362366</left_val>
            <right_val>0.2321965992450714</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 6 6 8 -1.</_>
                <_>4 10 6 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.4045301405712962e-004</threshold>
            <left_val>0.2112251967191696</left_val>
            <right_val>0.5814933180809021</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 2 8 5 -1.</_>
                <_>12 2 4 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.5424019917845726e-003</threshold>
            <left_val>0.2950482070446014</left_val>
            <right_val>0.5866311788558960</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 8 18 3 -1.</_>
                <_>0 9 18 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>9.2477443104144186e-005</threshold>
            <left_val>0.2990990877151489</left_val>
            <right_val>0.5791326761245728</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 12 4 8 -1.</_>
                <_>8 16 4 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.6603146046400070e-003</threshold>
            <left_val>0.2813029885292053</left_val>
            <right_val>0.5635542273521423</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 2 8 5 -1.</_>
                <_>4 2 4 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.0515816807746887e-003</threshold>
            <left_val>0.3535369038581848</left_val>
            <right_val>0.6054757237434387</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 11 3 4 -1.</_>
                <_>13 13 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.3835240649059415e-004</threshold>
            <left_val>0.5596532225608826</left_val>
            <right_val>0.2731510996818543</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 11 6 1 -1.</_>
                <_>7 11 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.8168973636347800e-005</threshold>
            <left_val>0.5978031754493713</left_val>
            <right_val>0.3638561069965363</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 3 3 1 -1.</_>
                <_>12 3 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.1298790341243148e-003</threshold>
            <left_val>0.2755252122879028</left_val>
            <right_val>0.5432729125022888</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 13 5 3 -1.</_>
                <_>7 14 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.4356150105595589e-003</threshold>
            <left_val>0.4305641949176788</left_val>
            <right_val>0.7069833278656006</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 11 7 6 -1.</_>
                <_>11 14 7 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0568293295800686</threshold>
            <left_val>0.2495242953300476</left_val>
            <right_val>0.5294997096061707</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 11 7 6 -1.</_>
                <_>2 14 7 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.0668169967830181e-003</threshold>
            <left_val>0.5478553175926209</left_val>
            <right_val>0.2497723996639252</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 14 2 6 -1.</_>
                <_>12 16 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.8164798499783501e-005</threshold>
            <left_val>0.3938601016998291</left_val>
            <right_val>0.5706356167793274</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 14 3 3 -1.</_>
                <_>8 15 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.1795017682015896e-003</threshold>
            <left_val>0.4407606124877930</left_val>
            <right_val>0.7394766807556152</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 0 3 5 -1.</_>
                <_>12 0 1 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.4985752105712891e-003</threshold>
            <left_val>0.5445243120193481</left_val>
            <right_val>0.2479152977466583</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 1 4 9 -1.</_>
                <_>8 1 2 9 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.0211090557277203e-003</threshold>
            <left_val>0.2544766962528229</left_val>
            <right_val>0.5338971018791199</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 3 6 1 -1.</_>
                <_>12 3 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.4247528314590454e-003</threshold>
            <left_val>0.2718858122825623</left_val>
            <right_val>0.5324069261550903</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 8 3 4 -1.</_>
                <_>8 10 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.0559899965301156e-003</threshold>
            <left_val>0.3178288042545319</left_val>
            <right_val>0.5534508824348450</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 12 4 2 -1.</_>
                <_>8 13 4 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.6465808777138591e-004</threshold>
            <left_val>0.4284219145774841</left_val>
            <right_val>0.6558194160461426</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 18 4 2 -1.</_>
                <_>5 19 4 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.7524109464138746e-004</threshold>
            <left_val>0.5902860760688782</left_val>
            <right_val>0.3810262978076935</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 1 18 6 -1.</_>
                <_>2 3 18 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.2293202131986618e-003</threshold>
            <left_val>0.3816489875316620</left_val>
            <right_val>0.5709385871887207</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 0 3 2 -1.</_>
                <_>7 0 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.2868210691958666e-003</threshold>
            <left_val>0.1747743934392929</left_val>
            <right_val>0.5259544253349304</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 8 6 2 -1.</_>
                <_>16 8 3 1 2.</_>
                <_>13 9 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.5611879643984139e-004</threshold>
            <left_val>0.3601722121238709</left_val>
            <right_val>0.5725612044334412</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 10 3 6 -1.</_>
                <_>6 13 3 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.3621381488919724e-006</threshold>
            <left_val>0.5401858091354370</left_val>
            <right_val>0.3044497072696686</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 13 20 4 -1.</_>
                <_>10 13 10 2 2.</_>
                <_>0 15 10 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0147672500461340</threshold>
            <left_val>0.3220770061016083</left_val>
            <right_val>0.5573434829711914</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 7 6 5 -1.</_>
                <_>9 7 2 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0244895908981562</threshold>
            <left_val>0.4301528036594391</left_val>
            <right_val>0.6518812775611877</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 0 2 2 -1.</_>
                <_>11 1 2 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.7652091123163700e-004</threshold>
            <left_val>0.3564583063125610</left_val>
            <right_val>0.5598236918449402</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 8 6 2 -1.</_>
                <_>1 8 3 1 2.</_>
                <_>4 9 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.3657688517414499e-006</threshold>
            <left_val>0.3490782976150513</left_val>
            <right_val>0.5561897754669190</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 2 20 2 -1.</_>
                <_>10 2 10 1 2.</_>
                <_>0 3 10 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0150999398902059</threshold>
            <left_val>0.1776272058486939</left_val>
            <right_val>0.5335299968719482</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 14 5 3 -1.</_>
                <_>7 15 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.8316650316119194e-003</threshold>
            <left_val>0.6149687767028809</left_val>
            <right_val>0.4221394062042236</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 13 6 6 -1.</_>
                <_>10 13 3 3 2.</_>
                <_>7 16 3 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0169254001230001</threshold>
            <left_val>0.5413014888763428</left_val>
            <right_val>0.2166585028171539</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 12 2 3 -1.</_>
                <_>9 13 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.0477850232273340e-003</threshold>
            <left_val>0.6449490785598755</left_val>
            <right_val>0.4354617893695831</right_val></_></_>
        <_>
          <!-- tree 33 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>16 11 1 6 -1.</_>
                <_>16 13 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.2140589319169521e-003</threshold>
            <left_val>0.5400155186653137</left_val>
            <right_val>0.3523217141628265</right_val></_></_>
        <_>
          <!-- tree 34 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 11 1 6 -1.</_>
                <_>3 13 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.0023201145231724e-003</threshold>
            <left_val>0.2774524092674255</left_val>
            <right_val>0.5338417291641235</right_val></_></_>
        <_>
          <!-- tree 35 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 14 12 -1.</_>
                <_>11 4 7 6 2.</_>
                <_>4 10 7 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.4182129465043545e-003</threshold>
            <left_val>0.5676739215850830</left_val>
            <right_val>0.3702817857265472</right_val></_></_>
        <_>
          <!-- tree 36 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 4 3 3 -1.</_>
                <_>5 5 3 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.8764587417244911e-003</threshold>
            <left_val>0.7749221920967102</left_val>
            <right_val>0.4583688974380493</right_val></_></_>
        <_>
          <!-- tree 37 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 3 3 3 -1.</_>
                <_>13 3 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.7311739977449179e-003</threshold>
            <left_val>0.5338721871376038</left_val>
            <right_val>0.3996661007404327</right_val></_></_>
        <_>
          <!-- tree 38 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 6 8 3 -1.</_>
                <_>6 7 8 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.5082379579544067e-003</threshold>
            <left_val>0.5611963272094727</left_val>
            <right_val>0.3777498900890350</right_val></_></_>
        <_>
          <!-- tree 39 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>12 3 3 3 -1.</_>
                <_>13 3 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.0541074275970459e-003</threshold>
            <left_val>0.2915228903293610</left_val>
            <right_val>0.5179182887077332</right_val></_></_>
        <_>
          <!-- tree 40 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 1 4 10 -1.</_>
                <_>3 1 2 5 2.</_>
                <_>5 6 2 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.7938813269138336e-004</threshold>
            <left_val>0.5536432862281799</left_val>
            <right_val>0.3700192868709564</right_val></_></_>
        <_>
          <!-- tree 41 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 7 10 2 -1.</_>
                <_>5 7 5 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.8745909482240677e-003</threshold>
            <left_val>0.3754391074180603</left_val>
            <right_val>0.5679376125335693</right_val></_></_>
        <_>
          <!-- tree 42 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 7 3 3 -1.</_>
                <_>9 7 1 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.4936719350516796e-003</threshold>
            <left_val>0.7019699215888977</left_val>
            <right_val>0.4480949938297272</right_val></_></_>
        <_>
          <!-- tree 43 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 12 2 3 -1.</_>
                <_>15 13 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.4389229044318199e-003</threshold>
            <left_val>0.2310364991426468</left_val>
            <right_val>0.5313386917114258</right_val></_></_>
        <_>
          <!-- tree 44 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 8 3 4 -1.</_>
                <_>8 8 1 4 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.5094640487805009e-004</threshold>
            <left_val>0.5864868760108948</left_val>
            <right_val>0.4129343032836914</right_val></_></_>
        <_>
          <!-- tree 45 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 4 1 12 -1.</_>
                <_>13 10 1 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.4528800420521293e-005</threshold>
            <left_val>0.3732407093048096</left_val>
            <right_val>0.5619621276855469</right_val></_></_>
        <_>
          <!-- tree 46 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 5 12 12 -1.</_>
                <_>4 5 6 6 2.</_>
                <_>10 11 6 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0407580696046352</threshold>
            <left_val>0.5312091112136841</left_val>
            <right_val>0.2720521986484528</right_val></_></_>
        <_>
          <!-- tree 47 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 14 7 3 -1.</_>
                <_>7 15 7 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.6505931317806244e-003</threshold>
            <left_val>0.4710015952587128</left_val>
            <right_val>0.6693493723869324</right_val></_></_>
        <_>
          <!-- tree 48 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 12 2 3 -1.</_>
                <_>3 13 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.5759351924061775e-003</threshold>
            <left_val>0.5167819261550903</left_val>
            <right_val>0.1637275964021683</right_val></_></_>
        <_>
          <!-- tree 49 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 2 14 2 -1.</_>
                <_>10 2 7 1 2.</_>
                <_>3 3 7 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.5269311890006065e-003</threshold>
            <left_val>0.5397608876228333</left_val>
            <right_val>0.2938531935214996</right_val></_></_>
        <_>
          <!-- tree 50 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 1 3 10 -1.</_>
                <_>1 1 1 10 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0136603796854615</threshold>
            <left_val>0.7086488008499146</left_val>
            <right_val>0.4532200098037720</right_val></_></_>
        <_>
          <!-- tree 51 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 0 6 5 -1.</_>
                <_>11 0 2 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0273588690906763</threshold>
            <left_val>0.5206481218338013</left_val>
            <right_val>0.3589231967926025</right_val></_></_>
        <_>
          <!-- tree 52 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 7 6 2 -1.</_>
                <_>8 7 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.2197551596909761e-004</threshold>
            <left_val>0.3507075905799866</left_val>
            <right_val>0.5441123247146606</right_val></_></_>
        <_>
          <!-- tree 53 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 1 6 10 -1.</_>
                <_>7 6 6 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.3077080734074116e-003</threshold>
            <left_val>0.5859522819519043</left_val>
            <right_val>0.4024891853332520</right_val></_></_>
        <_>
          <!-- tree 54 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 1 18 3 -1.</_>
                <_>7 1 6 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0106311095878482</threshold>
            <left_val>0.6743267178535461</left_val>
            <right_val>0.4422602951526642</right_val></_></_>
        <_>
          <!-- tree 55 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>16 3 3 6 -1.</_>
                <_>16 5 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0194416493177414</threshold>
            <left_val>0.5282716155052185</left_val>
            <right_val>0.1797904968261719</right_val></_></_></trees>
      <stage_threshold>27.1533508300781250</stage_threshold>
      <parent>7</parent>
      <next>-1</next></_>
    <_>
      <!-- stage 9 -->
      <trees>
        <_>
          <!-- tree 0 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 3 7 6 -1.</_>
                <_>6 6 7 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-5.5052167735993862e-003</threshold>
            <left_val>0.5914731025695801</left_val>
            <right_val>0.2626559138298035</right_val></_></_>
        <_>
          <!-- tree 1 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 7 12 2 -1.</_>
                <_>8 7 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.9562279339879751e-003</threshold>
            <left_val>0.2312581986188889</left_val>
            <right_val>0.5741627216339111</right_val></_></_>
        <_>
          <!-- tree 2 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 4 17 10 -1.</_>
                <_>0 9 17 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.8924784213304520e-003</threshold>
            <left_val>0.1656530052423477</left_val>
            <right_val>0.5626654028892517</right_val></_></_>
        <_>
          <!-- tree 3 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 4 15 16 -1.</_>
                <_>3 12 15 8 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0836383774876595</threshold>
            <left_val>0.5423449873924255</left_val>
            <right_val>0.1957294940948486</right_val></_></_>
        <_>
          <!-- tree 4 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 15 6 4 -1.</_>
                <_>7 17 6 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.2282270472496748e-003</threshold>
            <left_val>0.3417904078960419</left_val>
            <right_val>0.5992503762245178</right_val></_></_>
        <_>
          <!-- tree 5 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>15 2 4 9 -1.</_>
                <_>15 2 2 9 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.7629169896245003e-003</threshold>
            <left_val>0.3719581961631775</left_val>
            <right_val>0.6079903841018677</right_val></_></_>
        <_>
          <!-- tree 6 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 3 3 2 -1.</_>
                <_>2 4 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.6417410224676132e-003</threshold>
            <left_val>0.2577486038208008</left_val>
            <right_val>0.5576915740966797</right_val></_></_>
        <_>
          <!-- tree 7 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 6 7 9 -1.</_>
                <_>13 9 7 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.4113149158656597e-003</threshold>
            <left_val>0.2950749099254608</left_val>
            <right_val>0.5514171719551086</right_val></_></_>
        <_>
          <!-- tree 8 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 11 4 3 -1.</_>
                <_>8 12 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0110693201422691</threshold>
            <left_val>0.7569358944892883</left_val>
            <right_val>0.4477078914642334</right_val></_></_>
        <_>
          <!-- tree 9 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 2 20 6 -1.</_>
                <_>10 2 10 3 2.</_>
                <_>0 5 10 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0348659716546535</threshold>
            <left_val>0.5583708882331848</left_val>
            <right_val>0.2669621109962463</right_val></_></_>
        <_>
          <!-- tree 10 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 2 6 10 -1.</_>
                <_>3 2 3 5 2.</_>
                <_>6 7 3 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.5701099811121821e-004</threshold>
            <left_val>0.5627313256263733</left_val>
            <right_val>0.2988890111446381</right_val></_></_>
        <_>
          <!-- tree 11 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>13 10 3 4 -1.</_>
                <_>13 12 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0243391301482916</threshold>
            <left_val>0.2771185040473938</left_val>
            <right_val>0.5108863115310669</right_val></_></_>
        <_>
          <!-- tree 12 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 10 3 4 -1.</_>
                <_>4 12 3 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.9435202274471521e-004</threshold>
            <left_val>0.5580651760101318</left_val>
            <right_val>0.3120341897010803</right_val></_></_>
        <_>
          <!-- tree 13 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 5 6 3 -1.</_>
                <_>9 5 2 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.2971509024500847e-003</threshold>
            <left_val>0.3330250084400177</left_val>
            <right_val>0.5679075717926025</right_val></_></_>
        <_>
          <!-- tree 14 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 6 6 8 -1.</_>
                <_>7 10 6 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.7801829166710377e-003</threshold>
            <left_val>0.2990534901618958</left_val>
            <right_val>0.5344808101654053</right_val></_></_>
        <_>
          <!-- tree 15 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 11 20 6 -1.</_>
                <_>0 14 20 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.1342066973447800</threshold>
            <left_val>0.1463858932256699</left_val>
            <right_val>0.5392568111419678</right_val></_></_>
        <_>
          <!-- tree 16 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 13 4 6 -1.</_>
                <_>4 13 2 3 2.</_>
                <_>6 16 2 3 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>7.5224548345431685e-004</threshold>
            <left_val>0.3746953904628754</left_val>
            <right_val>0.5692734718322754</right_val></_></_>
        <_>
          <!-- tree 17 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 0 8 12 -1.</_>
                <_>10 0 4 6 2.</_>
                <_>6 6 4 6 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0405455417931080</threshold>
            <left_val>0.2754747867584229</left_val>
            <right_val>0.5484297871589661</right_val></_></_>
        <_>
          <!-- tree 18 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>2 0 15 2 -1.</_>
                <_>2 1 15 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.2572970008477569e-003</threshold>
            <left_val>0.3744584023952484</left_val>
            <right_val>0.5756075978279114</right_val></_></_>
        <_>
          <!-- tree 19 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 12 2 3 -1.</_>
                <_>9 13 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-7.4249948374927044e-003</threshold>
            <left_val>0.7513859272003174</left_val>
            <right_val>0.4728231132030487</right_val></_></_>
        <_>
          <!-- tree 20 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 12 1 2 -1.</_>
                <_>3 13 1 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>5.0908129196614027e-004</threshold>
            <left_val>0.5404896736145020</left_val>
            <right_val>0.2932321131229401</right_val></_></_>
        <_>
          <!-- tree 21 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>9 11 2 3 -1.</_>
                <_>9 12 2 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2808450264856219e-003</threshold>
            <left_val>0.6169779896736145</left_val>
            <right_val>0.4273349046707153</right_val></_></_>
        <_>
          <!-- tree 22 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 3 3 1 -1.</_>
                <_>8 3 1 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.8348860321566463e-003</threshold>
            <left_val>0.2048496007919312</left_val>
            <right_val>0.5206472277641296</right_val></_></_>
        <_>
          <!-- tree 23 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>17 7 3 6 -1.</_>
                <_>17 9 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0274848695844412</threshold>
            <left_val>0.5252984762191773</left_val>
            <right_val>0.1675522029399872</right_val></_></_>
        <_>
          <!-- tree 24 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 2 3 2 -1.</_>
                <_>8 2 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>2.2372419480234385e-003</threshold>
            <left_val>0.5267782807350159</left_val>
            <right_val>0.2777658104896545</right_val></_></_>
        <_>
          <!-- tree 25 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 4 5 3 -1.</_>
                <_>11 5 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.8635291904211044e-003</threshold>
            <left_val>0.6954557895660400</left_val>
            <right_val>0.4812048971652985</right_val></_></_>
        <_>
          <!-- tree 26 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 4 5 3 -1.</_>
                <_>4 5 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>4.1753971017897129e-003</threshold>
            <left_val>0.4291887879371643</left_val>
            <right_val>0.6349195837974548</right_val></_></_>
        <_>
          <!-- tree 27 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>19 3 1 2 -1.</_>
                <_>19 4 1 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.7098189564421773e-003</threshold>
            <left_val>0.2930536866188049</left_val>
            <right_val>0.5361248850822449</right_val></_></_>
        <_>
          <!-- tree 28 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 5 4 3 -1.</_>
                <_>5 6 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.5328548662364483e-003</threshold>
            <left_val>0.4495325088500977</left_val>
            <right_val>0.7409694194793701</right_val></_></_>
        <_>
          <!-- tree 29 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>17 7 3 6 -1.</_>
                <_>17 9 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-9.5372907817363739e-003</threshold>
            <left_val>0.3149119913578033</left_val>
            <right_val>0.5416501760482788</right_val></_></_>
        <_>
          <!-- tree 30 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 7 3 6 -1.</_>
                <_>0 9 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0253109894692898</threshold>
            <left_val>0.5121892094612122</left_val>
            <right_val>0.1311707943677902</right_val></_></_>
        <_>
          <!-- tree 31 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 2 6 9 -1.</_>
                <_>14 5 6 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0364609695971012</threshold>
            <left_val>0.5175911784172058</left_val>
            <right_val>0.2591339945793152</right_val></_></_>
        <_>
          <!-- tree 32 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 4 5 6 -1.</_>
                <_>0 6 5 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0208543296903372</threshold>
            <left_val>0.5137140154838562</left_val>
            <right_val>0.1582316011190414</right_val></_></_>
        <_>
          <!-- tree 33 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>10 5 6 2 -1.</_>
                <_>12 5 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.7207747856155038e-004</threshold>
            <left_val>0.5574309825897217</left_val>
            <right_val>0.4398978948593140</right_val></_></_>
        <_>
          <!-- tree 34 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>4 5 6 2 -1.</_>
                <_>6 5 2 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.5227000403683633e-005</threshold>
            <left_val>0.5548940896987915</left_val>
            <right_val>0.3708069920539856</right_val></_></_>
        <_>
          <!-- tree 35 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 1 4 6 -1.</_>
                <_>8 3 4 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-8.4316509310156107e-004</threshold>
            <left_val>0.3387419879436493</left_val>
            <right_val>0.5554211139678955</right_val></_></_>
        <_>
          <!-- tree 36 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 2 3 6 -1.</_>
                <_>0 4 3 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>3.6037859972566366e-003</threshold>
            <left_val>0.5358061790466309</left_val>
            <right_val>0.3411171138286591</right_val></_></_>
        <_>
          <!-- tree 37 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>6 6 8 3 -1.</_>
                <_>6 7 8 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-6.8057891912758350e-003</threshold>
            <left_val>0.6125202775001526</left_val>
            <right_val>0.4345862865447998</right_val></_></_>
        <_>
          <!-- tree 38 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 1 5 9 -1.</_>
                <_>0 4 5 3 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0470216609537601</threshold>
            <left_val>0.2358165979385376</left_val>
            <right_val>0.5193738937377930</right_val></_></_>
        <_>
          <!-- tree 39 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>16 0 4 15 -1.</_>
                <_>16 0 2 15 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0369541086256504</threshold>
            <left_val>0.7323111295700073</left_val>
            <right_val>0.4760943949222565</right_val></_></_>
        <_>
          <!-- tree 40 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>1 10 3 2 -1.</_>
                <_>1 11 3 1 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>1.0439479956403375e-003</threshold>
            <left_val>0.5419455170631409</left_val>
            <right_val>0.3411330878734589</right_val></_></_>
        <_>
          <!-- tree 41 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>14 4 1 10 -1.</_>
                <_>14 9 1 5 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.1050689974799752e-004</threshold>
            <left_val>0.2821694016456604</left_val>
            <right_val>0.5554947257041931</right_val></_></_>
        <_>
          <!-- tree 42 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 1 4 12 -1.</_>
                <_>2 1 2 12 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0808315873146057</threshold>
            <left_val>0.9129930138587952</left_val>
            <right_val>0.4697434902191162</right_val></_></_>
        <_>
          <!-- tree 43 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 11 4 2 -1.</_>
                <_>11 11 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-3.6579059087671340e-004</threshold>
            <left_val>0.6022670269012451</left_val>
            <right_val>0.3978292942047119</right_val></_></_>
        <_>
          <!-- tree 44 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>5 11 4 2 -1.</_>
                <_>7 11 2 2 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-1.2545920617412776e-004</threshold>
            <left_val>0.5613213181495667</left_val>
            <right_val>0.3845539987087250</right_val></_></_>
        <_>
          <!-- tree 45 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 8 15 5 -1.</_>
                <_>8 8 5 5 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-0.0687864869832993</threshold>
            <left_val>0.2261611968278885</left_val>
            <right_val>0.5300496816635132</right_val></_></_>
        <_>
          <!-- tree 46 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>0 0 6 10 -1.</_>
                <_>3 0 3 10 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0124157899990678</threshold>
            <left_val>0.4075691998004913</left_val>
            <right_val>0.5828812122344971</right_val></_></_>
        <_>
          <!-- tree 47 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 4 3 2 -1.</_>
                <_>12 4 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-4.7174817882478237e-003</threshold>
            <left_val>0.2827253937721252</left_val>
            <right_val>0.5267757773399353</right_val></_></_>
        <_>
          <!-- tree 48 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 12 3 8 -1.</_>
                <_>8 16 3 4 2.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>0.0381368584930897</threshold>
            <left_val>0.5074741244316101</left_val>
            <right_val>0.1023615971207619</right_val></_></_>
        <_>
          <!-- tree 49 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>8 14 5 3 -1.</_>
                <_>8 15 5 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>-2.8168049175292253e-003</threshold>
            <left_val>0.6169006824493408</left_val>
            <right_val>0.4359692931175232</right_val></_></_>
        <_>
          <!-- tree 50 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>7 14 4 3 -1.</_>
                <_>7 15 4 1 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>8.1303603947162628e-003</threshold>
            <left_val>0.4524433016777039</left_val>
            <right_val>0.7606095075607300</right_val></_></_>
        <_>
          <!-- tree 51 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>11 4 3 2 -1.</_>
                <_>12 4 1 2 3.</_></rects>
              <tilted>0</tilted></feature>
            <threshold>6.0056019574403763e-003</threshold>
            <left_val>0.5240408778190613</left_val>
            <right_val>0.1859712004661560</right_val></_></_>
        <_>
          <!-- tree 52 -->
          <_>
            <!-- root node -->
            <feature>
              <rects>
                <_>3 15 14 4 -1.</_>
                <_>3 15 7 2 2.</_>
                <_>10 17 7 2 2.</_></rects>
             
Download .txt
gitextract_u4kyp6r5/

├── .gitattributes
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── composer.json
├── example/
│   ├── blur.php
│   ├── bootstrap.php
│   ├── crop-balanced.php
│   ├── facedetect.php
│   ├── opacity.php
│   ├── quality.php
│   ├── rotate.php
│   ├── watermark.php
│   └── webp.php
├── phpunit.xml
├── src/
│   ├── Crops/
│   │   ├── Balanced.php
│   │   ├── CropInterface.php
│   │   ├── Entropy.php
│   │   ├── Face.php
│   │   ├── LICENCE
│   │   └── classifier/
│   │       ├── haarcascade_frontalface_alt.xml
│   │       ├── haarcascade_frontalface_alt2.xml
│   │       ├── haarcascade_frontalface_alt_tree.xml
│   │       ├── haarcascade_frontalface_default.xml
│   │       └── haarcascade_profileface.xml
│   ├── Image.php
│   ├── ImageException.php
│   ├── Libs/
│   │   ├── AbstractLib.php
│   │   ├── Gd.php
│   │   ├── Imagick.php
│   │   ├── LibInterface.php
│   │   └── icc/
│   │       ├── black_us_web_uncoated.icm
│   │       ├── srgb.icm
│   │       └── us_web_uncoated.icc
│   ├── Utils/
│   │   ├── Color.php
│   │   ├── Dimmensions.php
│   │   ├── IconExtractor.php
│   │   └── SvgExtractor.php
│   └── autoloader.php
└── tests/
    ├── DimmensionsTest.php
    ├── GdTest.php
    ├── IconTest.php
    ├── ImageTest_.php
    ├── ImagickTest.php
    └── bootstrap.php
Download .txt
SYMBOL INDEX (160 symbols across 19 files)

FILE: src/Crops/Balanced.php
  class Balanced (line 22) | class Balanced implements CropInterface
    method getOffsets (line 27) | public static function getOffsets(Imagick $original, $targetWidth, $ta...
    method getOffsetBalanced (line 46) | protected static function getOffsetBalanced(Imagick $original, $target...
    method getHighestEnergyPoint (line 123) | protected static function getHighestEnergyPoint(Imagick $image)

FILE: src/Crops/CropInterface.php
  type CropInterface (line 10) | interface CropInterface
    method getOffsets (line 21) | public static function getOffsets(Imagick $original, $targetWidth, $ta...

FILE: src/Crops/Entropy.php
  class Entropy (line 24) | class Entropy implements CropInterface
    method getOffsets (line 31) | public static function getOffsets(Imagick $original, $targetWidth, $ta...
    method getOffsetFromEntropy (line 53) | protected static function getOffsetFromEntropy(Imagick $originalImage,...
    method slice (line 78) | protected static function slice($image, $originalSize, $targetSize, $a...
    method getSafeZoneList (line 162) | protected static function getSafeZoneList()
    method getPotential (line 174) | protected static function getPotential($position, $top, $sliceSize)
    method grayscaleEntropy (line 214) | protected static function grayscaleEntropy(Imagick $image)
    method colorEntropy (line 230) | protected static function colorEntropy(Imagick $image)
    method getEntropy (line 258) | protected static function getEntropy($histogram, $area)
    method area (line 281) | protected static function area(Imagick $image)

FILE: src/Crops/Face.php
  class Face (line 21) | class Face extends Entropy
    method getOffsets (line 59) | public static function getOffsets(Imagick $original, $targetWidth, $ta...
    method getBaseDimension (line 79) | protected static function getBaseDimension($key)
    method getFaceList (line 97) | protected static function getFaceList()
    method getFaceListFromClassifier (line 127) | protected static function getFaceListFromClassifier($classifier)
    method getSafeZoneList (line 147) | protected static function getSafeZoneList()

FILE: src/Image.php
  class Image (line 7) | class Image
    method fromFile (line 32) | public static function fromFile($filename, $library = null)
    method fromString (line 61) | public static function fromString($string, $library = null)
    method __construct (line 91) | public function __construct(Libs\LibInterface $image, $filename = null)
    method setClientHints (line 104) | public function setClientHints(array $clientHints)
    method setBackground (line 128) | public function setBackground(array $background)
    method setCompressionQuality (line 144) | public function setCompressionQuality($quality)
    method calculateClientSize (line 159) | private function calculateClientSize($width, $height)
    method flip (line 182) | public function flip()
    method flop (line 194) | public function flop()
    method save (line 208) | public function save($filename = null)
    method getImage (line 220) | public function getImage()
    method getString (line 230) | public function getString()
    method getMimeType (line 240) | public function getMimeType()
    method getWidth (line 250) | public function getWidth()
    method getHeight (line 260) | public function getHeight()
    method format (line 272) | public function format($format)
    method resize (line 288) | public function resize($width, $height = 0, $cover = false)
    method crop (line 318) | public function crop($width, $height, $x = 'center', $y = 'middle')
    method resizeCrop (line 350) | public function resizeCrop($width, $height, $x = 'center', $y = 'middle')
    method rotate (line 365) | public function rotate($angle)
    method blur (line 381) | public function blur($loops = 4)
    method quality (line 395) | public function quality($quality)
    method watermark (line 419) | public function watermark(Image $image, $x = 'right', $y = 'bottom')
    method opacity (line 442) | public function opacity($opacity)
    method progressive (line 456) | public function progressive($progressive = true)
    method getExifData (line 471) | public function getExifData($key = null)
    method transform (line 491) | public function transform($operations = null)
    method show (line 534) | public function show()
    method base64 (line 547) | public function base64()
    method autoRotate (line 562) | public function autoRotate()
    method isAnimatedGif (line 605) | private static function isAnimatedGif($stream)
    method parseOperations (line 624) | private static function parseOperations($operations)
    method getLibraryClass (line 656) | private static function getLibraryClass($library)

FILE: src/ImageException.php
  class ImageException (line 8) | class ImageException extends \Exception
    method getImage (line 18) | public function getImage($width = 400, $height = 400)

FILE: src/Libs/AbstractLib.php
  class AbstractLib (line 8) | abstract class AbstractLib
    method setCompressionQuality (line 18) | public function setCompressionQuality($quality)
    method setBackground (line 26) | public function setBackground(array $background)
    method setAnimated (line 34) | public function setAnimated($animated)

FILE: src/Libs/Gd.php
  class Gd (line 10) | class Gd extends AbstractLib implements LibInterface
    method checkCompatibility (line 23) | public static function checkCompatibility()
    method createFromFile (line 31) | public static function createFromFile($filename)
    method createFromString (line 49) | public static function createFromString($string)
    method __construct (line 63) | public function __construct($image, $type = null)
    method __destruct (line 75) | public function __destruct()
    method flip (line 83) | public function flip()
    method flop (line 91) | public function flop()
    method save (line 99) | public function save($filename)
    method getImage (line 115) | public function getImage()
    method getString (line 123) | public function getString()
    method getMimeType (line 143) | public function getMimeType()
    method getWidth (line 151) | public function getWidth()
    method getHeight (line 159) | public function getHeight()
    method format (line 167) | public function format($format)
    method resize (line 223) | public function resize($width, $height)
    method getCropOffsets (line 238) | public function getCropOffsets($width, $height, $method)
    method crop (line 250) | public function crop($width, $height, $x, $y)
    method rotate (line 270) | public function rotate($angle)
    method blur (line 287) | public function blur($loops)
    method watermark (line 310) | public function watermark(LibInterface $image, $x, $y)
    method opacity (line 322) | public function opacity($opacity)
    method setProgressive (line 356) | public function setProgressive($progressive)
    method createImage (line 370) | private function createImage($width, $height, array $background = [0, ...

FILE: src/Libs/Imagick.php
  class Imagick (line 12) | class Imagick extends AbstractLib implements LibInterface
    method checkCompatibility (line 19) | public static function checkCompatibility()
    method createFromFile (line 29) | public static function createFromFile($filename)
    method createFromString (line 45) | public static function createFromString($string)
    method __construct (line 59) | public function __construct(BaseImagick $image)
    method __destruct (line 81) | public function __destruct()
    method flip (line 89) | public function flip()
    method flop (line 99) | public function flop()
    method save (line 109) | public function save($filename)
    method getImage (line 131) | public function getImage()
    method getString (line 139) | public function getString()
    method getMimeType (line 165) | public function getMimeType()
    method getWidth (line 177) | public function getWidth()
    method getHeight (line 189) | public function getHeight()
    method format (line 201) | public function format($format)
    method resize (line 218) | public function resize($width, $height)
    method getCropOffsets (line 240) | public function getCropOffsets($width, $height, $method)
    method crop (line 254) | public function crop($width, $height, $x, $y)
    method rotate (line 277) | public function rotate($angle)
    method blur (line 289) | public function blur($loops)
    method getCompressed (line 310) | private function getCompressed()
    method watermark (line 353) | public function watermark(LibInterface $image, $x, $y)
    method opacity (line 365) | public function opacity($opacity)
    method setProgressive (line 382) | public function setProgressive($progressive)

FILE: src/Libs/LibInterface.php
  type LibInterface (line 10) | interface LibInterface
    method checkCompatibility (line 17) | public static function checkCompatibility();
    method createFromFile (line 26) | public static function createFromFile($filename);
    method createFromString (line 35) | public static function createFromString($string);
    method save (line 42) | public function save($filename);
    method getString (line 49) | public function getString();
    method getMimeType (line 56) | public function getMimeType();
    method getWidth (line 63) | public function getWidth();
    method getHeight (line 70) | public function getHeight();
    method format (line 77) | public function format($format);
    method resize (line 85) | public function resize($width, $height);
    method getCropOffsets (line 98) | public function getCropOffsets($width, $height, $method);
    method crop (line 108) | public function crop($width, $height, $x, $y);
    method rotate (line 115) | public function rotate($angle);
    method flip (line 120) | public function flip();
    method flop (line 125) | public function flop();
    method opacity (line 130) | public function opacity($opacity);
    method watermark (line 139) | public function watermark(LibInterface $image, $x, $y);
    method setCompressionQuality (line 146) | public function setCompressionQuality($quality);
    method setBackground (line 153) | public function setBackground(array $background);
    method setAnimated (line 160) | public function setAnimated($animated);
    method setProgressive (line 167) | public function setProgressive($progressive);

FILE: src/Utils/Color.php
  class Color (line 8) | class Color
    method rgb2bw (line 21) | public static function rgb2bw($r, $g, $b)

FILE: src/Utils/Dimmensions.php
  class Dimmensions (line 8) | class Dimmensions
    method getResizeDimmensions (line 33) | public static function getResizeDimmensions($oldWidth, $oldHeight, $ne...
    method getIntegerValue (line 85) | public static function getIntegerValue($direction, $value, $relatedVal...
    method getPositionValue (line 110) | public static function getPositionValue($direction, $position, $newVal...

FILE: src/Utils/IconExtractor.php
  class IconExtractor (line 13) | class IconExtractor
    method __construct (line 22) | public function __construct($filename)
    method getBetterQuality (line 39) | public function getBetterQuality()

FILE: src/Utils/SvgExtractor.php
  class SvgExtractor (line 14) | class SvgExtractor
    method __construct (line 23) | public function __construct($filename)
    method get (line 46) | public function get($width = 0, $height = 0)

FILE: tests/DimmensionsTest.php
  class DimmensionsTest (line 5) | class DimmensionsTest extends PHPUnit_Framework_TestCase
    method resizeDataProvider (line 7) | public function resizeDataProvider()
    method testResize (line 34) | public function testResize($imageWidth, $imageHeight, $newWidth, $newH...
    method integerValueDataProvider (line 42) | public function integerValueDataProvider()
    method testIntegerValue (line 64) | public function testIntegerValue($direction, $value, $relatedValue, $e...
    method positionValueDataProvider (line 71) | public function positionValueDataProvider()
    method testPositionValue (line 90) | public function testPositionValue($direction, $position, $newSize, $ol...

FILE: tests/GdTest.php
  class GdTest (line 3) | class GdTest extends ImageTest_

FILE: tests/IconTest.php
  class IconTest (line 6) | class IconTest extends PHPUnit_Framework_TestCase
    method testIcon (line 8) | public function testIcon()

FILE: tests/ImageTest_.php
  class ImageTest_ (line 5) | abstract class ImageTest_ extends PHPUnit_Framework_TestCase
    method setUpBeforeClass (line 7) | public static function setUpBeforeClass()
    method testJpg (line 14) | public function testJpg()
    method testPng (line 56) | public function testPng()
    method testWebp (line 98) | public function testWebp()

FILE: tests/ImagickTest.php
  class ImagickTest (line 3) | class ImagickTest extends ImageTest_
Condensed preview — 46 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,107K chars).
[
  {
    "path": ".gitattributes",
    "chars": 155,
    "preview": "/tests/      export-ignore\n/phpunit.xml export-ignore\n/example     export-ignore\n.*           export-ignore\n\n# Set the l"
  },
  {
    "path": ".gitignore",
    "chars": 46,
    "preview": "tests/images/tmp.*\nlocal\nvendor/\ncomposer.lock"
  },
  {
    "path": ".travis.yml",
    "chars": 647,
    "preview": "sudo: true\ndist: trusty\nlanguage: php\n\nphp:\n  - 5.5\n  - 5.6\n  - 7.0\n  - 7.1\n  - 7.2\n  - 7.3\n\ncache:\n  directories:\n    -"
  },
  {
    "path": "LICENSE",
    "chars": 1188,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Oscar Otero Marzoa\n\nPermission is hereby granted, free of charge, to any perso"
  },
  {
    "path": "README.md",
    "chars": 11855,
    "preview": "# Imagecow\n\n[![Build Status](https://travis-ci.org/oscarotero/imagecow.svg?branch=master)](https://travis-ci.org/oscarot"
  },
  {
    "path": "composer.json",
    "chars": 675,
    "preview": "{\n\t\"name\": \"imagecow/imagecow\",\n\t\"type\": \"library\",\n\t\"description\": \"PHP library to manipulate and generate responsive i"
  },
  {
    "path": "example/blur.php",
    "chars": 157,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$image = Image::fromFile(__DIR__.'/my-image.jpg', $librar"
  },
  {
    "path": "example/bootstrap.php",
    "chars": 147,
    "preview": "<?php\n\nrequire dirname(__DIR__).'/src/autoloader.php';\n\n$library = isset($_GET['library']) && ($_GET['library'] === 'Ima"
  },
  {
    "path": "example/crop-balanced.php",
    "chars": 272,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$paddedFilePath = __DIR__.'/square.jpg';\n\n$imageCowPadded"
  },
  {
    "path": "example/facedetect.php",
    "chars": 157,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\nImage::fromFile(__DIR__.'/my-image.jpg', $library)->crop("
  },
  {
    "path": "example/opacity.php",
    "chars": 158,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$image = Image::fromFile(__DIR__.'/logo.png', $library);\n"
  },
  {
    "path": "example/quality.php",
    "chars": 360,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$quality = 8;\n$image = Image::fromFile(__DIR__.'/my-image"
  },
  {
    "path": "example/rotate.php",
    "chars": 161,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$image = Image::fromFile(__DIR__.'/my-image.jpg', $librar"
  },
  {
    "path": "example/watermark.php",
    "chars": 283,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$image = Image::fromFile(__DIR__.'/my-image.jpg', $librar"
  },
  {
    "path": "example/webp.php",
    "chars": 165,
    "preview": "<?php\n\nrequire __DIR__.'/bootstrap.php';\n\nuse Imagecow\\Image;\n\n$image = Image::fromFile(__DIR__.'/my-image.jpg', $librar"
  },
  {
    "path": "phpunit.xml",
    "chars": 165,
    "preview": "<phpunit bootstrap=\"./tests/bootstrap.php\">\n\t<testsuites>\n\t\t<testsuite name=\"All tests\">\n\t\t\t<directory>./tests/</directo"
  },
  {
    "path": "src/Crops/Balanced.php",
    "chars": 5476,
    "preview": "<?php\n\nnamespace Imagecow\\Crops;\n\nuse Exception;\nuse Imagick;\nuse Imagecow\\Utils\\Color;\n\n/**\n * This class is adapted fr"
  },
  {
    "path": "src/Crops/CropInterface.php",
    "chars": 388,
    "preview": "<?php\n\nnamespace Imagecow\\Crops;\n\nuse Imagick;\n\n/**\n * Interface used by all crops.\n */\ninterface CropInterface\n{\n    /*"
  },
  {
    "path": "src/Crops/Entropy.php",
    "chars": 8956,
    "preview": "<?php\n\nnamespace Imagecow\\Crops;\n\nuse Imagick;\nuse Imagecow\\Utils\\Color;\n\n/**\n * This class is adapted from Stig Lindqvi"
  },
  {
    "path": "src/Crops/Face.php",
    "chars": 4874,
    "preview": "<?php\n\nnamespace Imagecow\\Crops;\n\nuse Imagick;\nuse Imagecow\\ImageException;\n\n/**\n * This class is adapted from Stig Lind"
  },
  {
    "path": "src/Crops/LICENCE",
    "chars": 1297,
    "preview": "Copyright (c) 2013, Stig Lindqvist\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
  },
  {
    "path": "src/Crops/classifier/haarcascade_frontalface_alt.xml",
    "chars": 919871,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 gentle adaboost frontal face detector.\n    Created by Rainer Lienhart.\n"
  },
  {
    "path": "src/Crops/classifier/haarcascade_frontalface_alt2.xml",
    "chars": 837462,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n    Tree-based 20x20 gentle adaboost frontal face detector.\n    Created by Rainer Lienhart.\n\n"
  },
  {
    "path": "src/Crops/classifier/haarcascade_frontalface_alt_tree.xml",
    "chars": 3644763,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 20x20 gentle adaboost frontal face detector.\n    This detector uses tree of s"
  },
  {
    "path": "src/Crops/classifier/haarcascade_frontalface_default.xml",
    "chars": 1254733,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n    Stump-based 24x24 discrete(?) adaboost frontal face detector.\n    Created by Rainer Lienh"
  },
  {
    "path": "src/Crops/classifier/haarcascade_profileface.xml",
    "chars": 1125633,
    "preview": "<?xml version=\"1.0\"?>\n<!--\n    20x20 profile face detector.\n    Contributed by David Bradley from Princeton University.\n"
  },
  {
    "path": "src/Image.php",
    "chars": 17932,
    "preview": "<?php\n\nnamespace Imagecow;\n\nuse Imagecow\\Utils\\Dimmensions;\n\nclass Image\n{\n    const LIB_GD = 'Gd';\n    const LIB_IMAGIC"
  },
  {
    "path": "src/ImageException.php",
    "chars": 765,
    "preview": "<?php\n\nnamespace Imagecow;\n\n/**\n * Exception class to manage the image errors.\n */\nclass ImageException extends \\Excepti"
  },
  {
    "path": "src/Libs/AbstractLib.php",
    "chars": 714,
    "preview": "<?php\n\nnamespace Imagecow\\Libs;\n\n/**\n * Base class extended by other libraries with common methods and properties.\n */\na"
  },
  {
    "path": "src/Libs/Gd.php",
    "chars": 10022,
    "preview": "<?php\n\nnamespace Imagecow\\Libs;\n\nuse Imagecow\\ImageException;\n\n/**\n * GD library.\n */\nclass Gd extends AbstractLib imple"
  },
  {
    "path": "src/Libs/Imagick.php",
    "chars": 9689,
    "preview": "<?php\n\nnamespace Imagecow\\Libs;\n\nuse Imagick as BaseImagick;\nuse ImagickPixel as BaseImagickPixel;\nuse Imagecow\\ImageExc"
  },
  {
    "path": "src/Libs/LibInterface.php",
    "chars": 4105,
    "preview": "<?php\n\nnamespace Imagecow\\Libs;\n\nuse Imagecow\\ImageException;\n\n/**\n * Interface implemented by all libraries.\n */\ninterf"
  },
  {
    "path": "src/Utils/Color.php",
    "chars": 426,
    "preview": "<?php\n\nnamespace Imagecow\\Utils;\n\n/**\n * Generic color conversions functions.\n */\nclass Color\n{\n    /**\n     * Returns a"
  },
  {
    "path": "src/Utils/Dimmensions.php",
    "chars": 3950,
    "preview": "<?php\n\nnamespace Imagecow\\Utils;\n\n/**\n * Usefull dimmensions calculations.\n */\nclass Dimmensions\n{\n    protected static "
  },
  {
    "path": "src/Utils/IconExtractor.php",
    "chars": 1256,
    "preview": "<?php\n\nnamespace Imagecow\\Utils;\n\nuse Imagick;\nuse Imagecow\\Libs\\Imagick as ImagickLib;\nuse Imagecow\\Image;\n\n/**\n * Simp"
  },
  {
    "path": "src/Utils/SvgExtractor.php",
    "chars": 1964,
    "preview": "<?php\n\nnamespace Imagecow\\Utils;\n\nuse Exception;\nuse Imagick;\nuse ImagickPixel;\nuse Imagecow;\n\n/**\n * Simple class to co"
  },
  {
    "path": "src/autoloader.php",
    "chars": 286,
    "preview": "<?php\n\nspl_autoload_register(function ($class) {\n    if (strpos($class, 'Imagecow\\\\') !== 0) {\n        return;\n    }\n\n  "
  },
  {
    "path": "tests/DimmensionsTest.php",
    "chars": 3408,
    "preview": "<?php\n\nuse Imagecow\\Utils\\Dimmensions;\n\nclass DimmensionsTest extends PHPUnit_Framework_TestCase\n{\n    public function r"
  },
  {
    "path": "tests/GdTest.php",
    "chars": 81,
    "preview": "<?php\n\nclass GdTest extends ImageTest_\n{\n    protected static $library = 'Gd';\n}\n"
  },
  {
    "path": "tests/IconTest.php",
    "chars": 727,
    "preview": "<?php\n\nuse Imagecow\\Image;\nuse Imagecow\\Utils\\IconExtractor;\n\nclass IconTest extends PHPUnit_Framework_TestCase\n{\n    pu"
  },
  {
    "path": "tests/ImageTest_.php",
    "chars": 3903,
    "preview": "<?php\n\nuse Imagecow\\Image;\n\nabstract class ImageTest_ extends PHPUnit_Framework_TestCase\n{\n    public static function se"
  },
  {
    "path": "tests/ImagickTest.php",
    "chars": 91,
    "preview": "<?php\n\nclass ImagickTest extends ImageTest_\n{\n    protected static $library = 'Imagick';\n}\n"
  },
  {
    "path": "tests/bootstrap.php",
    "chars": 672,
    "preview": "<?php\n\nerror_reporting(E_ALL);\n\ninclude_once dirname(__DIR__).'/vendor/autoload.php';\ninclude_once dirname(__DIR__).'/sr"
  }
]

// ... and 3 more files (download for full content)

About this extraction

This page contains the full source code of the oscarotero/imagecow GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 46 files (7.5 MB), approximately 2.0M tokens, and a symbol index with 160 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!