Skip to content

Daugment is a suport library for augmenting data from image samples

License

Notifications You must be signed in to change notification settings

lucasbsimao/daugment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

daugment

Daugment is a C++ suport library for augmenting data from image samples. It takes images from a folder and can apply a variety of augmenting methods on them.

Method Result
adGaussianBlur() Method-0
adInvertImage() Method-1
adScaleImage() Method-2
adGaussianNoise() Method-3
adDropoutChannel() Method-4
adContBright() Method-5
adGrayScale() Method-6
adTranslate() Method-7
adRotate() Method-8
adShearImage() Method-9
adColorIntensification() Method-10
adNormalizeImage() Method-10
adBilateralFilter() Method-10
adCannyEdge() Method-10
adFlipDimensions() Method-10
adInvertColors() Method-10

Examples

The library can apply argmentation by random or in sequence.

For random transformations, as seen in example folder, you can get results like shown below.

Method-0 Method-1 Method-2 Method-3 Method-4 Method-5 Method-6 Method-7

All methods have encapsulation to set values for required transformations. So you can apply specific transformations too, like examples below.

  • For Bilateral Filter

    adBilateralFilter bil = new adBilateralFilter();
    bil->setSigmaClr(float sigmaClr);
    bil->setSigmaDst(float sigmaDst);
    bil->setNumKernels(int kernels);
    bil->setMaxKernels(int maxKernels);
    bil->setMinSigClr(float minSigClr);
    bil->setMaxSigClr(float maxSigClr);
    bil->setMinSigDst(float minSigDst);
    bil->setMaxSigDst(float maxSigDst);
    bil->apply(Mat cpImg);

    or

    adBilateralFilter bil = new adBilateralFilter(int kernels, float sigmaDst, float sigmaClr,
        int maxKernels = 80, float minSigClr = 10, float maxSigClr = 120, float minSigDst = 5, float maxSigDst = 100);
    bil->apply(Mat cpImg);
  • For Rotation

    adRotate rot = new Rotate();
    rot->setAngle(int angle);
    rot->setMaxAngle(int maxAngle);
    rot->apply(Mat cpImg);

    or

    adRotate rot = new Rotate(int angle, int maxAngRot = 25);
    rot->apply(Mat cpImg);
  • For Contrast and Brightness

    adContBright cb = new adContBright();
    cb->setBrightness(int brightness);
    cb->setContrast(float contrast);
    cb->setMaxBrightness(int maxBrightness);
    cb->setMinBrightness(int minBrightness);
    cb->setMaxContrast(float maxContrast);
    cb->setMinContrast(float minContrast);
    cb->setMinSigDst(float minSigDst);
    cb->setMaxSigDst(float maxSigDst);
    cb->apply(Mat cpImg);

    or

    adContBright cb = new adContBright(int brightness, double contrast, int minBrightness = 50,
        int maxBrightness = 150, float maxContrast = 150, float minContrast = 50);
    cb->apply(Mat cpImg);

Requirements and Instalation

Daugment only requires openCV for C++.

  • Opencv - sudo apt-get install libopencv-dev

About

Daugment is a suport library for augmenting data from image samples

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published