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

图片标注coco格式数据的导入问题 #119

Open
sxk000 opened this issue Aug 21, 2024 · 2 comments
Open

图片标注coco格式数据的导入问题 #119

sxk000 opened this issue Aug 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@sxk000
Copy link

sxk000 commented Aug 21, 2024

你好!

首先感谢人工智能实验对技术、代码、项目的开源分享!

1,该标注平台支持coco格式数据的导出,不支持coco格式数据的导入吗?后面会支持coco格式数据的导入吗?

2,图片标注导入的数据格式样例:https://opendatalab.github.io/labelU/#/schema/pre-annotation/image ,但是导出的数据格式好像没有这样的数据格式,就是从平台上导出的数据文件不能再次导入平台了,自己转个身不认识自己了。

谢谢!

@sxk000 sxk000 changed the title coco格式数据的导入问题 图片标注coco格式数据的导入问题 Aug 21, 2024
@gary-Shen
Copy link
Collaborator

  1. 目前是不支持导入 coco 格式的,可以自行写脚本转换;后期会支持;
  2. 导入的预标注是 jsonl 的格式,里面的数据格式设计的初衷并不是为了导入回到 LabelU,所以这个需求并没有考虑,目前的办法也是先自行写脚本实现(后期也可能会支持)。

@gary-Shen gary-Shen added the enhancement New feature or request label Aug 21, 2024
@sxk000
Copy link
Author

sxk000 commented Aug 21, 2024

  1. 目前是不支持导入 coco 格式的,可以自行写脚本转换;后期会支持;
  2. 导入的预标注是 jsonl 的格式,里面的数据格式设计的初衷并不是为了导入回到 LabelU,所以这个需求并没有考虑,目前的办法也是先自行写脚本实现(后期也可能会支持)。

好的,谢谢!

关于目前的数据导入格式,发现还有个不简洁的地方,如下图annotations字典下面每个key就是每个tool名称,而里面又再加个toolName字段描述一下,感觉有点累赘:
image

"annotations": {
    "pointTool": {
      "toolName": "pointTool",
      "result": [
        {
          "order": 1,
          "id": "a480ea1b-1a49-4449-a426-0388a34ea87b",
          "label": "label-1",
          "x": 1250.4922118380061,
          "y": 1301.6993769470405
        },
        {
          "order": 2,
          "id": "f357484c-f911-47fc-af52-fe79b6ba4ec6",
          "label": "label-1",
          "x": 969.7694704049844,
          "y": 1805.7242990654206
        },
        {
          "order": 3,
          "id": "485f2bfe-5e89-42aa-ae80-27cfdcb8763f",
          "label": "label-1",
          "x": 2335.1028037383176,
          "y": 1512.2414330218069
        },
        {
          "order": 4,
          "id": "7e3cfb5b-d3f7-48d1-bb4d-788977480bf1",
          "label": "label-1",
          "x": 2073.520249221184,
          "y": 1780.2040498442368
        },
        {
          "order": 5,
          "id": "cad49f6a-7ef0-4e75-b6b1-7c6796a2d502",
          "label": "label-1",
          "x": 2794.467289719626,
          "y": 1837.6246105919004
        }
      ]
    },
    "textTool": {
      "toolName": "textTool",
      "result": [
        {
          "id": "js6htkz785h",
          "type": "text",
          "value": {
            "text-label-1": "acasdqwe"
          }
        }
      ]
    },
    "tagTool": {
      "toolName": "tagTool",
      "result": [
        {
          "id": "qw8nbms13h",
          "type": "tag",
          "value": {
            "tag-label-1": [
              "tag-label-1-1"
            ]
          }
        }
      ]
    }
  }

感觉可以再精简一点,如下:

"annotations": {
    "pointTool":  [
        {
          "order": 1,
          "id": "a480ea1b-1a49-4449-a426-0388a34ea87b",
          "label": "label-1",
          "x": 1250.4922118380061,
          "y": 1301.6993769470405
        },
        {
          "order": 2,
          "id": "f357484c-f911-47fc-af52-fe79b6ba4ec6",
          "label": "label-1",
          "x": 969.7694704049844,
          "y": 1805.7242990654206
        },
        {
          "order": 3,
          "id": "485f2bfe-5e89-42aa-ae80-27cfdcb8763f",
          "label": "label-1",
          "x": 2335.1028037383176,
          "y": 1512.2414330218069
        },
        {
          "order": 4,
          "id": "7e3cfb5b-d3f7-48d1-bb4d-788977480bf1",
          "label": "label-1",
          "x": 2073.520249221184,
          "y": 1780.2040498442368
        },
        {
          "order": 5,
          "id": "cad49f6a-7ef0-4e75-b6b1-7c6796a2d502",
          "label": "label-1",
          "x": 2794.467289719626,
          "y": 1837.6246105919004
        }
      ],
    "textTool":  [
        {
          "id": "js6htkz785h",
          "type": "text",
          "value": {
            "text-label-1": "acasdqwe"
          }
        }
      ],
    "tagTool": [
        {
          "id": "qw8nbms13h",
          "type": "tag",
          "value": {
            "tag-label-1": [
              "tag-label-1-1"
            ]
          }
      ]
    }
  }

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

No branches or pull requests

2 participants