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

关于训练和评估时候的图像尺寸问题 #3867

Open
1 task done
David-dotcom666 opened this issue Dec 19, 2024 · 1 comment
Open
1 task done

关于训练和评估时候的图像尺寸问题 #3867

David-dotcom666 opened this issue Dec 19, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@David-dotcom666
Copy link

问题确认 Search before asking

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

请提出你的问题 Please ask your question

1.我在train_dataset的transforms使用了

  • type: Resize
    target_size: [ 512, 512 ]
    那么我在val_dataset也需要
  • type: Resize
    target_size: [ 512, 512 ]
    这样才能保持训练和评估尺寸的一致性吗?
    2.如果我在rain_dataset的transforms使用了
    • type: ResizeStepScaling
      min_scale_factor: 0.5
      max_scale_factor: 0.5
      scale_step_size: 0
      那么这个时候我在val_dataset中的transforms要怎么设置呢?我试了也设置成这样,在评估的时候会报标注和pred尺寸不一致。如果在val_dataset不设置尺寸倒是可以,但是这时候评估的是原图尺寸上的评估吧?我想在评估也进行自动一半尺寸的。这时候网络的输入尺寸是多少呢?是原图吗?导出模型尺寸设置多少合适?

我目前的需求是可以训练不同尺寸的图,且可以选择训练精度。例如0.5,我就使用ResizeStepScaling到固定的0.5,然后我在导出后的模型预处理的时候先把图像进行ResizeStepScaling,然后padding到导出的尺寸。

@David-dotcom666 David-dotcom666 added the question Further information is requested label Dec 19, 2024
@Bobholamovic
Copy link
Member

你好,训练和评估的尺寸并不一定要一模一样;通常在训练时可以进行随机resize,但评估阶段需要resize到一个固定的尺寸。如果不进行设置,通常评估时将使用原图尺寸。具体的训练、验证输入尺寸选择取决于您使用的模型和数据集,并没有一个标准答案。通常,分割模型在模型输入尺寸上具备一定的泛化性能。

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

3 participants