{ "info": { "author": "Petro Liashchynskyi", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Rudi\n\nIf you want to train a CNN, the custom dataset must be a collection of images of the same aspect ratio, extension, etc.\nThis script is gonna do that for you. Rudi is a command line tool for converting and augmenting your dataset of images.\n\n# Installation\n\nInstall `Python3` and then run the following command:\n```sh\npip install rudi\n```\n\nor clone the repo firs \n```sh\ngit clone https://github.com/liashchynskyi/rudi\ncd rudi\n```\nand run `python setup.py install` or `pip install .`\n\n# Usage\n\n---\n* [Convert a dataset](#convert-a-dataset)\n* [Dataset augmentation](#dataset-augmentation)\n* [Changelog](#changelog)\n* [Donate](#donate)\n\n# Convert a dataset\n\nFor example, you have a basic tree of the root directory (the script will also work if the root containt only images without other dirs).\n```\nroot \n\u0432\u201d\u201d\u0432\u201d\u0402\u0432\u201d\u0402\u0432\u201d\u0402class1\n\u0432\u201d\u201a \u0432\u201d\u201a image_c1.png\n\u0432\u201d\u201a \u0432\u201d\u201a image_c2.png\n\u0432\u201d\u201a \u0432\u201d\u201d\u0432\u201d\u0402\u0432\u201d\u0402\u0432\u201d\u0402subdirectory \n\u0432\u201d\u201d\u0432\u201d\u0402\u0432\u201d\u0402\u0432\u201d\u0402class2\n \u0432\u201d\u201a image_c1.png\n \u0432\u201d\u201a image_c2.png\n```\n\nJust run `rudi convert --help`\n\n\nLet's convert images in current directory to `jpg` format and set new aspect ratio to `224px`.\n```sh\nrudi convert -t jpg --target-size=224 ./\n```\nOutput images will be saved in `output` dir of the root.\n\n# Dataset augmentation\n\nCommand: `rudi augment --help`\n\n\nThere are a few supported operations:\n* `flip` - random image flipping followed by `-p` option\n* `rotate` - random image rotation followed by `-p`,`-mlr` and `-mrr` options\n* `distortion` - random image distortion followed by `-p`,`-mg` and `-gwh` options\n* `skew` - random image skewing followed by `-p` option and constant `magnitude` value of `0.7`\n* `zoom` - random image zooming followed by `-p`,`-minf` and `-maxf` options\n\nOutput images will be saved in `output` dir of the root.\n\n# Changelog\n\n* `1.0.1`\n * Fixed problem when converting images. Now if image is placed in subdirectory\n then that subdir also will be created in `output` dir. \n\n\n# Donate\nJust put a star on this repository \u0440\u045f\u040a\u045b Thanks!\n\n