Skip to content

TheDenk/hwb

Repository files navigation

Build Status codecov MIT license Generic badge Downloads

Hand Written Blots Augmentation

This repository contains augmentation from our paper.

Colab Example

Handwritten Blots

Dependencies

  • bezier>=2020.5.19

Getting Started

pip install hwb  

Example with default parameters

Import:

from hwb import HandWrittenBlot

Using:

blots = HandWrittenBlot()

new_img = blots(img) 

Done.

Advansed usage

Configs description

Rectangle parameters

Config of rectangle that should contains blot.

rectangle_info = {
    'x': (None, None), ## Minimum and maximum X coordinate for blot position. Can be single int value.

    'y': (None, None), ## Minimum and maximum Y coordinate for blot position. Can be single int value.

    'h': (None, None), ## Minimum and maximum blots Height. Can be single int value.  

    'w': (None, None), ## Minimum and maximum blots Width. Can be single int value. 
}

Blots parameters

Config of different blots parameters.

blot_params = {
    'incline': (-10, 10), # Incline of blots. All left or right points of blot will be shifted on this value. Can be single int value.

    'intensivity': (0.5, 0.9), # Points count that will be generated for blots. Can be single float value (0, 1).

    'transparency': (0.05, 0.4), # Blots transparency. Can be single float value (0, 1).

    'count': (1, 5), # Min Max Blots count.
}

Example with configs

from hwb import HandWrittenBlot

blots = HandWrittenBlot(rectangle_info, blot_params)

new_img = blots(img)

Contacts

Issues should be raised directly in the repository. For professional support and recommendations please welcomedenk@gmail.com.

About

Hand Written Blots augmentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages