convolutional-pose-machines-release icon indicating copy to clipboard operation
convolutional-pose-machines-release copied to clipboard

About Prototxt

Open bearpaw opened this issue 8 years ago • 8 comments

Hi Shihen,

The training stuffs are great. I found that the current genProto.py only generate prototxt for the MPII dataset. Would you please provide the scripts to generate stuffs needed to train on the LSP extend dataset and the FLIC dataset? Thanks.

bearpaw avatar Apr 13 '16 14:04 bearpaw

I'll add the setting I used in genProto.py.

For the pose_train_test.prototxt, in fact the one used for LSP is the same as for MPI. And for FLIC, the only 2 differences are (1) the # of output channel of the convolutional layer before loss is 10 instead of 15, and (2) total 4 stage instead of 6, as described in paper. For solver.prototxt, the stepsize is proportional to data amount.

shihenw avatar Apr 13 '16 16:04 shihenw

when I run genProto.py,I got a error, " writing prototxt/MPI_validation/pose_train_test.prototxt Traceback (most recent call last): File "genProto.py", line 203, in writePrototxts(dataFolder, directory, batch_size, stepsize, layername, kernel, stride, outCH, transform_param, base_lr, d_caffemodel, label_name) File "genProto.py", line 127, in writePrototxts str_to_write = setLayers(dataFolder, batch_size, layername, kernel, stride, outCH, label_name, transform_param_in, deploy=False) File "genProto.py", line 112, in setLayers return str(n.to_proto()) File "/home/gnss/mlSoftware/caffe-master/python/caffe/net_spec.py", line 183, in to_proto top._to_proto(layers, names, autonames) File "/home/gnss/mlSoftware/caffe-master/python/caffe/net_spec.py", line 97, in _to_proto return self.fn._to_proto(layers, names, autonames) File "/home/gnss/mlSoftware/caffe-master/python/caffe/net_spec.py", line 152, in _to_proto assign_proto(layer, k, v) File "/home/gnss/mlSoftware/caffe-master/python/caffe/net_spec.py", line 64, in assign_proto is_repeated_field = hasattr(getattr(proto, name), 'extend') AttributeError: 'LayerParameter' object has no attribute 'cpmdata_param' " how can I do?

shangwenxiang avatar Jul 20 '16 08:07 shangwenxiang

@shangwenxiang can you check are you using our version of caffe? When you have more than one version, make sure the environment variable $PYTHONPATH is pointing to the correct one.

shihenw avatar Jul 20 '16 14:07 shihenw

@shihenw , I am running into the same issue as @shangwenxiang . I have only one version of caffe (the one I got from BVLC github page) and $PYTHONPATH is pointing to correct one. Any idea what could be the issue and how to resolve it?

spagad7 avatar Oct 25 '16 15:10 spagad7

CPM has added a datalayer to official caffe, thus you have to set $PYTHONPATH to the caffe provided by this repo, or add the corresponding layer to official caffe. @sptg

MudeLin avatar Oct 26 '16 10:10 MudeLin

@Geekking, thanks. I cloned caffe provided by this repo and set PYTHONPATH path to this version of caffe, but it failed with cannot fine ._caffe. I realized I hadn't run make pycaffe. So i ran make pycaffe and it failed with the below error.

CXX src/caffe/layers/euclidean2_loss_layer.cpp In file included from ./include/caffe/common.hpp:19:0, from ./include/caffe/blob.hpp:8, from ./include/caffe/loss_layers.hpp:8, from src/caffe/layers/euclidean2_loss_layer.cpp:3: ./include/caffe/util/device_alternate.hpp:15:36: error: no ‘void caffe::Euclidean2LossLayer::Forward_gpu(const std::vectorcaffe::Blob<Dtype>&, const std::vectorcaffe::Blob<Dtype>&)’ member function declared in class ‘caffe::Euclidean2LossLayer’ const vector>& top) { NO_GPU; }
^ src/caffe/layers/euclidean2_loss_layer.cpp:112:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(Euclidean2LossLayer); ^ ./include/caffe/util/device_alternate.hpp:19:39: error: no ‘void caffe::Euclidean2LossLayer::Backward_gpu(const std::vectorcaffe::Blob<Dtype>&, const std::vector&, const std::vectorcaffe::Blob<Dtype>&)’ member function declared in class ‘caffe::Euclidean2LossLayer’ const vector>& bottom) { NO_GPU; }
^ src/caffe/layers/euclidean2_loss_layer.cpp:112:1: note: in expansion of macro ‘STUB_GPU’ STUB_GPU(Euclidean2LossLayer); ^ Makefile:552: recipe for target '.build_release/src/caffe/layers/euclidean2_loss_layer.o' failed make: *** [.build_release/src/caffe/layers/euclidean2_loss_layer.o] Error 1

Since this has lead to a different issue, I have posted the question in the different thread.

spagad7 avatar Oct 26 '16 17:10 spagad7

@shangwenxiang @sptg Have you found the solution? I encountered the same issue that you've got... Please share the solution. :)

handale88 avatar Dec 08 '16 04:12 handale88

"CPM has added a datalayer to official caffe, thus you have to set $PYTHONPATH to the caffe provided by this repo, or add the corresponding layer to official caffe. @sptg"

I don't think I will be able to build the CPM caffe since I'm running on windows10, vs2015, cuda8.0. So is there any chance you could point me in the right direction of adding the correct layer to the official caffe (windows)?

Batlad avatar Jun 14 '17 03:06 Batlad