Comments (7)
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.
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.
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.
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.
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.
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.
@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)
- about Resnet18_8s HOT 2
- Unable to run resnet_34_8s_demo.ipynb HOT 8
- CRF implementation HOT 1
- Could you please add a license file HOT 2
- Incompatible ResNet arguments HOT 1
- new model implementation
- Difference Between Semantic Segmentation and Image Classification
- I want to train on my own custom dataset.What is the process of doing that?What should be the format of annotations?
- about image size of training set HOT 2
- Error when trying to run resnet_34_8s_test HOT 1
- RuntimeError: value cannot be converted to type float without overflow HOT 1
- RuntimeError: Error(s) in loading_state_dict for VGG
- Error(s) in loading state_dict for Resnet18_8s HOT 7
- Optimizer for unet model on Pascal Voc segmentation
- FCN Skip Connections HOT 1
- fully_conv in vgg16 HOT 1
- No such file or directory: 'resnet_34_8s_66.pth' HOT 6
- Train on my own dataset without superpixels HOT 4
- adaptive_computation_time HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-segmentation-detection.