qurator-spk / sbb_pixelwise_segmentation

Pixelwise segmentation for document images
Apache License 2.0
10 stars 10 forks source link

rotation augmentation: rotate, don't just transpose #12

Open bertsky opened 3 years ago

bertsky commented 3 years ago

The current implementation of the rotation augmenter does not actually rotate or reflect, it transposes:

https://github.com/qurator-spk/sbb_pixelwise_segmentation/blob/63fcb961898540f95cb347d43f8965ae65b8be3f/utils.py#L108-L113

Thus, the image will still be flipped / mirrored afterwards.

I suggest using an actual reflection, or doing a flip (an inverse slice on the first axis) after the transposition.

Also, how about rotating -90°, and also various skew angles, too?