Rectifying the orientation of images represents a daily task for every photographer. This task may be complicated even for the human eye, especially when the horizon or other horizontal and vertical lines in the image are missing. In this paper we address this problem and propose a new deep learning network specially adapted for image rotation correction: we introduce the rectangle-shaped depthwise convolutions which are specialized in detecting long lines from the image and a new adapted loss function that addresses the problem of orientation errors. Compared to other methods that are able to detect rotation errors only on few image categories, like man-made structures, the proposed method can be used on a larger variety of photographs e.g., portraits, landscapes, sport, night photos etc. Moreover, the model is adapted to mobile devices and can be run in real time, both for pictures and for videos. An extensive evaluation of our model on different datasets shows that it remarkably generalizes, not being dependent on any particular type of image. Finally, we significantly outperform the state-of-the-art methods, providing superior results.
翻译:校正图像方向是每个摄影师的日常任务。 即便对于人类眼睛来说, 这项任务也可能很复杂, 特别是当图像缺少地平线或其他水平线和垂直线时。 在本文中, 我们讨论这个问题, 并提出一个新的深层次学习网络, 专门为图像旋转校正: 我们引入矩形形深深深层的演化, 专门探测图像长线, 以及新的适应性损失函数, 解决方向错误问题。 与其他方法相比, 只能探测几类图像的旋转错误, 比如人造结构, 提议的方法可以用在更多种类的照片上使用, 例如肖像、 景观、 运动、 夜照等 。 此外, 模型可以适应移动设备, 并且可以实时运行, 用于图片和视频 。 对不同数据集的模型进行广泛评估, 显示它非常笼统, 不依赖于任何特定类型的图像 。 最后, 我们明显地超越了最先进的方法,, 提供更高级的结果 。