Comments (17)
@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.
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.
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.
@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.
Hmm... maybe just need to crop/pad 360 since not divisible by 16?
from pytorch-semseg.
@peteflorence @meetshah1995 , I just updated the linknet with pretrained resnet option.
Could you guys check it out?
from pytorch-semseg.
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.
@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.
@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.
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.
OK @ibadami, thanks! :)
from pytorch-semseg.
@peteflorence checkout patch #17.
from pytorch-semseg.
Thanks @ibadami, looking at it now!
from pytorch-semseg.
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.
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.
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.
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)
- Where I run 'python train.py [-h] [--config [CONFIG]]' HOT 1
- pspnet training HOT 2
- About the speed results of ICNet
- SegNet on Pascal:: TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; HOT 1
- Any good results from SegNet? HOT 9
- ValueError: Segmentation map contained invalid class values HOT 2
- RecursionError: maximum recursion depth exceeded in __instancecheck__ HOT 1
- test.py error HOT 1
- Image shape changed to 352 from 360 in FRRN camvid HOT 3
- mscoco pre-trained model
- Any tip to train models from scratch using cityscape dataset? HOT 1
- Semantic Segmentation Tool
- benchmark_RELEASE
- Pretrained Models
- Problem while trying to train HardNet on CamVid dataset
- KeyError: 'name' HOT 2
- Where is model being saved after training?
- python-cdo HOT 1
- Poly learning rate scheduler not doing anything HOT 1
- Error in fcn8s_pascal.yml HOT 1
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-semseg.