-
Notifications
You must be signed in to change notification settings - Fork 127
Description
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:
- At ,
Line 88 in 54731b9
result = engine.infer(data['img'], data['img_metas'])[0]
I have
data['img'].shape
torch.Size([1, 3, 1120, 1120])
- At
vedadet/vedadet/engines/infer_engine.py
Line 57 in 54731b9
dets = self._get_raw_dets(img, img_metas)
I have
img.shape
torch.Size([3, 1120, 1120])
- At
vedadet/vedadet/models/backbones/resnet.py
Line 624 in 54731b9
x = self.norm1(x)
I have
x.shape
torch.Size([64, 560, 560])
- At https://github.com/pytorch/pytorch/blob/5913437a40a6e45ab7e164afb7c6ec930dd40b2f/torch/nn/modules/normalization.py#L273
It triggered the error as I have
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.