By training a deep convolutional neural network with a self-supervised data augmentation on the 360 spherical panorama images, we can precisely estimate and correct the horizontal and vertical alignment of slanted photographs for visually pleasing photo composition.