yolov7_d2
yolov7_d2 copied to clipboard
Keypoints dim mismatch
I'm trying to train a key points detection model using COCO format as follows
...,
annotations: [
{
...,
"keypoints": [x1,y1,v1,...,x4,y4,v4],
"num_keypoints": 4,
...
}
],
...
with cfg.MODEL.ROI_KEYPOINT_HEAD.NUM_KEYPOINTS=4
But I got the this error
Original Traceback (most recent call last):
File "/data/.virtualenvs/yolo7/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/data/.virtualenvs/yolo7/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 28, in fetch
data.append(next(self.dataset_iter))
File "/data/detectron2/detectron2/data/common.py", line 201, in __iter__
yield self.dataset[idx]
File "/data/detectron2/detectron2/data/common.py", line 90, in __getitem__
data = self._map_func(self._dataset[cur_idx])
File "/data/detectron2/detectron2/utils/serialize.py", line 26, in __call__
return self._obj(*args, **kwargs)
File "/data/yolov7/yolov7/data/dataset_mapper.py", line 619, in __call__
annos, image_shape, mask_format=self.instance_mask_format
File "/data/detectron2/detectron2/data/detection_utils.py", line 439, in annotations_to_instances
target.gt_keypoints = Keypoints(kpts)
File "/data/detectron2/detectron2/structures/keypoints.py", line 30, in __init__
assert keypoints.dim() == 3 and keypoints.shape[2] == 3, keypoints.shape
AssertionError: torch.Size([8, 12])
HiοΌkeypoints model didn't fully opensourced yet. We are still improving the performance, once it done, it will opensource.