Giter Club home page Giter Club logo

Comments (7)

warmspringwinds avatar warmspringwinds commented on August 18, 2024

Hi @nayriz . Thank you for reporting. That's a bug, change this line in your notebook:

logits_flatten = flatten_logits(logits, number_of_classes=21)

In your case, number_of_classes=2

Let me know if that works

from pytorch-segmentation-detection.

aoussou avatar aoussou commented on August 18, 2024

Dear Daniil,

Thank you for your prompt reply. I had already changed that line. I have also changed the following lines:

fcn = resnet_dilated.Resnet34_8s(num_classes=2)

and

number_of_classes = 2

labels = range(number_of_classes)

Did you mean to say I should leave those unchanged and only change the line your mentioned?

Thanks alot!

from pytorch-segmentation-detection.

warmspringwinds avatar warmspringwinds commented on August 18, 2024

Did that help to resolve your problem?
You should change everything related to number of classes.

Also check this file:
https://github.com/warmspringwinds/pytorch-segmentation-detection/blob/master/pytorch_segmentation_detection/recipes/endovis_2017/segmentation/resnet_18_8s_train.ipynb

It's a training file for a different dataset where we performed binary segmentation (similar to your problem).

from pytorch-segmentation-detection.

aoussou avatar aoussou commented on August 18, 2024

I had already done that when I submitted the issue, so I guess it doesn't solve my problem.

Thank you for pointing out at the other notebook, I'll definitely have a look at it!

from pytorch-segmentation-detection.

warmspringwinds avatar warmspringwinds commented on August 18, 2024

Great! Try it out.

Also bear in mind that your labels should be 0 and 1 (background and your class) in the
annotations and 255 for regions that you want to ignore.

and let me know if you need more help

from pytorch-segmentation-detection.

aoussou avatar aoussou commented on August 18, 2024

Thanks a lot, when you say

your labels should be 0 and 1 (background and your class) in the annotations

you mean for the endovis files, right? For the Pascal Voc the labels should be the class number.

Also, it is possible to train the model with resnet_34_8s, right?

from pytorch-segmentation-detection.

warmspringwinds avatar warmspringwinds commented on August 18, 2024

@nayriz I mean that depending on the number of classes in your own dataset
you should change all the related variables.

Yes, in Endovis we did it with 2 classes and I thought it might be easier for you as you
mentioned that your dataset has 2 classes. And yes, it is possible to do 2 classes with resnet_34

Sorry, the structure is a little bit messy so far -- I will change that in a future.

from pytorch-segmentation-detection.

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.