An apparatus for training a neural network model for enhancing image detail comprising: a memory configured to store one or more instructions; and at least one processor configured to execute the one or more instructions stored in the memory to: obtain a low quality input image patch, P L , and a high quality input image patch, P H ; obtain a low quality output image patch, P' L , by inputting the low quality input image patch to a first neural network model ; obtain a high quality output image patch, P' H , by inputting the high quality input image patch to a second neural network model ; and train the first neural network model based on a loss function set to reduce a difference between the low quality output image patch and the high quality input image patch, and a difference between the high quality output image patch and the high quality input image patch, wherein the first and second neural network models are identical convolutional neural network models, and wherein the loss function includes, as terms: the difference between the low quality output image patch and the high quality input image patch, and a product of a difference between the low quality output image patch and the low quality input image patch, and the difference between the high quality output image patch and the high quality input image patch. a memory configured to store one or more instructions; and at least one processor configured to execute the one or more instructions stored in the memory to: obtain a low quality input image patch, P L , and a high quality input image patch, P H ; obtain a low quality output image patch, P' L , by inputting the low quality input image patch to a first neural network model ; obtain a high quality output image patch, P' H , by inputting the high quality input image patch to a second neural network model ; and train the first neural network model based on a loss function set to reduce a difference between the low quality output image patch and the high quality input image patch, and a difference between the high quality output image patch and the high quality input image patch, obtain a low quality input image patch, P L , and a high quality input image patch, P H ; obtain a low quality output image patch, P' L , by inputting the low quality input image patch to a first neural network model ; obtain a high quality output image patch, P' H , by inputting the high quality input image patch to a second neural network model ; and train the first neural network model based on a loss function set to reduce a difference between the low quality output image patch and the high quality input image patch, and a difference between the high quality output image patch and the high quality input image patch, wherein the first and second neural network models are identical convolutional neural network models, and wherein the loss function includes, as terms: the difference between the low quality output image patch and the high quality input image patch, and a product of a difference between the low quality output image patch and the low quality input image patch, and the difference between the high quality output image patch and the high quality input image patch. the difference between the low quality output image patch and the high quality input image patch, and a product of a difference between the low quality output image patch and the low quality input image patch, and the difference between the high quality output image patch and the high quality input image patch. <EOS>