Prune and Repaint: Content-Aware Image Retargeting for any Ratio
This addresses the challenge of maintaining image quality and semantics during aspect ratio adjustments for display devices, though it appears incremental as it builds on prior retargeting methods.
The paper tackles the problem of image retargeting, where existing methods often cause deformation or artifacts when adjusting aspect ratios, by proposing PruneRepaint, which uses semantic importance to prune and repaint regions, resulting in improved preservation of key semantics and aesthetics as demonstrated on the RetargetMe benchmark.
Image retargeting is the task of adjusting the aspect ratio of images to suit different display devices or presentation environments. However, existing retargeting methods often struggle to balance the preservation of key semantics and image quality, resulting in either deformation or loss of important objects, or the introduction of local artifacts such as discontinuous pixels and inconsistent regenerated content. To address these issues, we propose a content-aware retargeting method called PruneRepaint. It incorporates semantic importance for each pixel to guide the identification of regions that need to be pruned or preserved in order to maintain key semantics. Additionally, we introduce an adaptive repainting module that selects image regions for repainting based on the distribution of pruned pixels and the proportion between foreground size and target aspect ratio, thus achieving local smoothness after pruning. By focusing on the content and structure of the foreground, our PruneRepaint approach adaptively avoids key content loss and deformation, while effectively mitigating artifacts with local repainting. We conduct experiments on the public RetargetMe benchmark and demonstrate through objective experimental results and subjective user studies that our method outperforms previous approaches in terms of preserving semantics and aesthetics, as well as better generalization across diverse aspect ratios. Codes will be available at https://github.com/fhshen2022/PruneRepaint.