GithubHelp home page GithubHelp logo

Comments (17)

meetps avatar meetps commented on May 29, 2024 2

@peteflorence - Yes, you are right. All datasets are at the moment not compatible with all the models due to differences in input sizes.

My first task is to make all models working on Pascal VOC (512*512) and then add dataset specific cropping or padding arguments.

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024 2

Thanks @ibadami and @meetshah1995

It's training now... think we have it working... will PR and share evaluation

@travelbureau thx for help too!

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024 1

OK, thanks for letting me know. Respectfully I think this issue should remain open though, because it is unknown whether or not the implementation is working.

from pytorch-semseg.

ibadami avatar ibadami commented on May 29, 2024 1

@peteflorence So I just checked, It seems that the initial pspnet was copied from linknet while @meetshah1995 was working on the repo. I have changed the pspnet into fully functional linknet code.
It is not really pspnet yet as there are few more changes required. But what I can assure you is that current pspnet is the corrected linknet. Moreover there you can also find multiple resnet support which I added for pspnet. So I would suggest you to use pspnet from resnet_encoder branch. Let me know if that code is throwing you any error. I will fix it as soon as possible. I know it is bit confusing. But it is work in progress.
Cheers!

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024 1

Hmm... maybe just need to crop/pad 360 since not divisible by 16?

from pytorch-semseg.

ibadami avatar ibadami commented on May 29, 2024 1

@peteflorence @meetshah1995 , I just updated the linknet with pretrained resnet option.
Could you guys check it out?

from pytorch-semseg.

meetps avatar meetps commented on May 29, 2024

I haven't verified the linknet module myself. The changes you see were made by @ibadami. I don't plan to verify them in the coming weeks. The fix takes minimal effort, please feel free to send in a PR !

from pytorch-semseg.

ibadami avatar ibadami commented on May 29, 2024

@peteflorence remove the 'nn.' in front of it. Cuda bad params can occur if your input dimensions are not as expected. Most often this occurs at the last layer where the target shape and last conv layer has mismatched shape. Kindly print the shape of the tensor after every operation. You will be able to see the what the problem is.

from pytorch-semseg.

ibadami avatar ibadami commented on May 29, 2024

@peteflorence In linknet from lines 35 to 38 names of decoders are incorrect. Change them from self.decoder4 4 times to decoder4, decoder3 decoder2, decoder1. Something I could spot right away.
I will check what else is required to be corrected. Stay tuned!

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024

Sure @ibadami. Have you tested the implementation? I'd be happy to help make some changes / PR, just want to get a sense of how well it's been tested.

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024

OK @ibadami, thanks! :)

from pytorch-semseg.

ibadami avatar ibadami commented on May 29, 2024

@peteflorence checkout patch #17.

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024

Thanks @ibadami, looking at it now!

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024

Hi @ibadami, I'm getting an error on d4 = d4 + e3 in forward() in the model

When I add prints as below in linknet.py, I get these sizes for d4 and e3 respectively:

(1L, 256L, 24L, 30L)
(1L, 256L, 23L, 30L)
def forward(self, x):
        # Encoder
        x = self.convbnrelu1(x)
        x = self.maxpool(x)

        e1 = self.encoder1(x)
        e2 = self.encoder2(e1)
        e3 = self.encoder3(e2)
        e4 = self.encoder4(e3)

        # Decoder with Skip Connections
        d4 = self.decoder4(e4)
        print d4.size()
        print e3.size()
        d4 = d4 + e3
        d3 = self.decoder3(d4)
        d3 = d3 + e2
        d2 = self.decoder2(d3)
        d2 = d2 + e1
        d1 = self.decoder1(d2)

        # Final Classification
        f1 = self.finaldeconvbnrelu1(d1)
        f2 = self.finalconvbnrelu2(f1)
        f3 = self.finalconv3(f2)

        return f3

Looks like maybe an off by one error? I'm feeding it CamVid data, 480 x 360

from pytorch-semseg.

peteflorence avatar peteflorence commented on May 29, 2024

To close the loop here -- we have the training scripts 'running', but have not been able to get test segmentations that look meaningful.

If interested you can review my changes here (just use python train.py, I changed the defaults in train.py)

from pytorch-semseg.

meetps avatar meetps commented on May 29, 2024

Thanks for the update. You haven't used the ResNet pretrained weights as initialization for the LinkNet encoder weights. Training from scratch did not get me good results with FCN-8s on Pascal VOC and I'd expect the same to happen with CamVid and LinkNet.

What would be ideal would be to have pre-trained ResNet from torchvision and use them to construct the linkNet as done here. I have this in mind, but haven't quite found the time to implement them.

from pytorch-semseg.

stereomatchingkiss avatar stereomatchingkiss commented on May 29, 2024

Implement LinkNet at here, without using any pretrained weights, I am able to get mean accuracy close to 90%, you can see more details in this post.

from pytorch-semseg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.