liuan0803 / RADM

34 stars 0 forks source link

How to link texts and annotations? #3

Open shunk031 opened 8 months ago

shunk031 commented 8 months ago

Hi, thank you for publishing the awesome dataset!

I have a question about the link between texts and annotation. We can find texts/train.txt and texts/test.txt in the dataset. Is there a way to link this texts data to the annotation data?

The following is the data at the beginning of texts/train.txt.

{'isSample': '0', 'image': 'ali_anno_1/0.png', 'rotate': 0, 'data': [{'userSelectedValue': {'name': '新款尝鲜价'}, 'categoryDesc': '新款尝鲜价', 'points': [{'x': 101, 'y': 674}, {'x': 414, 'y': 674}, {'x': 414, 'y': 737}, {'x': 101, 'y': 737}]}], 'pin': 'jd_50e595b192af9'}
{'isSample': '0', 'image': 'ali_anno_1/22.png', 'rotate': 0, 'data': [{'userSelectedValue': {'name': '手工純銅鍋'}, 'categoryDesc': '手工純銅鍋', 'points': [{'x': 79, 'y': 600}, {'x': 443, 'y': 600}, {'x': 443, 'y': 666}, {'x': 79, 'y': 666}]}, {'userSelectedValue': {'name': '立即加購'}, 'categoryDesc': '立即加購', 'points': [{'x': 202, 'y': 692}, {'x': 311, 'y': 692}, {'x': 311, 'y': 718}, {'x': 202, 'y': 718}]}], 'pin': 'jd_50e595b192af9'}

...

I think it would be possible to link the image as a key. However, there is no image with such a filename in the annotation.

fx-hit commented 8 months ago

I have the same problem, the text annotation and the image name cannot correspond.

liuan0803 commented 8 months ago

Sorry, I only replied to this question recently due to some urgent work matters. The mapping relationship between text and image tags is as follows, for example: The "image" field in the first piece of data in texts/train.txt is ali_anno_1/0.png, and the number 0 is the ID index of the list value corresponding to the "images" field in annotations/train.json, such as the "images" field The image name corresponding to "filename" of the first index value in the corresponding list is "O1CN01HnK3zH1HoH7oxbsE5!!3409010804-0-alimamazszw_mask002.jpg".