I am reading through and thinking about how neural network works and have been reading about convolutional neural networks (CNN). I am particularly interested in image filtering (or enhancing) using CNN. The thing that confuses me is, how exactly does CNN produce the output, filtered/enhanced image? From what I understand each layer convolves the previous input into more distinctive features, so aren't we essentially losing details? How would the network then know that, for example, this noisy image A, should be cleaned up here and there as such trained to produce a clean image B?
A plain CNN normally isn't used to produce an image as output; but if you combine it with deconvolution layers, then you can produce an image as output.