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

Is there a way of passing a group_id back into CVAT after automatic annotation? #3676

Open
MPiotr opened this issue Sep 15, 2021 · 6 comments
Labels
Easy to fix The issue is easy to fix and probably it will be release in a next minor release enhancement New feature or request

Comments

@MPiotr
Copy link

MPiotr commented Sep 15, 2021

Hi,
I am trying to run OpenPose as an automatic annotation tool. Here is an example of a JSON returned by model

[{'points': [359, 186], 'type': 'points', 'label': 'Nose', 'group_id': 0, 'confidence': '1'}, 
{'points': [345, 213], 'type': 'points', 'label': 'Neck', 'group_id': 0, 'confidence': '1'}, 
...
{'points': [300, 200], 'type': 'points', 'label': 'Neck', 'group_id': 1, 'confidence': '1'}, 
...] 

Current Behaviour

The points are created in cvat_ui, however the group_id affects nothing: all the points has the same group

Expected Behaviour

I would expect that point groups in ui are correspond to group_id filed in JSON.

Your Environment

  • Git hash commit: 31f6234
  • Docker 20.10.8
  • Are you using Docker Swarm or Kubernetes? No
  • Ubuntu 18.04
@bsekachev
Copy link
Member

Hi,

In the file cvat/apps/lambda_manager/views.py LamdaJob::_call_detector this code is responsible for preparing results:

results.append_shape({
                        "frame": frame,
                        "label_id": label_id,
                        "type": anno["type"],
                        "occluded": False,
                        "points": anno["points"],
                        "z_order": 0,
                        "group": None,
                        "attributes": [],
                        "source": "auto"
                    })

As you can see it sets group as None always. That is because current detectors does not support groups.
Maybe better option is "group": anno["group_id"] if "group_id" in anno else None

@bsekachev bsekachev added enhancement New feature or request Easy to fix The issue is easy to fix and probably it will be release in a next minor release labels Sep 23, 2021
@nmanovic
Copy link
Contributor

@MPiotr , if you can help and prepare a PR, it will be awesome

@zwfcrazy
Copy link
Contributor

Hi, just a reminder that this hasn't been fixed yet.
Though I can fix this in my own deployment, I strongly recommend you fix this asap as group_id is useful when we have multiple instances of person keypoints.

@nmanovic
Copy link
Contributor

@zwfcrazy , could you please send us a PR? We really like when community contributes into the project and help us to improve it.

@zwfcrazy
Copy link
Contributor

@nmanovic It seems that making the fix mentioned by @bsekachev is not enough, I am trying to figure out the cause.

@zwfcrazy
Copy link
Contributor

@nmanovic It seems that making the fix mentioned by @bsekachev is not enough, I am trying to figure out the cause.

Found the cause. When implementing an auto-annotation function, be aware group_id should start from 1 instead of 0. This is because group_id=0 is equivalent to no group.

zwfcrazy added a commit to zwfcrazy/cvat that referenced this issue Apr 20, 2022
this fix only works for detector type auto-annotator with anno type not equal to 'tag'.
nmanovic added a commit that referenced this issue Aug 22, 2022
fix auto-annotation group_id issue (#3676)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy to fix The issue is easy to fix and probably it will be release in a next minor release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants