Skip to content

Inference error using pretrained TinaFace model on my png file #98

Open
@junwei-h

Description

@junwei-h

Hello,
On Windows WSL, compiled and installed vedadet successfully. When using my own image 128x128 png file to test TinaFace, I got the following error:

Expected number of channels in input to be divisible by num_groups, but got input of shape [64, 560, 560] and num_groups=32

Python 3.8
torch                     1.13.1

No GPU, I ran

python infer.py configs/infer/tinaface/tinaface_r50_fpn_gn_dcn.py test.png

The pre-trained model is tinaface_r50_fpn_gn_dcn.pth and the test.png has 128 x 128 px.

Here is how far I traced the error & the image dimension:

data['img'].shape 
torch.Size([1, 3, 1120, 1120])
img.shape 
torch.Size([3, 1120, 1120])
x.shape
torch.Size([64, 560, 560])
input.shape 
torch.Size([64, 560, 560])

Do I need to change 'num_groups=32' in tinaface_r50_fpn_gn_dcn.py?

Any suggestions? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions