Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new attribute - "tag_category" #3

Open
lpogo opened this issue Nov 28, 2022 · 2 comments
Open

Add new attribute - "tag_category" #3

lpogo opened this issue Nov 28, 2022 · 2 comments

Comments

@lpogo
Copy link

lpogo commented Nov 28, 2022

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!

@Erotemic
Copy link
Member

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.

@lpogo
Copy link
Author

lpogo commented Nov 29, 2022

@Erotemic this looks like good enough workaround for this moment. Thanks for suggestion.
Anyway, looking forward for future implementation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants