facebookresearch / mae

PyTorch implementation of MAE https//arxiv.org/abs/2111.06377
Other
6.93k stars 1.17k forks source link

AssertionError: Input image height (736) doesn't match model (224). #160

Open QY1994-0919 opened 1 year ago

QY1994-0919 commented 1 year ago

Hi, We use the "mae_pretrain_vit_base.pth" weight file for training, and the error appears.

_assert(H == self.img_size[0], f"Input image height ({H}) doesn't match model ({self.img_size[0]}).") File "/root/anaconda3/envs/torch19/lib/python3.8/site-packages/torch/init.py", line 662, in _assert assert condition, message AssertionError: Input image height (736) doesn't match model (224).

johnWang2022 commented 1 year ago

I think you should set the height as 224 by cv2.resize() function in order to make height same as width for input image.