NVlabs/FasterViT

How to extract features from images of different sizes

huangzhufan opened this issue · 3 comments

Hello, I would like to ask how to extract the features of 3203203 and 1281283 images in the same network model at the same time.Instead of having to create two fastervit network models

Hi, please see #55 for detailed response on how to extract various feature maps.

I'm sorry, I may not have made myself clear.What I mean is that I now have two images with sizes (1,3,320,320) and (1,3,128,128), which means that I need to create two any_res network models to extract the features of these two images respectively.
Model1 = create_model('faster_vit_0_any_res',
resolution=[320, 320],
window_size=[7, 7, 12, 6],
ct_size=2,
dim=64,
pretrained=True)
Model2 = create_model('faster_vit_0_any_res',
resolution=[128, 128],
window_size=[7, 7, 12, 6],
ct_size=2,
dim=64,
pretrained=True)
Is there any way to extract the feature maps of these two images of different sizes just by creating only one faster_vit_0_any_res feature extraction network?

Hi, please see #55 for detailed response on how to extract various feature maps.

I'm sorry, I may not have made myself clear.What I mean is that I now have two images with sizes (1,3,320,320) and (1,3,128,128), which means that I need to create two any_res network models to extract the features of these two images respectively.

Model1 = create_model('faster_vit_0_any_res',
resolution=[320, 320],
window_size=[7, 7, 12, 6],
ct_size=2,
dim=64,
pretrained=True)

Model2 = create_model('faster_vit_0_any_res',
resolution=[128, 128],
window_size=[7, 7, 12, 6],
ct_size=2,
dim=64,
pretrained=True)
Is there any way to extract the feature maps of these two images of different sizes just by creating only one faster_vit_0_any_res feature extraction network?