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

It's different with the standard SegNet #24

Open
deeptoby opened this issue Nov 21, 2018 · 9 comments
Open

It's different with the standard SegNet #24

deeptoby opened this issue Nov 21, 2018 · 9 comments

Comments

@deeptoby
Copy link
Contributor

I think the most contribution in segnet is the idx-maxpooling. you can use the F.max_unpool2d(idx, x) to replace the nn.upsample().
The original upsample can't fit the loss of location information.

@bodokaiser
Copy link
Owner

bodokaiser commented Nov 21, 2018 via email

@deeptoby
Copy link
Contributor Author

yes, i'd like to do that. i have rewrited segnet.i will send it by my pull.

@Viarow
Copy link

Viarow commented Feb 4, 2019

    self.dec1 = features[0: 4]    #[0,3]
    self.dec2 = features[5: 9]    #[5,8]
    self.dec3 = features[10: 16]  #[10,15]
    self.dec4 = features[17: 23]  #[17,22]
    self.dec5 = features[24: -1]  #[24,29]

while there's also a maxpool2d layer after each decoder block in the forward function, I wonder why the pooling operation is implemented twice before unpooling? I haven't run the code just quite confused.

@bodokaiser
Copy link
Owner

@Viarow I guess this is a mistake then. Would you mind trying the correct version?

@Viarow
Copy link

Viarow commented Feb 4, 2019

I'm actually a novice at deep learning, still trying to understand the codes. I guess it will work right only if the range of pretrained layers are set correct (as shown in the annotations above). I will tell you the results after I try the corrections.

@deeptoby
Copy link
Contributor Author

deeptoby commented Feb 4, 2019

Hi,there just one pooling at each dec. could you tell me the your found on detail.

@bodokaiser
Copy link
Owner

bodokaiser commented Feb 4, 2019 via email

@deeptoby
Copy link
Contributor Author

deeptoby commented Feb 4, 2019

layer4 is maxpool, it is used later in code in order to get max-index.

@Viarow
Copy link

Viarow commented Feb 4, 2019

Oh I see the point. in the FCN8 model,
self.feats = nn.Sequential(*feats[0:9])
self.feat3 = nn.Sequential(*feats[10:16])
self.feat4 = nn.Sequential(*feats[17:23])
self.feat5 = nn.Sequential(*feats[24:30])
are called later in
feats = self.feats(x)
feat3 = self.feat3(feats)
feat4 = self.feat4(feat3)
feat5 = self.feat5(feat4)
fconn = self.fconn(feat5)
which means that some maxpooling layers are also left out in this model?

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