Open dill-shower opened 7 months ago
Why? Lanczos4 is slower (which matters when datasets can contain tens of thousands of images) and OpenCV's own documentation says INTER_AREA is preferred for downscaling:
INTER_AREA Python: cv.INTER_AREA
resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method.
Can we just change
https://github.com/kohya-ss/sd-scripts/blob/cd19df49cd512e13ac90db115c424d19c0e8868a/library/train_util.py#L2209
To _cv2.INTERLANCZOS4 on this line in this file so that the lanczos4 algorithm is used to downscale the size of the training images?