piergiaj / caffe-deconvnet Goto Github PK
View Code? Open in Web Editor NEWA deconvolutional network in caffe
License: MIT License
A deconvolutional network in caffe
License: MIT License
I ran the demo code available in python-demo/ folder for the butterfly test image. The output is very different from what is expected based on the publication (ECCV 2014 - https://www.cs.nyu.edu/~fergus/papers/zeilerECCV2014.pdf). It is attached below:-
I am using the caffe fork at https://github.com/piergiaj/caffe
make runtest fails at one of the test cases
[ RUN ] NetUpgradeTest.TestUpgradeV1LayerType
/media/data/aravindh/Software/caffe/piergiaj/caffe/src/caffe/test/test_upgrade_proto.cpp:2897: Failure
Value of: V1LayerParameter_LayerType_IsValid(i)
Actual: false
Expected: true
[ FAILED ] NetUpgradeTest.TestUpgradeV1LayerType (1 ms)
[----------] 4 tests from NetUpgradeTest (13 ms total)
wow, great work, visualize model is very important for tunning model.
does this also work for vgg and googlenet?
Could you include the "../test/butterfly.jpg" into the repo? That would make it easier to actually run the demo and play around with it. Thanks!
First of all, I would seriously like to appreciate you for your great work on deconvolution. I followed your steps regarding adding the extra modified layers like, inv-pooling, pooling_switches_layer, etc. and re-building the caffe. After giving the command "make all", I encountered an issue regarding recognizing 'PoolingSwitchesLayer" like : Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: PoolingSwitches
Any how I tried creating pooling_switches_layer.hpp file and added this to caffe/include/layers path and started re-building it. Later on, it gave me the message like, : poolingSwiches is already registered. As a result of which I overcame to this issue. and after giving othr commands like : make test, make runtest. I tried executing the "test_deconv.py" in the terminal from the path: "caffe/caffe-deconv-master/python-demo " , which now gave me the error which i encountered initially i.e. "Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: PoolingSwitches" during the time of creation of "pool1".
May be I am using the wrong .hpp file for this "pooling_switches_layer.cpp", or may be else which I could not find out. Please help me out with this issue and if possible can you plz send me the hpp file for this poolingswitches layer. I will be highly grateful to you. Kindly reply.
Its not compiling with rc4
Thanks for the nice visualization tool~
However, when I plug in a single strongest activation in a specific feature map as the input, the output sometimes become nan in the pixel space. Could you remind me the reason? Thanks.
In file included from ./include/caffe/vision_layers.hpp:10:0,
from src/caffe/layers/pooling_switches_layer.cpp:9:
./include/caffe/common_layers.hpp:10:33:
caffe/data_layers.hpp: No such file or directory.
When I read the paper,and I met a question. How can I receive the figure 2 of this paper??
what the top 9 activations stand for ? if it stand for the last layer's activation,why layer 2-5 is different things???
Thanks for releasing your excellent code.I split inv_pooling_layer、pooling_switches_layer、slice_half_layer,and put them in new caffe /include/caffe/layers and /src/caffe/layers respectively,and re-registration the new layers in caffe,I have already compiled the caffe. Then I use you demo test_deconv.py but I can not get same reuselts in the paper (ECCV 2014 - https://www.cs.nyu.edu/~fergus/papers/zeilerECCV2014.pdf).Can you give me some advises to solve it.And Can you tell me the caffe version that you used.I'm looking forward to the correct solution.Thank you very very much.
hi, when I download the code and just cd to the python-demo dir , run the 'python test_deconv.py ' command,, then it throw an error like blew:
I0527 20:22:11.013113 17197 layer_factory.hpp:77] Creating layer input
I0527 20:22:11.013123 17197 net.cpp:84] Creating Layer input
I0527 20:22:11.013126 17197 net.cpp:380] input -> data
I0527 20:22:11.013139 17197 net.cpp:122] Setting up input
I0527 20:22:11.013146 17197 net.cpp:129] Top shape: 10 3 227 227 (1545870)
I0527 20:22:11.013147 17197 net.cpp:137] Memory required for data: 6183480
I0527 20:22:11.013150 17197 layer_factory.hpp:77] Creating layer conv1
I0527 20:22:11.013155 17197 net.cpp:84] Creating Layer conv1
I0527 20:22:11.013159 17197 net.cpp:406] conv1 <- data
I0527 20:22:11.013161 17197 net.cpp:380] conv1 -> conv1
I0527 20:22:11.182510 17197 net.cpp:122] Setting up conv1
I0527 20:22:11.182545 17197 net.cpp:129] Top shape: 10 96 55 55 (2904000)
I0527 20:22:11.182548 17197 net.cpp:137] Memory required for data: 17799480
I0527 20:22:11.182562 17197 layer_factory.hpp:77] Creating layer relu1
I0527 20:22:11.182570 17197 net.cpp:84] Creating Layer relu1
I0527 20:22:11.182572 17197 net.cpp:406] relu1 <- conv1
I0527 20:22:11.182575 17197 net.cpp:367] relu1 -> conv1 (in-place)
I0527 20:22:11.182678 17197 net.cpp:122] Setting up relu1
I0527 20:22:11.182696 17197 net.cpp:129] Top shape: 10 96 55 55 (2904000)
I0527 20:22:11.182698 17197 net.cpp:137] Memory required for data: 29415480
I0527 20:22:11.182699 17197 layer_factory.hpp:77] Creating layer pool1
F0527 20:22:11.182725 17197 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: PoolingSwitches (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Crop, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, Input, LRN, LSTM, LSTMUnit, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Parameter, Pooling, Power, Python, RNN, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
*** Check failure stack trace: ***
Aborted (core dumped)
because I am not familiar with caffe, so pls help me how to solve the problem , thanks
/include/caffe/vision_layers.hpp:361:14: error: ‘PowerLayer’ was not declared in this scope
shared_ptr<PowerLayer > square_layer_;
so many errors there.
Am getting this error while compiling .. Do you know why?
ylee3@sviyer:~/caffe$ make pycaffe
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
In file included from ./include/caffe/layer.hpp:10:0,
from ./include/caffe/caffe.hpp:10,
from python/caffe/_caffe.cpp:17:
./include/caffe/layer_factory.hpp: In function ‘void caffe::init_module__caffe()’:
./include/caffe/layer_factory.hpp:87:17: error: ‘static std::string caffe::LayerRegistry::LayerTypeList() [with Dtype = float; std::string = std::basic_string]’ is private
static string LayerTypeList() {
^
python/caffe/_caffe.cpp:218:53: error: within this context
bp::def("layer_type_list", &LayerRegistry::LayerTypeList);
^
Makefile:445: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1
Hi~ Thank you for developing such a nice visualization tool. Just a small question regrading the test_deconv.py you provided as the demo. If I recall correctly it was said in Matthew's paper (http://www.matthewzeiler.com/pubs/arxive2013/eccv2014.pdf) that this deconvnet could only be used to visualize a single activation in a certain feature map, and thus we have to set the other activations to zero. While the following lines in test_deconv.py
feat = net.blobs['pool5'].data
feat[0][feat[0] < 150] = 0
seems to set only the activations smaller than 150 to zero, and I wonder if this might contradict with the original idea of the paper?
Thank you!
Thanks for releasing your excellent work. I have run the demo in the deconvnet-python-demo file folder ,and I got the outputs. The following pictures are originated from “pool5” as shown in your python code.
Besides, I want know how to get the deconvolutional outputs from other layers’ feature map. I have tried to change some code in line 68 of the test_deconv.py(change pool5 to pool4). However, I met some errors here.
In addition, Could you tell me how to use other models to perform deconvolution and draw the outputs?
Thank you very much.
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.