What algorithm to use I am stuck on what algorithm to use. I want to train my program on a dataset where i have an input image, and an output image which is a modified version of the input. The whole context of the image is important, and each pixel counts. 

After training i want to input an image, and get an output similar to the training data.
You can use Deep convolution GAN network of Deep learning. It would be a generative model.

you can get detailed help from :

https://medium.com/@keisukeumezawa/dcgan-generate-the-images-with-deep-convolutinal-gan-55edf947c34b