项目作者: waikato-ufdl

项目描述 :
Stream processors for the wai.annotations conversion library.
高级语言:
项目地址: git://github.com/waikato-ufdl/wai-annotations-processors.git
创建时间: 2020-06-16T01:36:04Z
项目社区:https://github.com/waikato-ufdl/wai-annotations-processors

开源协议:Apache License 2.0

下载


wai-annotations-imgaug

Image augmentation stream processors for the wai.annotations
conversion library.

The manual is available here:

https://ufdl.cms.waikato.ac.nz/wai-annotations-manual/

Plugins

CROP

Crops images.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. CROP:
  2. Crops images.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: crop [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-f PERCENT_FROM] [-t PERCENT_TO] [-s SEED] [-a] [-T THRESHOLD] [-u]
  5. optional arguments:
  6. -m IMGAUG_MODE, --mode IMGAUG_MODE
  7. the image augmentation mode to use, available modes: replace, add
  8. --suffix IMGAUG_SUFFIX
  9. the suffix to use for the file names in case of augmentation mode add
  10. -f PERCENT_FROM, --from-percent PERCENT_FROM
  11. the minimum percent to crop from images
  12. -t PERCENT_TO, --to-percent PERCENT_TO
  13. the maximum percent to crop from images
  14. -s SEED, --seed SEED
  15. the seed value to use for the random number generator; randomly seeded if not provided
  16. -a, --seed-augmentation
  17. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  18. -T THRESHOLD, --threshold THRESHOLD
  19. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)
  20. -u, --update-size
  21. whether to update the image size after the crop operation or scale back to original size

FLIP

Flips images either left-to-right, up-to-down or both.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. FLIP:
  2. Flips images either left-to-right, up-to-down or both.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: flip [-d DIRECTION] [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-s SEED] [-a] [-T THRESHOLD]
  5. optional arguments:
  6. -d DIRECTION, --direction DIRECTION
  7. the direction to flip, available options: lr, ud, lrud
  8. -m IMGAUG_MODE, --mode IMGAUG_MODE
  9. the image augmentation mode to use, available modes: replace, add
  10. --suffix IMGAUG_SUFFIX
  11. the suffix to use for the file names in case of augmentation mode add
  12. -s SEED, --seed SEED
  13. the seed value to use for the random number generator; randomly seeded if not provided
  14. -a, --seed-augmentation
  15. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  16. -T THRESHOLD, --threshold THRESHOLD
  17. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)

GAUSSIAN-BLUR

Applies gaussian blur to images.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. GAUSSIAN-BLUR:
  2. Applies gaussian blur to images.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: gaussian-blur [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-s SEED] [-a] [-f SIGMA_FROM] [-t SIGMA_TO] [-T THRESHOLD]
  5. optional arguments:
  6. -m IMGAUG_MODE, --mode IMGAUG_MODE
  7. the image augmentation mode to use, available modes: replace, add
  8. --suffix IMGAUG_SUFFIX
  9. the suffix to use for the file names in case of augmentation mode add
  10. -s SEED, --seed SEED
  11. the seed value to use for the random number generator; randomly seeded if not provided
  12. -a, --seed-augmentation
  13. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  14. -f SIGMA_FROM, --from-sigma SIGMA_FROM
  15. the minimum sigma for the blur to apply to the images
  16. -t SIGMA_TO, --to-sigma SIGMA_TO
  17. the maximum sigma for the blur to apply to the images
  18. -T THRESHOLD, --threshold THRESHOLD
  19. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)

HSL-GRAYSCALE

Turns RGB images into fake grayscale ones by converting them to HSL and then using the L channel for all channels. The brightness can be influenced and varied even.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. HSL-GRAYSCALE:
  2. Turns RGB images into fake grayscale ones by converting them to HSL and then using the L channel for all channels. The brightness can be influenced and varied even.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: hsl-grayscale [-f FACTOR_FROM] [-t FACTOR_TO] [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-s SEED] [-a] [-T THRESHOLD]
  5. optional arguments:
  6. -f FACTOR_FROM, --from-factor FACTOR_FROM
  7. the start of the factor range to apply to the L channel to darken or lighten the image (<1: darker, >1: lighter)
  8. -t FACTOR_TO, --to-factor FACTOR_TO
  9. the end of the factor range to apply to the L channel to darken or lighten the image (<1: darker, >1: lighter)
  10. -m IMGAUG_MODE, --mode IMGAUG_MODE
  11. the image augmentation mode to use, available modes: replace, add
  12. --suffix IMGAUG_SUFFIX
  13. the suffix to use for the file names in case of augmentation mode add
  14. -s SEED, --seed SEED
  15. the seed value to use for the random number generator; randomly seeded if not provided
  16. -a, --seed-augmentation
  17. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  18. -T THRESHOLD, --threshold THRESHOLD
  19. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)

LINEAR-CONTRAST

