Replies: 1 comment 3 replies
-
To enable dynamic input size, you need to format the As for the PS: Even if you enabled the dynamic input size, the shapes of batch images still need to be the same. Therefore, we need to pad the batch images to the same size, that's what the |
Beta Was this translation helpful? Give feedback.
-
The configuration in configs/base/datasets is as follows, because I want to dynamically input the size for training. However, after I commented on resize, I saw that the official document requires default parameters for img_size in the backbone configuration file, but it will be used during training. An error is reported:Trying to resize storge that is not resizable
dataset settings
dataset_type = 'ImageNet'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
# dict(type='Resize', size=224),
dict(type='Normalize', **img_norm_cfg),
dict(type='ImageToTensor', keys=['img']),
dict(type='ToTensor', keys=['gt_label']),
dict(type='Collect', keys=['img', 'gt_label'])
]
test_pipeline = [
dict(type='LoadImageFromFile'),
# dict(type='Resize', size=224),
dict(type='Normalize', **img_norm_cfg),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img'])
]
Beta Was this translation helpful? Give feedback.
All reactions