Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练pp-liteseg模型 如何将RandomPaddingCrop取消,不进行随机裁剪 #3778

Closed
1 task done
alanxinn opened this issue Aug 15, 2024 · 4 comments
Closed
1 task done
Assignees
Labels
question Further information is requested

Comments

@alanxinn
Copy link

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

train_dataset:
transforms:
- type: ResizeStepScaling
min_scale_factor: 0.125
max_scale_factor: 1.5
scale_step_size: 0.125
- type: RandomPaddingCrop #从原始图像和标注图像中随机裁剪1024x512大小
crop_size: [1024, 512]
- type: RandomHorizontalFlip
- type: RandomDistort
brightness_range: 0.5
contrast_range: 0.5
saturation_range: 0.5
- type: Normalize

上述为默认config

若将crop_size: [1024, 512]设置为训练图像的真实尺寸,是否就不会进行裁剪了? 或者直接将RandomPaddingCrop这个type注释掉即可

@alanxinn alanxinn added the question Further information is requested label Aug 15, 2024
@changdazhou
Copy link
Collaborator

注释掉即可,但是并不绝对能跑通哈,需要实验一下,部分模型可能不支持任意分辨率图片输入

@alanxinn
Copy link
Author

alanxinn commented Aug 15, 2024

注释掉即可,但是并不绝对能跑通哈,需要实验一下,部分模型可能不支持任意分辨率图片输入

好的,我试一下,还有请教一下,将训练好的模型转为onnx 1x3x512x512 推理效果很好,但是转为1x3x256x256效果很差,如果我想训练的图resize到256x256,是否效果会变好呢?

@changdazhou
Copy link
Collaborator

会的,保证训练图尺寸和推理尺寸一致很重要的哈

@alanxinn
Copy link
Author

会的,保证训练图尺寸和推理尺寸一致很重要的哈

好的,感谢您的耐心解答

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants