kwcoco
kwcoco copied to clipboard
Add new attribute - "tag_category"
Hi,
can I ask you to add one more attribute to coco definition called tag_category
?
I have tagged my images to be able to filter dataset more precise.
I would be able to add tag_categories
like below:
"tag_categories": [
{
"id": 0,
"name": "tag1"
},
{
"id": 1,
"name": "tag2"
}
]
and then add tag to image:
{
"file_name": "0B7414E1.png",
"height": 3024,
"width": 4032,
"id": 1,
"tag_ids": [
0
]
}
Thanks in advanve!
I would suggest simply adding a field to images called "tags" which is a list of strings.
{
"file_name": "0B7414E1.png",
"height": 3024,
"width": 4032,
"id": 1,
"tags": ["tag1", "tag2"]
}
This does have a drawback in that the json file will not scale as well as your proposed method, but the json dictionary storage doesn't scale to extremely large datasets to begin with.
Setting up the logic for an additional table using the dictionary based interface is not trivial. This may be a consideration for future work, but it is not something I can quickly pull together.
@Erotemic this looks like good enough workaround for this moment. Thanks for suggestion. Anyway, looking forward for future implementation :)