It would be great to be able to draw a selection frame in TagGUI which would then crop the image to the selected content and resize it (only shrinking) to then fit a configured maximum size.
And for masked training it would be great when the mask could be drawn in TagGUI as well.
Refinement
It would be great to be able to configure a list of valid aspect ratios or sizes and then the selection frame will automatically be constraint to them. This would be great for batched training and keeping the number of batches small.
Implementation idea
TagGUI doesn't modify the images only the captions. This is great as it prevents you from worrying about modifying precious data!
So I suggest to store the image manipulation data either in a hidden tag or in a side file like my_image_name.jpg.meta. And then TagGUI could offers an export menu entry where then all images are cropped and resized and stored together with their caption file in a new directory.
Additional information
Resizing an image should use the best algorithm. Lanczos comes to mind and there should be implementations of it easily available in libraries. After shrinking an image usually you should follow with a slight sharpening (e.g. unsharp mask with 0.5 pixel width).
Image mask can come in two kinds, either it's stored in the image itself (when it is stored in png format) or it comes in an additional greyscale image.
General request
It would be great to be able to draw a selection frame in TagGUI which would then crop the image to the selected content and resize it (only shrinking) to then fit a configured maximum size. And for masked training it would be great when the mask could be drawn in TagGUI as well.
Refinement
It would be great to be able to configure a list of valid aspect ratios or sizes and then the selection frame will automatically be constraint to them. This would be great for batched training and keeping the number of batches small.
Implementation idea
TagGUI doesn't modify the images only the captions. This is great as it prevents you from worrying about modifying precious data! So I suggest to store the image manipulation data either in a hidden tag or in a side file like
my_image_name.jpg.meta
. And then TagGUI could offers anexport
menu entry where then all images are cropped and resized and stored together with their caption file in a new directory.Additional information
png
format) or it comes in an additional greyscale image.