| The techniques of image restoration have wide applications and important significance.With the development of deep learning in the field of computer vision,image restoration based on deep learning has gradually became a prosperous area.As an important branch of image restoration,restoration of blurred images has also been affected.There are usually two major branches in current deep-learning-based deblur algorithms:motion deblur and out-of-focus deblur.End-to-end deep networks of the former are more mature,but still suffers from some problems,such as poor non-local connection and insufficient perceptual field.The latter branch mostly focuses on defocus detection and defocus map estimation.There are fewer algorithms for generating all-in-focus images directly.In this paper,we analyze problems of current motion deblur algorithms and defocus deblur algorithms based on deep learning.Then we make some optimization for these algorithms separately for two different forms of blur.Compared with current algorithms,our method has improved both of the qualitative and quantitative metrics.We also design and build a lightweight deblur system composed of two blur modules,which provides a form for the grounded application of deep image recovery networks.The work in this paper consists of three main areas:(1)We propose a motion deblur network based on self-attentive module and deformable convolution.The network is based on a deep hierarchical pyramid network,which optimized by adding a self-attention module,deformable convolution and perceptual loss.Then,we use a stacking structure to enhance the performance.First,a self-attention module is added to the third layer of the hierarchical network,which make the network could acquire more non-local information and deal with the connection of local features and global information.Secondly,deformable convolution is used to replace the normal convolution in the decoder of the third layer,so that the architecture can be more adapted to the dynamic characteristics of motion blur kernel,which expand the receptive field.Then,during the process of training,we combine the perceptual loss with mean square error to constrain the model in both high-level and low-level features.Finally,this paper also investigates the effect of stacking structure.The experimental results on the GoPro dataset can prove that the algorithm proposed in this paper achieves better results in terms of both quantitative metrics and visual effects.Compared with current algorithms,our network has improved 0.4dB improvement in PSNR.(2)A defocus blur restoration algorithm based on multi-scale information has been proposed in this paper.Selective receptive field module,residual channel attention and edge loss are used to optimize the performance based on DP image-guided deep neural network.First,this paper performs an efficient and concise multi-scale information fusion by the selective receptive field module,so that the network can adapt to the scale sensitivity of the defocus region.Secondly,we use the residual channel attention module in the bottleneck to extract the correlation features between channels,which enhances the effective channels and suppress the ineffective channels.Finally,this paper uses a combination of edge loss and mean square loss to enhance the edge details during training.The results on the DP dataset show that the algorithm proposed in this paper can achieve better results than the traditional and current depth schemes.Compared with some algorithms,our network has a 0.44 dB improvement in PSNR metric.(3)Finally,a blurred image restoration system is designed and implemented.The system adopts B/S architecture and aims to provide users with blurred image restoration function by deep model supported on the web side.The client of this system provides the display interface and upload interface for users,including the web interface module based on the front-end syntax;the server is responsible for receiving images and invoking deep model to deal with the images,including the background request processing module and the deep learning invocation module.The system has good expansion performance and provides a trial solution for the implementation of image restoration technology. |