Applies linear contrast to images.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. LINEAR-CONTRAST:
  2. Applies linear contrast to images.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: linear-contrast [-f ALPHA_FROM] [-t ALPHA_TO] [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-s SEED] [-a] [-T THRESHOLD]
  5. optional arguments:
  6. -f ALPHA_FROM, --from-alpha ALPHA_FROM
  7. the minimum alpha to apply to the images
  8. -t ALPHA_TO, --to-alpha ALPHA_TO
  9. the maximum alpha to apply to the images
  10. -m IMGAUG_MODE, --mode IMGAUG_MODE
  11. the image augmentation mode to use, available modes: replace, add
  12. --suffix IMGAUG_SUFFIX
  13. the suffix to use for the file names in case of augmentation mode add
  14. -s SEED, --seed SEED
  15. the seed value to use for the random number generator; randomly seeded if not provided
  16. -a, --seed-augmentation
  17. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  18. -T THRESHOLD, --threshold THRESHOLD
  19. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)

ROTATE

Rotates images randomly within a range of degrees or by a specified degree. Specify seed value and force augmentation to be seeded to generate repeatable augmentations.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. ROTATE:
  2. Rotates images randomly within a range of degrees or by a specified degree. Specify seed value and force augmentation to be seeded to generate repeatable augmentations.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: rotate [-f DEGREE_FROM] [-t DEGREE_TO] [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-s SEED] [-a] [-T THRESHOLD]
  5. optional arguments:
  6. -f DEGREE_FROM, --from-degree DEGREE_FROM
  7. the start of the degree range to use for rotating the images
  8. -t DEGREE_TO, --to-degree DEGREE_TO
  9. the end of the degree range to use for rotating the images
  10. -m IMGAUG_MODE, --mode IMGAUG_MODE
  11. the image augmentation mode to use, available modes: replace, add
  12. --suffix IMGAUG_SUFFIX
  13. the suffix to use for the file names in case of augmentation mode add
  14. -s SEED, --seed SEED
  15. the seed value to use for the random number generator; randomly seeded if not provided
  16. -a, --seed-augmentation
  17. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  18. -T THRESHOLD, --threshold THRESHOLD
  19. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)

SCALE

Scales images randomly within a range of percentages or by a specified percentage. Specify seed value and force augmentation to be seeded to generate repeatable augmentations.

Domain(s):

  • Image Classification Domain, Image Object-Detection Domain

Options:

  1. SCALE:
  2. Scales images randomly within a range of percentages or by a specified percentage. Specify seed value and force augmentation to be seeded to generate repeatable augmentations.
  3. Domain(s): Image Object-Detection Domain, Image Classification Domain
  4. usage: scale [-m IMGAUG_MODE] [--suffix IMGAUG_SUFFIX] [-k] [-f PERCENTAGE_FROM] [-t PERCENTAGE_TO] [-s SEED] [-a] [-T THRESHOLD] [-u]
  5. optional arguments:
  6. -m IMGAUG_MODE, --mode IMGAUG_MODE
  7. the image augmentation mode to use, available modes: replace, add
  8. --suffix IMGAUG_SUFFIX
  9. the suffix to use for the file names in case of augmentation mode add
  10. -k, --keep-aspect
  11. whether to keep the aspect ratio
  12. -f PERCENTAGE_FROM, --from-percentage PERCENTAGE_FROM
  13. the start of the percentage range to use for scaling the images
  14. -t PERCENTAGE_TO, --to-percentage PERCENTAGE_TO
  15. the end of the percentage range to use for scaling the images
  16. -s SEED, --seed SEED
  17. the seed value to use for the random number generator; randomly seeded if not provided
  18. -a, --seed-augmentation
  19. whether to seed the augmentation; if specified, uses the seeded random generator to produce a seed value from 0 to 1000 for the augmentation.
  20. -T THRESHOLD, --threshold THRESHOLD
  21. the threshold to use for Random.rand(): if equal or above, augmentation gets applied; range: 0-1; default: 0 (= always)
  22. -u, --update-size
  23. whether to update the image size after the scaling operation or use original size

SUB-IMAGES

Extracts sub-images (incl their annotations) from the images coming through, using the defined regions.

Domain(s):

  • Image Classification Domain
  • Image Object-Detection Domain

Options:

  1. usage: sub-images [-p] [-s REGION_SORTING] [-r REGIONS [REGIONS ...]]
  2. optional arguments:
  3. -p, --include-partial
  4. whether to include only annotations that fit fully into a region or also partial ones (default: False)
  5. -s REGION_SORTING, --region-sorting REGION_SORTING
  6. how to sort the supplied region definitions: none|x-then-y|y-then-x (default: none)
  7. -r REGIONS [REGIONS ...], --regions REGIONS [REGIONS ...]
  8. the regions (X,Y,WIDTH,HEIGHT) to crop and forward with their annotations (default: [])