-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Actions before raising this issue
- I searched the existing issues and did not find anything similar.
- I read/searched the docs
Steps to Reproduce
- Create a task with 1 skeleton label (with 1 point) and a GT job
- Create 1 annotation that you'd expect to match in the GT job and a regular job
- Run quality check, find that the skeletons were not matched
The reason is that the skeleton boxes are checked for intersection first. Only if there's an intersection, the points are compared between each other. This works in "normal" cases, where there are 5+ visible skeleton points and they cover some area, but in some corner cases this check produces incorrect results.
Related cases:
- a pair of skeletons / points that are quasi-parallel lines without bbox intersection
- a pair of skeletons / points, with one or two of them having just 1 visible point
Code references:
cvat/cvat/apps/quality_control/quality_reports.py
Lines 1078 to 1081 in 650f2b2
| a_bbox = self.instance_map[id(a)][1] | |
| b_bbox = self.instance_map[id(b)][1] | |
| if datumaro.util.annotation_util.bbox_iou(a_bbox, b_bbox) <= 0: | |
| return 0 |
Known workarounds:
Append a grouped bounding box to each skeleton. These boxes can be used by the existing implementation. It solves the problem, but it's not always convenient to do and increases the amount of annotation work. In some annotation scenarios there is no simple way to add more annotation types in the specification.
Expected Behavior
The skeleton and points should match when they're close to each other.
Possible Solution
It's possible to disable this check, but doing so can reduce performance of the algorithm significantly and can result in some false-positive matches because of the OKS scaling to the common bbox.
Context
No response