Source-linked AI summary

Reliable and Efficient Image Cropping: A Grid Anchor based Approach

Hui Zeng, Lida Li, Zisheng Cao, Lei Zhang

arXiv:1904.04441v1cs.CV

TL;DR

Image cropping lacks reliable supervision and evaluation because acceptable crops are non-unique and existing metrics can mis-rank visual quality. The paper uses grid anchors to reduce search, exhaustively annotates a new benchmark with improved metrics, and introduces a lightweight model that outputs visually pleasing crops at 125 FPS. The resulting framework supports robust cropping across different aspect ratios and scenes.

  • Problem

    Existing cropping databases provide only sparse annotations, while IoU and BDE can fail to reflect the visual quality of flexible, non-unique crops.

    Source: §1 · pp. 1–2
  • Method

    The paper combines a grid-anchor crop formulation, an exhaustively annotated benchmark with reliable metrics, and a lightweight CNN cropping module.

    Source: §1 · p. 2, §3.2 · p. 4, §3.3 · p. 4
  • Results

    The model runs at 125 FPS and robustly outputs visually pleasing crops under different aspect ratios.

    Source: §1 · p. 2, §6 · p. 9
  • Takeaways & Limitations

    Grid-anchor image cropping provides a reliable and efficient framework for training and evaluating cropping models across varied cropping requirements.

    Source: §1 · p. 2, §6 · p. 9

Abstract

from arXiv · show

Image cropping aims to improve the composition as well as aesthetic quality of an image by removing extraneous content from it. Existing image cropping databases provide only one or several human-annotated bounding boxes as the groundtruth, which cannot reflect the non-uniqueness and flexibility of image cropping in practice. The employed evaluation metrics such as intersection-over-union cannot reliably reflect the real performance of cropping models, either. This work revisits the problem of image cropping, and presents a grid anchor based formulation by considering the special properties and requirements (e.g., local redundancy, content preservation, aspect ratio) of image cropping. Our formulation reduces the searching space of candidate crops from millions to less than one hundred. Consequently, a grid anchor based cropping benchmark is constructed, where all crops of each image are annotated and more reliable evaluation metrics are defined. We also design an effective and lightweight network module, which simultaneously considers the region of interest and region of discard for more accurate image cropping. Our model can stably output visually pleasing crops for images of different scenes and run at a speed of 125 FPS. Code and dataset are available at: https://github.com/HuiZeng/Grid-Anchor-based-Image-Cropping.

1. Introduction

Image cropping is flexible and difficult to evaluate reliably because acceptable crops vary, while existing datasets and metrics provide limited or misleading supervision. The paper proposes a grid-anchor formulation, exhaustive benchmark annotations, reliable metrics, and an efficient cropping model.

1. Introduction

  • Acceptable crops vary across aspect ratios and even under the same ratio, making sparse groundtruth annotations insufficient for reliable model training.Existing databases typically provide only one or several annotated crops for each image.Source: §1 · p. 2
  • IoU can rank a visually bad crop above a visually good crop, showing that conventional cropping evaluation may disagree with aesthetic quality.The cited example uses three 16:9 crops and identifies the bottom crop as bad despite its larger IoU.Source: §1 · pp. 1–2
  • The proposed grid-anchor formulation reduces the candidate-crop search space from millions to fewer than one hundred.The formulation is designed around the special properties and requirements of image cropping.Source: §1 · p. 2
  • The new benchmark exhaustively annotates 106,860 candidate crops and defines more reliable evaluation metrics for learned cropping models.These annotations are intended to support robust model learning and evaluation beyond sparse bounding-box groundtruth.Source: §1 · p. 2
  • The proposed CNN cropping module runs at 125 FPS and achieves promising performance under varied requirements.The reported model is described as both efficient and effective for image cropping.Source: §1 · p. 2

2. Related work

Prior image-cropping methods are attention-, aesthetic-, or data-driven, but each faces limitations involving composition modeling, feature strength, supervision, or evaluation. Local redundancy motivates representing crops on grid anchors rather than dense pixels.

Attention-driven methods

  • Attention-driven methods locate salient or important regions, but limited consideration of overall composition can produce visually unpleasing crops.These methods commonly use saliency, face detection, or gaze interaction to identify regions of interest.Source: §2 · p. 2

