Diagnostics and monitoring of radiological scenes are critical to the field of nuclear safety and here, the localization of radioactive hotspots is mandatory and remains a critical challenge. In order to perform gamma-ray imaging, one main method relies on indirect imaging by means of coded mask aperture associated with a position sensitive gamma-ray detector and a dedicated deconvolution algorithm. However, the deconvolution problem is non-injective, which implies limitations of the reconstruction performance, especially for spatially extended radioactive sources with respect to the angular resolution. In this paper, we present and evaluate a new method based on a deep learning algorithm with a convolutional neural network to overcome this limitation, in comparison with a classical iterative algorithm. Our deep learning algorithm is trained on simulated data of extended sources that may imply an intrinsic regularization of the neural network. We test it on real data acquired with a gamma camera system based on Caliste, a CdTe detector for high-energy photons.