Home

Awesome

Grid-Anchor-based-Image-Cropping-Pytorch

The extension of this work has been accepted by TPAMI. Please read the paper for details.

Requirements

python 2.7, pytorch 0.4.1, numpy, cv2, scipy.

Usage

  1. Download the source code, the datasets [conference version], [journal version] and the pretrained models [conference version] [journal version]

  2. Run TrainModel.py to train a new model on our dataset or Run demo_eval.py to test the pretrained model on any images.

  3. To change the aspect ratio of generated crops, please change the generate_bboxes function in croppingDataset.py (line 115).

Annotation software

The executable annotation software can be found here.

Other implementation

  1. PyTorch 1.0 or later
  2. Matlab (conference version)

Citation

@inproceedings{zhang2019deep,
  title={Reliable and Efficient Image Cropping: A Grid Anchor based Approach},
  author={Zeng, Hui, Li, Lida, Cao, Zisheng and Zhang, Lei},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition},
  year={2019}
}
@article{zeng2020cropping,
  title={Grid Anchor based Image Cropping: A New Benchmark and An Efficient Model},
  author={Zeng, Hui and Li, Lida and Cao, Zisheng and Zhang, Lei},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  volume={},
  number={},
  pages={},
  year={2020},
  publisher={IEEE}
}