lextal / pspnet-pytorch Goto Github PK
View Code? Open in Web Editor NEWPyTorch implementation of PSPNet segmentation network
PyTorch implementation of PSPNet segmentation network
Hi!
I am trying to understand the train stub code and I am confused a little bit what is the difference between y and y_cls?
I added dataload script and fixed all the existing bugs which make it compatible with the latest pytorch version. For anyone who wants to give it a try, feel free to contact me and get the code.
Hi,
Could you tell me what initial image size you are feeding into your PSPNet?
Thanks
How I choose the backend, psp_size and deep_features_size if I want to compare the results of PSPNet and U-Net in my project ? I use the backend='resnet34', but the result is not make me happy (It is worse than U-Net)
When initializing the model, it gives size mismatch error.
Input image size: 3, 224, 224
Output Image size: 1, 224, 224
n_classes=1
What could be the issue?
self.stages = []
self.stages = nn.ModuleList([self._make_stage(features, size) for size in sizes])
TypeError: 'int' object is not iterable on the above line
Could you please tell me what the class_weights mean and how to set it?
Because of unfixed image size of PASCAL VOC, I can't simply crop images into (224,224), or it will get some error.
How do you guys deal with this problem?
Thx.
Hi,
Do you have evaluated in voc2012 datasets? And how much less than the original paper?(e.g. mIoU)
thankyou, :)
can someone show me the DataLoader? I don't know how to creat y_cls
There are more than one class in one image, so I wonder if y_cls is a non one-hot format. For example y_cls = [[1, 1, 0], [1, 0, 1]] for a three class segmentation task with batch size 2.
This repo does not have a license. Could you kindly consider adding one?
hello, there is no dropout in paper,if not adding the dropout layer,the network will overfitting?
Hello,
The Feature extraction doesn't work anymore.
Probably because they changed the names of the Layers.
Unfortantly it doesn't work with anny of the models.
Can someone help with one Model?
For now I just want to get the code running, so I don't care what Model will be working ;-)
This is the Full Error Message:
/home/user/pspnet_pytorch/lib/python3.5/site-packages/torchvision/models/densenet.py:212: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_. nn.init.kaiming_normal(m.weight.data) Traceback (most recent call last): File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/train.py", line 101, in <module> train() File "/home/user/pspnet_pytorch/lib/python3.5/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/home/user/pspnet_pytorch/lib/python3.5/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/user/pspnet_pytorch/lib/python3.5/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/user/pspnet_pytorch/lib/python3.5/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/train.py", line 57, in train net, starting_epoch = build_network(snapshot, backend) File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/train.py", line 31, in build_network net = models[backend]() File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/train.py", line 19, in <lambda> 'densenet': lambda: PSPNet(sizes=(1, 2, 3, 6), psp_size=1024, deep_features_size=512, backend='densenet'), File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/pspnet.py", line 47, in __init__ self.feats = getattr(extractors, backend)(pretrained) File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/extractors.py", line 330, in densenet return DenseNet(pretrained=pretrained) File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/extractors.py", line 230, in __init__ bn_size=bn_size, growth_rate=growth_rate, drop_rate=drop_rate) File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/extractors.py", line 187, in __init__ layer = _DenseLayer(num_input_features + i * growth_rate, growth_rate, bn_size, drop_rate) File "/home/user/PycharmProjects/pspnet_pytorch/pspnet-pytorch-master/extractors.py", line 166, in __init__ self.add_module('norm.1', nn.BatchNorm2d(num_input_features)), File "/home/user/pspnet_pytorch/lib/python3.5/site-packages/torch/nn/modules/module.py", line 178, in add_module raise KeyError("module name can't contain \".\"") KeyError: 'module name can\'t contain "."'
It would be nice to add DPN as a feture extractor. Based on https://github.com/cypw/DPNs
it may happen that it will work even better than DenseNet
In this repo, the input size is must divided by 8? Can i use the input size 473?
when reading the datasets, I don't know how to get the dataset's y_cls label, the labels' shape is batch of 1D tensors of dimensionality N: N total number of classes, y_cls[i, T] = 1 if class T is present in image i, 0 otherwise. can you help me?Thank you!
Do you have tried it on VOC or cityscape dataset?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.