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

Reproduce the segmentation result #24

Open
shiyutang opened this issue Dec 27, 2019 · 3 comments
Open

Reproduce the segmentation result #24

shiyutang opened this issue Dec 27, 2019 · 3 comments

Comments

@shiyutang
Copy link

I have tried to rerun the segmentation part of the code in python 2.7
and I was unable to reproduce the result in the paper.
I have noticed several differences.

  1. I have rewritten the label map part in the GTA dataset since GTA needs to map to Cityscape and the original code didn't do it.
  2. I was using torch 1.3.1
  3. I update the loss to NLLLoss rather than NLLLoss2d
  4. I fixed a few grammar bugs which probably happened because of the change of time in the code
    here is my result:

image

I would love to see if anyone was able to reproduce the segmentation result, and I would be really appreciated if you could give me that piece of code such that I could see where went wrong.

THANKS, A LOT!

@shiyutang
Copy link
Author

the training process with different learning rate setting is shown below:
image

@Lufei-github
Copy link

看你有跑通这篇代码,所以想请教你个问题!我是python2.7,pytorch1.0跑的segmentation的代码!

看到有报这个错误,RuntimeError: cuda runtime error (59) : device-side assert triggered at ...

网上说是计算损失的时候label不是从0开始的,pytorch必须是(0,n-1)的label才不会报错,然后这篇论文在设置label的时候,类别个数设置为20,有一个类别作者说是背景。但是我现在想,我的这个报错会不会与作者设置的20个label有关!
请问你在跑这篇代码的时候有遇到这个问题吗?

或者你知道这是哪里出错了吗?多有打扰,期待你的答复!!!

@happyzhouch
Copy link

看你有跑通这篇代码,所以想请教你个问题!我是python2.7,pytorch1.0跑的segmentation的代码!

看到有报这个错误,RuntimeError: cuda runtime error (59) : device-side assert triggered at ...

网上说是计算损失的时候label不是从0开始的,pytorch必须是(0,n-1)的label才不会报错,然后这篇论文在设置label的时候,类别个数设置为20,有一个类别作者说是背景。但是我现在想,我的这个报错会不会与作者设置的20个label有关!
请问你在跑这篇代码的时候有遇到这个问题吗?

或者你知道这是哪里出错了吗?多有打扰,期待你的答复!!!

你好,我对作者关于这两个数据"synthia", "city16"设置的16个类别这里有疑问, 0-15是15个实际的类别,255是背景,那在代码里args.n_class就等于16, 那么这句话: weight[args.n_class - 1] = 0 # Ignore background loss, 其实是将标签为15 的类别的weight设为0了,而不是将背景weight设为0的啊?

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

No branches or pull requests

3 participants