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

Some question about the eval result on val split #48

Open
zhaokegg opened this issue Jun 11, 2019 · 2 comments
Open

Some question about the eval result on val split #48

zhaokegg opened this issue Jun 11, 2019 · 2 comments

Comments

@zhaokegg
Copy link

Thanks for your good paper.
I keep an eye on your OCNet from v1 to v3. I think the oc module as a practicable plug-in for many sota frameworks.
However, when I reproduced your result reported in your paper, I met something confusing:

  1. The eval results on val split keep same from paper v1 to v3 with different setting: 'single crop' and 'single scale'. I think it is quite different.

  2. Considering the issue (Performance Discussion~ #22 (comment))
    the result on val split is 78.73 which is much lower than your result reported in your paper. As well as the result on test split is 78.66 which is higher than your result reported in paper. It is uninterpretable.

Could you share more setting details to reproduce the val score 79.58?

@PkuRainBow
Copy link
Collaborator

PkuRainBow commented Jun 11, 2019

Thanks for your interest in our work. We have reimplemented all of our approaches with a new code base openseg.pytorch.
Please check the updated usage as below (I have updated the code in #L66 of resnet101_asp_oc.py),

 # extra added layers
        self.context = nn.Sequential(
                nn.Conv2d(2048, 512, kernel_size=3, stride=1, padding=1),
                InPlaceABNSync(512),
                ASP_OC_Module(512, 512)
                )
        self.cls = nn.Conv2d(512, num_classes, kernel_size=1, stride=1, padding=0, bias=True)
        self.dsn = nn.Sequential(
            nn.Conv2d(1024, 512, kernel_size=3, stride=1, padding=1),
            InPlaceABNSync(512),
            nn.Dropout2d(0.10),
            nn.Conv2d(512, num_classes, kernel_size=1, stride=1, padding=0, bias=True)
            )

Besides, we could even achieve 80+% on val set of Cityscapes with the ASP-OC, (e.g., on of my friends tune the inner channels of the ASP-OC as below),

class ASP_OC_Module(nn.Module):
    def __init__(self, features, out_features=256, dilations=(12, 24, 36)):
        super(ASP_OC_Module, self).__init__()
        self.context = nn.Sequential(nn.Conv2d(features, out_features, kernel_size=3, padding=1, dilation=1, bias=True),
                                   InPlaceABNSync(out_features),
                                   BaseOC_Context_Module(in_channels=out_features, out_channels=out_features, key_channels=out_features//2, value_channels=out_features, 
                                    dropout=0, sizes=([2])))
        self.conv2 = nn.Sequential(nn.Conv2d(features, out_features, kernel_size=1, padding=0, dilation=1, bias=False),
                                   InPlaceABNSync(out_features))
        self.conv3 = nn.Sequential(nn.Conv2d(features, out_features, kernel_size=3, padding=dilations[0], dilation=dilations[0], bias=False),
                                   InPlaceABNSync(out_features))
        self.conv4 = nn.Sequential(nn.Conv2d(features, out_features, kernel_size=3, padding=dilations[1], dilation=dilations[1], bias=False),
                                   InPlaceABNSync(out_features))
        self.conv5 = nn.Sequential(nn.Conv2d(features, out_features, kernel_size=3, padding=dilations[2], dilation=dilations[2], bias=False),
                                   InPlaceABNSync(out_features))

        self.conv_bn_dropout = nn.Sequential(
            nn.Conv2d(out_features * 5, out_features*2, kernel_size=1, padding=0, dilation=1, bias=False),
            InPlaceABNSync(out_features*2),
            nn.Dropout2d(0.1)
            )

@swjtulinxi
Copy link

你好作者请问你实现了这个吗,我实现了ccnet danet ocnet annn这几个基于non-local原理的模型,发现结果反而更差,我不知道为什么,请问是否和torch的版本有关,或者是训练的图片长宽必须是偶数还是奇数有关系啊??

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