Hi !
I’m trying to create a model for hand keypoints detection, using this 15 dataset.
In the first place, I just wanted to test the pipeline so here’s what I’m doing:
import torch 
import torchvision 


# create model 
predictor = torchvision.models.detection.keypointrcnn_resnet50_fpn(pretrained = True,
                    num_classes = 0, num_keypoints = 21, pretrained_backbone = True)

# create image placeholder
im = torch.rand(3,64,64, dtype = torch.float32)

# create keypoints placeholder
kp = torch.rand(1,21,3, dtype = torch.float32)
kp[:,:,-1] = 1.

# Making dict
# I just want to focus on keypoints detection, so I'm setting the box to be the full image size and to belong to the single class. 
targets = {'boxes':  torch.tensor([[0,0,64,64]], dtype = torch.float32),
            'labels': torch.zeros(1,1, dtype = torch.int64),
            'keypoints': kp}


model([im], [targets])


I get the following error:
IndexError: index 3037 is out of bounds for dimension 0 with size 2001
Could someone explain ?
Thanks a lot !