open-mmlab / mmocr

OpenMMLab Text Detection, Recognition and Understanding Toolbox
https://mmocr.readthedocs.io/en/dev-1.x/
Apache License 2.0
4.27k stars 743 forks source link

Annotations format #466

Closed ClearTorch closed 3 years ago

ClearTorch commented 3 years ago

Dear MMOCR organization: What is the impact of the counterclockwise sorting of text annotation points? I am training FCENet model on horizontal mirroring images and their points. I mirrored the points at the same time, but sorted on counterclockwise direction, starting from the upper right corner。 Will this affect the result? If will, how I change code? Thanks!

gaotongxiao commented 3 years ago

I guess it won't affect, because involved libraries should handle points sorted in either clockwise or counterclockwise order well as long as the polygon doesn't have self-intersection. However, it's generally safer to keep them ordered clockwise. It's especially not difficult in python to reverse their order with something like points = points[::-1].

BTW, you're welcome to share your result here if you have tried both :)