I have several image datasets and I am going to combine all of them into 1 giant dataset I decided to load the images which are in different formats (SVG, PIL images, etc ) and save them as png but this took forever, there any alternative solution?
You can use Image processing tools, Such as ImageMagick, GraphicsMagick(Similar to ImageMagick), and PIL (Python Imaging Library or Known as Pillow). These tools can convert images fastly.
Here is an example of a Python Imaging Library code:
from PIL import Image im1 = Image.open(r'path where the JPG is stored\file name.jpg') im1.save(r'path where the PNG will be stored\new file name.png
There are a couple of different options to solve this problem:
Create a custom Dataloader class - Depending on the modeling framework, different file formats can be read and modified at the loading stage. This is a useful option because most modeling packages assume all images are the same size/channels.