Aesthetic-driven methods

  • Aesthetic-driven methods model composition with handcrafted features or quality measures, but handcrafted features are not strong enough to predict image aesthetics accurately.Some methods use discriminators such as SVMs, while cropping databases support discriminative model training.Source: §2 · p. 2

Data-driven methods

  • Data-driven methods train end-to-end CNNs, yet limited annotations motivate general aesthetic classifiers or pairwise learning, whose supervision and evaluation remain problematic.General classifiers may not reliably score crops within one image, pairwise annotations are expensive, and pairwise learning does not provide adequate cropping metrics.Source: §2 · pp. 2–3

Grid-anchor motivation

  • Small shifts or scale changes around an acceptable crop often remain acceptable, so grid anchors can remove redundant dense-pixel candidates.The formulation represents crop corners on grid centers to generate representative crops in each neighborhood.Source: Figure 2 · p. 3

3. Grid anchor based image cropping

The paper formulates cropping around grid anchors, constructs an exhaustively annotated benchmark, and introduces metrics tailored to ranking and returning acceptable crops.

3. Grid anchor based image cropping

  • The formulation addresses cropping’s non-unique, aspect-ratio-dependent search problem by supporting multiple acceptable crops rather than relying on sparse single-crop annotations.The design is motivated by the need to evaluate flexible cropping outcomes more reliably than conventional bounding-box-based criteria.Source: §3 · p. 3, §3.1 · pp. 3–4

3.1. Grid anchor based formulation

  • The grid-anchor formulation reduces each image’s candidate crops to no more than 90 by exploiting local redundancy, content preservation, and aspect-ratio constraints.It places crop corners on grid centers, restricts anchor regions, limits crop area, and filters unsuitable aspect ratios.Source: §3.1 · p. 3, §3.2 · p. 4

3.2. Grid anchor based cropping database

  • GAICD contains 106,860 annotated candidate crops from 1,236 images, with each crop rated by seven subjects and assigned a mean opinion score.The database covers varied scenes and lighting conditions; 94.25% of crops have rating standard deviations below 1.Source: §3.2 · p. 4

3.3. Evaluation metrics

  • Dense GAICD annotations enable average SRCC to measure agreement between predicted and MOS rankings, while AccK/N measures how many returned crops are among the top-N crops.The metrics target both ranking quality and whether returned crops are acceptable in practical use.Source: §3.3 · p. 4

4. Cropping model learning

The model combines dense crop annotations with a lightweight CNN module that evaluates both retained and discarded image regions. Its design preserves spatial context while reducing feature channels for efficient crop scoring.

4. Cropping model learning

  • The model uses GAICD's richer annotations and a CNN architecture comprising general feature extraction and a dedicated cropping module.The cropping module is designed around image-cropping properties rather than standard object-detection assumptions.Source: §4 · p. 5
  • The feature extractor must balance receptive field and spatial resolution because composition depends on both large objects and precise spatial arrangement.The paper evaluates truncated VGG16 and ResNet50 models to select a cost-effective layer.Source: §4 · p. 5
  • The module models both the region of interest and region of discard so it can remove distractions without discarding important visual content.RoIAlign processes the retained region, while RoDAlign processes the complementary feature map before the two representations are combined.Source: §4 · p. 5
  • Reducing VGG16 features from 512 to 8 channels preserves performance while making the cropping module efficient and lightweight.A 1 × 1 convolution performs the reduction before crop scoring.Source: §4 · p. 5
  • The model learns crop scores with Huber loss from differences between groundtruth MOS and predicted crop scores.The residual is defined as eij = gij − pij, with δ fixed at 1 in the experiments.Source: §4 · pp. 5–6

5.1. Implementation details

The experiments split GAICD into training/validation and testing images, score random crop batches during training, and evaluate all candidate crops at test time.

5.1. Implementation details

  • The split uses 200 GAICD images for testing and 1,036 images with 89,519 annotated crops for training and validation.Input images are resized so their short side is 256.Source: §5.1 · p. 6
  • Training batches contain one image and 64 randomly selected crops, whereas testing scores every generated crop for each image.The model is trained for 40 epochs with ADAM at a fixed learning rate of 1e−4.Source: §5.1 · p. 6
  • Training uses contrast and saturation augmentation, and MOS values are standardized using the training-set mean and standard deviation.Source: §5.1 · p. 6

