IMAGE MANIPULATION USING DEEP LEARNING

Patch based Image Color normalization and merging

How to colorize / transform Images without losing their aspect ratio and quality

Lars Nielsen
5 min read4 days ago

--

This article is about effective transformation of images without having to downscale them because of GPU memory restriction ! ( Or for that matter any image transformation, without having to downscale ! )

If you have done any vision algorithms using deep learning, you will know that there are some standard practices and limitations in performing these processes.

Here are a couple of challenges -

1. Image size gets scaled down ( Memory )

Your GPU might not have enough memory to process the entire image . So the Original image that you are passing to the algorithm might be scaled down to

2. Aspect ratio changes ( algorithm )

The most popular Deep Learning algorithms ( like GANs, for example ) convert the input image into a square image. ( i.e. an aspect ratio of 1:1 ). And then the output mostly maintains the same aspect ratio.

That means if you pass a landscape / portrait image , the output will be a square image — which, most of the times is not the desirable output )

Here is an example of an image transformation that takes place within the algorithm to…

--

--

Lars Nielsen

Making ML and AI available to everyone. One commit at a time. | Quantitative programming | Python | Arduino | Comp Vision | pythoslabs@gmail.com / @PythosL