mmpose icon indicating copy to clipboard operation
mmpose copied to clipboard

Update labelstudio2coco.py , 1. image_name changed 2. can't get category_id

Open gs80140 opened this issue 1 year ago • 4 comments

…ory_id

拿图片名的时候 , 数据结构变成这样了 "data": { "img": "images/20231116154137_1-1.jpg" }

另外导入 如下配置的时候

初始化只 取了关键点 labels = root.findall('.//KeyPointLabels/Label')

但是 category_name 是取所有的, for key in [ 'rectanglelabels', 'polygonlabels', 'labels', 'keypointlabels' ]: if key == label['type'] and len(label['value'][key]) > 0: category_name = label['value'][key][0] break 所以导致如下语句报错, 如下语句应该移到关键点的处理逻辑 category_id = self.category_name_to_id[category_name]

I have read the CLA Document and I sign the CLA

Motivation

Modification

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • [ ] I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • [ ] Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • [ ] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • [ ] New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • [ ] The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • [ ] CLA has been signed and all committers have signed the CLA in this PR.

gs80140 avatar Jan 18 '24 09:01 gs80140

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jan 18 '24 09:01 CLAassistant

hi @gs80140 , thank you for your contribution! The lint failed, I suggest follwoing this doc to use pre-commit to fix it.

Tau-J avatar Jan 18 '24 10:01 Tau-J

I have read the CLA Document and I sign the CLA

gs80140 avatar Apr 02 '24 08:04 gs80140

I have read the CLA Document and I sign the CLA

gs80140 avatar Apr 02 '24 08:04 gs80140