5.2. Ablation study of our cropping model

The ablations show that cropping benefits from feature maps with adequate receptive field and spatial detail, while the proposed module gains accuracy by jointly modeling retained and discarded regions.

5.2.1 Feature extraction module

  • Increasing receptive field improves cropping accuracy until it exceeds roughly half the image size, while excessive stride loses spatial information and harms performance.With 256 × 256 inputs and stride 32, candidate-crop features can shrink to 4 × 4.Source: §5.2.1 · p. 6
  • VGG16 generally outperforms ResNet50 in the feature-extraction ablation, so the model uses VGG16 truncated at conv5 1.The authors suggest ResNet50 may overfit the database.Source: §5.2.1 · p. 6

5.2.2 Image cropping module

  • The cropping-module ablation evaluates spatial resolution and reduced channel dimension while fixing the fully connected layers at 512 filters.Table 4 reports performance and parameter size for these configurations.Source: Table 4 · p. 6, §5.2.2 · p. 7
  • Spatial resolution s = 9 is selected because smaller values perform worse and larger values provide no obvious improvement.The chosen reduced channel dimension is 8, yielding a 3.53 Mbits cropping module.Source: §5.2.2 · p. 7
  • Jointly modeling RoI and RoD achieves the best cropping accuracy, whereas using RoD alone performs poorly and using RoI alone performs better but less well.Source: §5.2.2 · p. 7

5.3. Comparison to other methods

Against available baselines and competing cropping methods, GAIC produces visually pleasing crops across scenes and aspect ratios, achieves the strongest reported quantitative performance, and runs fastest.

5.3.1 Comparison methods

  • The compared methods include an untrained largest-crop baseline, ranking-based VFN and VEN, proposal-based VPN, and iterative A2-RL.Source: §5.3.1 · p. 7

5.3.2 Qualitative comparison

  • GAIC and VEN stably produce visually pleasing crops, but VEN favors closeups whereas GAIC preserves more useful information.VFN can cut important content, while A2-RL often returns the source image.Source: §5.3.2 · pp. 7–8
  • Across 16:9, 4:3, and 1:1 settings, GAIC produces the most visually pleasing crop in most qualitative cases.A2-RL is excluded because it does not support this aspect-ratio test.Source: §5.3.2 · p. 8, Figure 7 · p. 8

5.3.3 Quantitative comparison

  • The comparison uses methods with different candidate-crop outputs, so VPN and A2-RL are evaluated only with Acc1/5 and Acc1/10 after nearest-anchor approximation.VFN, VEN, and GAIC support scoring all candidate crops in the proposed database.Source: §5.3.3 · p. 8
  • GAIC outperforms VEN by a large margin on the GAICD quantitative comparison, while A2-RL and VFN are only comparable to Baseline L.VEN improves substantially over VFN, and VPN is slightly worse than VEN.Source: §5.3.3 · p. 8, Table 5 · p. 8

5.3.4 Running speed

  • 125 FPS is GAIC's reported speed, faster than all competitors, with 40 Mbits versus VPN's 290 Mbits.A2-RL iterates crop windows, while VFN and VEN process crops individually.Source: §5.3.4 · p. 8, Table 5 · p. 8

6. Conclusion

The paper introduces grid anchor based image cropping (GAIC) as a more reliable and efficient formulation, with a new benchmark and lightweight cropping module for visually pleasing crops across aspect ratios.

  • GAIC constructs a benchmark with 1,236 source images and 106,860 annotated crops, together with two types of reliable evaluation metrics.The benchmark addresses limitations in existing databases and evaluation practices.Source: §6 · p. 9
  • The proposed formulation reduces image-cropping search from millions of candidate crops to fewer than one hundred.Source: §6 · p. 9
  • A lightweight CNN cropping module simultaneously considers regions of interest and discard for more accurate cropping.Source: §6 · p. 9
  • GAIC robustly produces visually pleasing crops under different aspect ratios and runs at 125 FPS.Source: §6 · p. 9
Loading 1904.04441v1…