This is an unofficial PyTorch implementation of Composing Photos Like a Photographer, in which the anchor-point regressors is based on Anchor-to-Joint Regression Network and more details about this can be found in their paper & code.
Test set | FCDB | FLMS | KU-PCP |
---|---|---|---|
Original Paper | IoU=0.718 BDE=0.069 | IoU=0.854 BDE=0.033 | Accuracy=88.2% |
This code | IoU=0.702 BDE=0.074 | IoU=0.841 BDE=0.037 | Accuracy=88.4% |
Note that the accuracy is produced training composition classification branch alone.
config_*.py
. check_jpg_file
function in KUPCP_dataset.py
.You can also install packages using pip according to requirements.txt
:
pip install -r requirements.txt
# clone this repository
git clone https://github.com/bo-zhang-cs/CACNet-Pytorch.git
cd CACNet-Pytorch && mkdir pretrained_model
Download pretrained models to the folder pretrained_model
.
python test.py
This will produce a folder results
where you can find the predicted best crops.
python train_composition_classification.py
python train_image_cropping.py
tensorboard --logdir=./experiments
The model performance for each epoch is also recorded in .csv file under the produced folder ./experiments.
@inproceedings{hong2021composing,
title={Composing Photos Like a Photographer},
author={Hong, Chaoyi and Du, Shuaiyuan and Xian, Ke and Lu, Hao and Cao, Zhiguo and Zhong, Weicai},
booktitle={CVPR},
year={2021}
}