Yuliang-Liu / Curve-Text-Detector

This repository provides train&test code, dataset, det.&rec. annotation, evaluation script, annotation tool, and ranking.
642 stars 156 forks source link

Convert annotations of other datasets to CTW's format #36

Closed billqxg closed 5 years ago

billqxg commented 5 years ago

Hello!

The annotations in the CTW1500 retain the text reading order, which is very percious in data annotation. And the results on the CTW1500 can be reproduced very successfully.

I also try to reproduce the results of CTD+TLOC on Total-Text and MSRA-TD500. Then I need to convert these two data sets into CTW's annotation format, which means that their reading order also needs to be retained.

How can I complete such a conversion? In the original paper for Total-Text "Because the annotated numbers for this dataset are not fixed and the point positions are subjectively determined, we extracted the text boundaries and used a similar LSI method to resample the annotated points."

Could you give more details on the conversion process?

Dive-frank commented 5 years ago

Hi: I have one solution,maybe will help. For example: a box of text image of total text ,you can use cv2.fillpoly to draw box in a blank image shaped as the original image.And then you can use cv2.findContous to find the coordinate of boundary。Fourteen points can be selected from a set of coordinates at equal-phase interval . Finally you will finish the convert.

Best.

billqxg commented 5 years ago

@Dive-frank Hi, That's quite a nice suggestion. I will try it soon. Thanks a lot.

Yuliang-Liu commented 5 years ago

@Dive-frank That's exactly what we did, thanks!

wawaa commented 1 year ago

Hi: I have one solution,maybe will help. For example: a box of text image of total text ,you can use cv2.fillpoly to draw box in a blank image shaped as the original image.And then you can use cv2.findContous to find the coordinate of boundary。Fourteen points can be selected from a set of coordinates at equal-phase interval . Finally you will finish the convert.

Best.

@Dive-frank Hi: Thanks for your reply. Do you have any idea abou how to get the 'equal-phase interval'? Thx!