MLDatasetBuilder is a python package which is helping to prepare the image for your ML dataset.
pip install mldatasetbuilder