Skip to content

Timm models work with any size of input images? #1653

Discussion options

You must be logged in to vote

@bekhzod-olimov most purely convolutional nets accept any image size, this is normal, it can actually be beneficial to input images that are 20-40% larger than the train size at inference time (termed train-test discrepancy), especially if training used extensive augmentation. So yeah, I'd be hesitant to try and 'constrain' or force a fixed image size, many people also fine-tune to much higher resolution.

transformer and hybrid cnn-transformer often have fixed resolutions (and will error out on different sized inputs). The resolutions that can only be set (sometimes changed from original weights) at model creation time as they have position embeddeings, blocking that is based on a pre-det…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bekhzod-olimov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants