You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ MIT
37
37
- [Unlabeled](#unlabeled)
38
38
- [Feature Extractors](#feature-extractors)
39
39
- [Word Count Vectorizer](#word-count-vectorizer)
40
-
- [Pixel Encoder](#pixel-encoder)
40
+
- [Raw Pixel Encoder](#raw-pixel-encoder)
41
41
- [Estimators](#estimators)
42
42
- [Anomaly Detectors](#anomaly-detectors)
43
43
- [Isolation Forest](#isolation-forest)
@@ -765,16 +765,15 @@ use Rubix\ML\Extractors\Tokenizers\Word;
765
765
$extractor = new WordCountVectorizer(5000, ['the', 'what', 'has'], true, new Word());
766
766
```
767
767
768
-
### Pixel Encoder
769
-
Images must first be converted to color channel values in order to be passed to an Estimator. The Pixel Encoder takes an array of images (as [PHP Resources](http://php.net/manual/en/language.types.resource.php)) and converts them to a flat vector of color channel data. Image scaling and cropping is handled automatically by [Intervention Image](http://image.intervention.io/). The GD extension is required to use this feature.
768
+
### Raw Pixel Encoder
769
+
The Raw Pixel Encoder takes an array of images (as [PHP Resources](http://php.net/manual/en/language.types.resource.php)) and converts them to a flat vector of raw color channel data. Scaling and cropping is handled automatically by [Intervention Image](http://image.intervention.io/) for PHP. Note that the GD extension is required to use this feature.
770
770
771
771
##### Parameters:
772
772
| # | Param | Default | Type | Description |
773
773
|--|--|--|--|--|
774
774
| 1 | size |[32, 32]| array | A tuple of width and height values denoting the resolution of the encoding. |
775
775
| 2 | rgb | true | bool | True to use RGB color channel data and False to use Greyscale. |
776
-
| 3 | sharpen | 0 | int | A value between 0 and 100 indicating the amount of sharpness to add to each sample. |
777
-
| 4 | driver | 'gd' | string | The PHP extension to use for image processing ('gd' *or* 'imagick'). |
776
+
| 3 | driver | 'gd' | string | The PHP extension to use for image processing ('gd' *or* 'imagick'). |
778
777
779
778
##### Additional Methods:
780
779
This Extractor does not have any additional methods.
@@ -783,7 +782,7 @@ This Extractor does not have any additional methods.
783
782
```php
784
783
use Rubix\ML\Extractors\PixelEncoder;
785
784
786
-
$extractor = new PixelEncoder([28, 28], false, 'imagick');
785
+
$extractor = new PixelEncoder([28, 28], true, 'gd');
0 commit comments