ResNet34 Keypoints Detection

Hi there,

I am trying to use the reg_head for a resnet34 Model applied as included down here, where pictures of 384 by 288 pixels were used, but I do not understand where the values (64 * 12 * 9) and (6144) come from.

In this example, the keypoints number was 12, how to reflect this on my model if I am going to detect only two keypoints resizing my images to 224*224 pixels?

Link to the ex.: https://towardsdatascience.com/hand-keypoints-detection-ec2dca27973e

head_reg = nn.Sequential(
nn.Conv2d(512,64,kernel_size=(1,1)),
nn.BatchNorm2d(64),
nn.ReLU(),
Flatten(),
nn.Linear(64 * 12 * 9, 6144),
nn.ReLU(),
nn.Linear(6144, 24),
Reshape(-1,12,2),
nn.Tanh())
learn = create_cnn(data, arch, metrics=[my_acc,my_accHD], loss_func=F.l1_loss, custom_head=head_reg)