faustomorales / vit-keras

Keras implementation of ViT (Vision Transformer)
Apache License 2.0
329 stars 78 forks source link

Support of non-square size image #18

Closed kelvinkoh0308 closed 2 years ago

kelvinkoh0308 commented 3 years ago

Hi,

Currently, the vit-keras only support square size input ( 256x256), could you change it to support non-square size input image like 256 x 128?

Thank you very much.

faustomorales commented 3 years ago

Supporting non-square input sizes would be non-trivial because it changes how we load pre-trained weights and has ramifications for patch sizes. A PR with support on this would be welcome but I'm afraid I cannot devote time to this in the foreseeable future.

faustomorales commented 2 years ago

Closing since this is not a bug. A PR adding support for non-square images would be welcome.

faustomorales commented 2 years ago

Non-square functionality added by https://github.com/faustomorales/vit-keras/pull/26.