hszhao / psanet Goto Github PK
View Code? Open in Web Editor NEWPSANet: Point-wise Spatial Attention Network for Scene Parsing, ECCV2018.
Home Page: https://hszhao.github.io/projects/psanet
PSANet: Point-wise Spatial Attention Network for Scene Parsing, ECCV2018.
Home Page: https://hszhao.github.io/projects/psanet
Hello. Thanks for the code.
In the paper, during inference, there will be two tensor with size b * (2*h*w) * h * w
in the psa module, willl it consumes too much memory ?
想自己训练一下cityscapes
Hi ! I have merged layers you said into PSPNet ,but when I make it appears following errors,can you tell me how to fix this??
I also want to know whether I can train this model because you didn't mention it in this repository.
Thanks very much!
Here are some errors:
src/caffe/layers/pointwise_spatial_attention_layer.cpp: In member function ‘virtual void caffe::PointwiseSpatialAttentionLayer<Dtype>::LayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’: src/caffe/layers/pointwise_spatial_attention_layer.cpp:12:3: error: ‘PointwiseSpatialAttentionParameter’ was not declared in this scope src/caffe/layers/pointwise_spatial_attention_layer.cpp:71:3: error: ‘PointwiseSpatialAttentionParameter_PSAType_COLLECT’ was not declared in this scope src/caffe/layers/pointwise_spatial_attention_layer.cpp:71:3: error: ‘PointwiseSpatialAttentionParameter_PSAType_DISTRIBUTE’ was not declared in this scope src/caffe/layers/pointwise_spatial_attention_layer.cpp: In function ‘void caffe::PSAForward_buffer_mask_collect_cpu(int, int, int, int, int, int, int, const Dtype*, Dtype*)’: src/caffe/layers/pointwise_spatial_attention_layer.cpp:116:51: error: there are no arguments to ‘max’ that depend on a template parameter, so a declaration of ‘max’ must be available [-fpermissive] src/caffe/layers/pointwise_spatial_attention_layer.cu(201): error: class "caffe::LayerParameter" has no member "pointwise_spatial_attention_param" detected during instantiation of "void caffe::PointwiseSpatialAttentionLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]" (220): here 8 errors detected in the compilation of "/tmp/tmpxft_00004960_00000000-19_pointwise_spatial_attention_layer.compute_52.cpp1.ii". make: *** [.build_release/cuda/src/caffe/layers/pointwise_spatial_attention_layer.o] Error 1
Hi,
I am confused about that how to visualize the mask predicted by PSANet described in the subsection 4.5. The predicted attention map has a spatial size of (H,W, H*W), how to get final mask which is shown in Fig.6?
Best regards.
Hello , can you public your pytorch version please? I keep trying to do this with caffe,but it always meets bugs ,as a newcomer to deep learning,it's really difficult to me,please public your pytorch version,thank you very much.
When I evaluate psanet50_voc2012_465.prototxt net use your pretained psanet50_voc2012_d5fc37.caffemodel, there is some errors.
F0920 09:00:23.963999 5519 net.cpp:829] Cannot copy param 0 weights from layer 'PSA_COLLECT_fc2'; shape mismatch. Source param shape is 13689 512 1 1 (7008768); target param shape is 3481 512 1 1 (1782272). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer
But the ‘PSA_COLLECT_fc2’ layer's output channel is 3481in your psanet50_voc2012_465.prototxt.
layer {
name: "PSA_COLLECT_fc2"
type: "Convolution"
bottom: "PSA_COLLECT_fc1"
top: "PSA_COLLECT_fc2"
param {
lr_mult: 10
decay_mult: 1
}
convolution_param {
num_output: 3481 # 59*59
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
bias_term: false
}
}
Could you please upload model if it is possible?
hi @hszhao
does the code of BN layer in PSPNet@4b53f1c support synchronization-update the bp gradient when multi-gpus training?
thanks.
I have some confusion about your 'HoleConvolution' layer when I try to evaluate your pretrained model. I did not find the definition of 'HoleConvolution' which appears in 'prototxt' file. Where the 'HoleConvolution' layer define? Thanks.
As stated above.
It seems like collection and distribution operations require the training and testing images have the same input feature size.
So How to deal with images with different input size?
Hi,@hszhao
It seems that it is same between the collect branch and distributes branch(show on Fig. 3).
Could you show the equation of the distribute branch(like the equation(eq.9) of the collect branch show on the paper)?
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.