MichalBusta/E2E-MLT

Need help to understand pts=np.roll(pts, 2)

kei6 opened this issue · 2 comments

kei6 commented

I'm going deeper to your repo and I cannot understand this below code:

E2E-MLT/data_gen.py

Lines 122 to 123 in 2858358

if is_icdar:
pts = np.roll(pts,2)

I've checked some examples with this and find out that will shift an array liked:
[1224. 2041. 1537. 2041. 1537. 2134. 1224. 2134.]
into:
[1224. 2134. 1224. 2041. 1537. 2041. 1537. 2134.]

I know how numpy.roll function works, but I don't understand why you did it only for ICDAR dataset.
Can you help to explain this?
Thanks,

kei6 commented

Thanks for this quick explanation!
It is really important information if anyone wants to train your network with their own data, they need to make sure the data format start with bottom left.