Compression artifacts arise in images whenever a lossy compression algorithmis applied. These artifacts eliminate details present in the original image, oradd noise and small structures; because of these effects they make images lesspleasant for the human eye, and may also lead to decreased performance ofcomputer vision algorithms such as object detectors. To eliminate suchartifacts, when decompressing an image, it is required to recover the originalimage from a disturbed version. To this end, we present a feed-forward fullyconvolutional residual network model trained using a generative adversarialframework. To provide a baseline, we show that our model can be also trainedoptimizing the Structural Similarity (SSIM), which is a better loss withrespect to the simpler Mean Squared Error (MSE). Our GAN is able to produceimages with more photorealistic details than MSE or SSIM based networks.Moreover we show that our approach can be used as a pre-processing step forobject detection in case images are degraded by compression to a point thatstate-of-the art detectors fail. In this task, our GAN method obtains betterperformance than MSE or SSIM trained networks.