eragonruan / text-detection-ctpn

text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network
MIT License
3.43k stars 1.33k forks source link

How can I get my own training data #76

Open LXYTSOS opened 6 years ago

LXYTSOS commented 6 years ago

I want to prepare my own training data, after reading split_label.py, I don't know how to get the txt files in the label path ready, could you tell how to prepare those txt files?

walsvid commented 6 years ago

Those txt files are format like: x1,y1,x2,y2,x3,y3,x4,y4,language,content e.g. 230,182,310,180,310,205,230,205,Latin,Chicken. Please check this website and then register a account, download the dataset icdar2017, multi lingual scene dataset.

If you would like to use your own data, you can convert your own data format to the ground truth txt file which mentioned before, and then you can use split_label.py and ToVoc.py transform it to VOC format.

LXYTSOS commented 6 years ago

(x1,y1)--upper left,(x2,y2)--upper right,(x3,y3)--lower left,(x4,y4)--lower right. Am I right?

walsvid commented 6 years ago

I'm afraid not, the order of the coordinates is clockwise, (x3,y3)--lower right,(x4,y4)--lower left. You can check the value of the example230,182,310,180,310,205,230,205,Latin,Chicken.

eragonruan commented 6 years ago

@LXYTSOS walsvid is right, the order is clockwise.

forever1love0612 commented 6 years ago

Do I need to do some preprocessing to my images in the image path before I run split_label.py? @eragonruan