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

question about making SDMG-R label #66

Closed haoran1062 closed 3 years ago

haoran1062 commented 3 years ago

Hello, first of all, thanks to your team, mmocr is so amazing! Now I want to train SDMG-R model use my own data, but I don't know how to label one kind of case which "key : value" in one bbox. I found that in your dataset, one bbox only contain one type of label, so how to label that case?

jeffreykuang commented 3 years ago

what do you mean? you mean one box might contain multiple categories? Currently, our method does not support multiple categories for one text box. I suggest to preprocess or post process to split you text boxes.

haoran1062 commented 3 years ago

what do you mean? you mean one box might contain multiple categories? Currently, our method does not support multiple categories for one text box. I suggest to preprocess or post process to split you text boxes.

yeah, for example bbox is [0, 0, 100, 100, "total value: $10", label: (23, 24) ], that contain 23 Total_value and 24 Total_key, so as you said, I need convert that bbox to two bboxes: [0, 0, 70, 100, "total value: ", label: 24] and [70, 0, 100, 100, "$10", label: 23]? Do I have better solution?

jeffreykuang commented 3 years ago

what do you mean? you mean one box might contain multiple categories? Currently, our method does not support multiple categories for one text box. I suggest to preprocess or post process to split you text boxes.

yeah, for example bbox is [0, 0, 100, 100, "total value: $10", label: (23, 24) ], that contain 23 Total_value and 24 Total_key, so as you said, I need convert that bbox to two bboxes: [0, 0, 70, 100, "total value: ", label: 24] and [70, 0, 100, 100, "$10", label: 23]? Do I have better solution?

At present, there is no perfect solution. Welcome to remind me and contribute this repo if you find any elegant solution.

haoran1062 commented 3 years ago

what do you mean? you mean one box might contain multiple categories? Currently, our method does not support multiple categories for one text box. I suggest to preprocess or post process to split you text boxes.

yeah, for example bbox is [0, 0, 100, 100, "total value: $10", label: (23, 24) ], that contain 23 Total_value and 24 Total_key, so as you said, I need convert that bbox to two bboxes: [0, 0, 70, 100, "total value: ", label: 24] and [70, 0, 100, 100, "$10", label: 23]? Do I have better solution?

At present, there is no perfect solution. Welcome to remind me and contribute this repo if you find any elegant solution.

Ok, thanks.

cuhk-hbsun commented 3 years ago

fix