The goal of image cropping is to identify visually appealing crops in an image. Conventional methods are trained on specific datasets and fail to adapt to new requirements. Recent breakthroughs in large vision-language models (VLMs) enable visual in-context learning without explicit training. However, downstream tasks with VLMs remain under explored. In this paper, we propose an effective approach to leverage VLMs for image cropping. First, we propose an efficient prompt retrieval mechanism for image cropping to automate the selection of in-context examples. Second, we introduce an iterative refinement strategy to iteratively enhance the predicted crops. The proposed framework, we refer to as Cropper, is applicable to a wide range of cropping tasks, including free-form cropping, subject-aware cropping, and aspect ratio-aware cropping. Extensive experiments demonstrate that Cropper significantly outperforms state-of-the-art methods across several benchmarks.
翻译:图像裁剪的目标是在图像中识别出视觉上吸引人的裁剪区域。传统方法在特定数据集上进行训练,难以适应新的需求。大型视觉语言模型的最新突破使得无需显式训练即可实现视觉上下文学习。然而,视觉语言模型在下游任务中的应用仍待深入探索。本文提出了一种利用视觉语言模型进行图像裁剪的有效方法。首先,我们提出了一种高效的图像裁剪提示检索机制,以自动选择上下文示例。其次,我们引入了一种迭代优化策略,以逐步提升预测裁剪区域的质量。所提出的框架(我们称之为Cropper)适用于广泛的裁剪任务,包括自由形式裁剪、主体感知裁剪和宽高比感知裁剪。大量实验表明,Cropper在多个基准测试中显著优于现有最先进方法。