stefanopini / simple-HRNet

Multi-person Human Pose Estimation with HRNet in Pytorch
GNU General Public License v3.0
573 stars 106 forks source link

How can I get the output the same of the input size? #63

Closed Lilu1223 closed 4 years ago

Lilu1223 commented 4 years ago

When I set the input [1.3.384,480],I got the output of[96,120],How can I get the output of [384,480]?

stefanopini commented 4 years ago

Hi! The network has an initial stem net block consisting of two convolutions with stride 2. There aren't other strided convolutions or pooling layers afterwards. Thus, the resolution of the final prediction is 1/4 of the input resolution.

Similarly to what is done with the predicted keypoints, you can simply resize the output heatmaps to match the original input size.

As an alternative, if you are not interested in the pretrained weights, you could change the stride of the stem block to 1, but then the network will require much more memory.