mdbloice / Augmentor

Image augmentation library in Python for machine learning.
https://augmentor.readthedocs.io/en/stable
MIT License
5.08k stars 866 forks source link

How to save output to a specific folder #230

Open mona-commits opened 3 years ago

mona-commits commented 3 years ago

Hi, thank you so much for providing this tool but I am still wondering how do I save my output to a specific mode? I mean most of the times we have a folder for image and another one for ground truth. How do I go about saving the generated images and ground truth in seperate folders?

newb-dev-1008 commented 3 years ago

@mona-commits I found that the init() method in the Pipeline has three parameters which aren't mentioned in the documentation:

In the Pipeline.py file, the constructor has three parameters:

def __init__(self, source_directory=None, output_directory="output", save_format=None)

While the source_directory parameter has been mentioned in the documentation, output_directory hasn't been mentioned and has been set to "output" folder by default.

TL;DR: Enter the path of your destination folder as the second parameter to Augmentor.Pipeline() when you initialize a pipeline.