# Image Inpainting Based on Multi-Patch Match with Adaptive Size
## 4 Experimental Results
### Image Restoration
#### 4.1.1 Instance Test
In Reference [17], although the search area is limited by picking out those sample patches whose sum of pixel values falls within a certain range near its target patch's, however, this strategy does not always work well because the sum in a patch may reflect very limited information, those unsatisfactory sample patches may not be well excluded. Moreover, Reference [4] starts to show some diffusion artifacts as the scratches become thicker. In contrast, the proposed method searches for sample patch only in those areas that have similar content to the target patch, even if the similarity metric function loses its effect, it can still avoid selecting wrong sample patches to reduce mismatch. The Sculpture and Texture I, the rich-textured images with thick scratches in Figures 9 and 10, show that the structures and textures are well preserved in our results, whereas Reference [4] introduces noticeable blurring artifacts in such case and this is also known as the common issue for diffusion-based methods. Texture II (Figure 11) is a regular pattern, therefore, we believe additional steps are required to automatically perceive the scale of texture element for this periodically arranged textures to decide the optimal patch size before further improvements are made. Unfortunately, none of these methods has solved this challenging task yet. The objective performance of algorithms will be assessed from two aspects: quality and efficiency. Peak signal to noise ratio (PSNR) and structural similarity index (SSIM) [23] are used to evaluate the similarity between the completed image and the ground truth, the higher PSNR and SSIM value means the higher quality of a completed image. Running time of the algorithm is used to measure inpainting efficiency. The objective evaluation for the above images under each algorithm is shown in Tables 1-3:  
Figure 11: Comparison of inpainting results for regular pattern Texture II (640 \(\times\) 640): (**a**) Ground truth; (**b**) incomplete image; (**c**) CDD model [4]; (**d**) [PERSON]’s method [10]; (**e**) [PERSON]’s method [17]; (**f**) [PERSON]’s method [18]; (**g**) proposed method. From the perspective of objective evaluation, the inpainting quality reflected by PSNR and SSIM is basically consistent with the subjective visual perception. Restored areas with more coherent and natural textures and structures may present better visual effects, and will also obtain higher PSNR and SSIM values. As for inpainting efficiency, our method has successfully reduced the time consumption thanks to our subregion search and multi-patch match strategies. Although our method is able to fill a maximum of six target patches in a single iteration, the running time is not shortened by six times as expected. This is because when the target patch size adaptively gets smaller, the inpainting progress will be slowed down. We also notice that if the image size gets larger, the acceleration becomes more obvious, since the average patch size will also increase. While Reference [17] tries to limit the search area by picking out those candidates whose sum is close to the target patch's, this does not significantly reduce the calculation and obtains limited acceleration. References [10] and [18] both adopt global search; and Reference [18] converts the determination of optimal patch size into an extra optimization problem, that requires additional iterations and decreases the overall efficiency.