#23773·keras

RandomRotation: 盒子围绕与图像不同的中心进行旋转(半像素偏移)

作者: MaverickTopG创建于 2026年9月26日更新于 2026年9月28日
标签type:Bug

Hi — I think `RandomRotation` rotates bounding boxes around a slightly different center than the image, so the boxes end up shifted by a fraction of a pixel. Other Keras box kernels treat box coordinates as continuous edges: `RandomFlip` maps boxes through `1 - x` in relative coordinates, i.e. `W - x` in absolute terms, and `Resizing` scales them by `x * new_width / width`. Both are correct only if a box edge at `x` means position `x` in continuous image coordinates.

内容来源: keras-team/keras