<commit_before># ImageAugmenter

The ImageAugmenter is a class to augment your training images for neural networks (and other machine learning methods).
Possible augmentations are:
* Translation (moving the image)
* Scaling (zooming)
* Rotation
* Shear
* Horizontal flipping/mirroring
* Vertical flipping/mirroring

The class is build as a wrapper around scikit-image's `AffineTransform`.
Most augmentations (all except flipping) are combined into one affine transformation, making the augmentation process reasonably fast.

# Example

Lena, augmented 50 times with all augmentation options activated:

![50 augmented versions of Lena](lena_augmented.jpg?raw=true "50 augmented versions of Lena")

# Requirements

* numpy
* scikit-image
* scipy (optional, required for some of the tests)
* matplotlib (optional, required if you want to see a plot containing various example images showing the effects of your chosen augmentation settings)

# Usage

There is no pip-installer or setup.py for this class. Simply copy `ImageAugmenter.py` to your project.
Then import it, create a new `ImageAugmenter` object and use `ImageAugmenter.augment_batch()` to augment an array of images.
The function expects a numpy array (of dtype **numpy.uint8** with values between 0 and 255) of images.
The expected shape of that array is any of the following:
* `(image-index, y, x)`, automatically detected
* `(image-index, y, x, image channel)`, automatically detected
* `(image-index, channel, y, x)`, set `channel_is_first_axis=True` in the constructor if that is the case for you.
The return type is a numpy array of dtype **numpy.float32** with values between 0.0 and 1.0.
<commit_msg>fix readme<commit_after># ImageAugmenter

The ImageAugmenter is a class to augment your training images for neural networks (and other machine learning methods).
Possible augmentations are:
* Translation (moving the image)
* Scaling (zooming)
* Rotation
* Shear
* Horizontal flipping/mirroring
* Vertical flipping/mirroring

The class is build as a wrapper around scikit-image's `AffineTransform`.
Most augmentations (all except flipping) are combined into one affine transformation, making the augmentation process reasonably fast.

# Example output

Lena, augmented 100 times with all augmentation options activated:

![100 augmented versions of Lena](lena_augmented.jpg?raw=true "100 augmented versions of Lena")

# Requirements

* numpy
* scikit-image
* scipy (optional, required for some of the tests)
* matplotlib (optional, required if you want to see a plot containing various example images showing the effects of your chosen augmentation settings)

# Usage

There is no pip-installer or setup.py for this class. Simply copy `ImageAugmenter.py` to your project.
Then import it, create a new `ImageAugmenter` object and use `ImageAugmenter.augment_batch()` to augment an array of images.
The function expects a numpy array (of dtype **numpy.uint8** with values between 0 and 255) of images.
The expected shape of that array is any of the following:
* `(image-index, y, x)`, automatically detected
* `(image-index, y, x, image channel)`, automatically detected
* `(image-index, channel, y, x)`, set `channel_is_first_axis=True` in the constructor if that is the case for you.
The return type is a numpy array of dtype **numpy.float32** with values between 0.0 and 1.0.

{'fraction_non_alphanumeric': 0.07234678624813154, 'fraction_numerical': 0.011061285500747383, 'mean_word_length': 5.162062615101289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5225584', 'n_tokens_mistral': 961, 'n_tokens_neox': 895, 'n_words': 442}