Rudi
If you want to train a CNN, the custom dataset must be a collection of images of the same aspect ratio, extension, etc. This script is gonna do that for you. Rudi is a command line tool for converting and augmenting your dataset of images.
Installation
Install Python3 and then run the following command:
pip install rudi
or clone the repo firs
git clone https://github.com/liashchynskyi/rudi
cd rudi
and run python setup.py install or pip install .
Usage
Convert a dataset
For example, you have a basic tree of the root directory (the script will also work if the root containt only images without other dirs).
root
в””в”Ђв”Ђв”Ђclass1
в”‚ в”‚ image_c1.png
в”‚ в”‚ image_c2.png
в”‚ в””в”Ђв”Ђв”Ђsubdirectory
в””в”Ђв”Ђв”Ђclass2
в”‚ image_c1.png
в”‚ image_c2.png
Just run rudi convert --help
Let's convert images in current directory to jpg format and set new aspect ratio to 224px.
rudi convert -t jpg --target-size=224 ./
Output images will be saved in output dir of the root.
Dataset augmentation
Command: rudi augment --help
There are a few supported operations:
flip- random image flipping followed by-poptionrotate- random image rotation followed by-p,-mlrand-mrroptionsdistortion- random image distortion followed by-p,-mgand-gwhoptionsskew- random image skewing followed by-poption and constantmagnitudevalue of0.7zoom- random image zooming followed by-p,-minfand-maxfoptions
Output images will be saved in output dir of the root.
Changelog
1.0.1- Fixed problem when converting images. Now if image is placed in subdirectory
then that subdir also will be created in
outputdir.
- Fixed problem when converting images. Now if image is placed in subdirectory
then that subdir also will be created in
Donate
Just put a star on this repository рџЊћ Thanks!
Metadata
Release files for rudi 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rudi-1.0.1.tar.gz | 4.1 kB | Without provenance | Details for rudi-1.0.1.tar.gz |
Release files / rudi-1.0.1.tar.gz
| Download URL | rudi-1.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26aad6cb098796bd0a2730cb463e80c66d0ce6d114a8198e053757772417ab5d
|
|
BLAKE2b-256 checksum How to use checksums |
2697568b5a9cb33553bd9c8a739ec77af639c702f854997c6449e60674be71ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.19.5 CPython/3.6.7
|
Security for rudi 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.