New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example runtime error:message_lite.cc:123 Can't parse message of type "caffe.NetParameter" #787

Closed
AlexLuya opened this Issue Aug 21, 2018 · 12 comments

Comments

Projects
None yet
7 participants
@AlexLuya
Copy link

AlexLuya commented Aug 21, 2018

Executed Command (if any)

cd /path/to/openpose/build/examples/openpose/
./openpose.bin --face --logging_level 0

OpenPose Output (if any)

/path/to/openpose/include/openpose/core/wCvMatToOpOutput.hpp:work():68
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "caffe.NetParameter" because it is missing required fields: layer[0].clip_param.min, layer[0].clip_param.max
F0821 14:26:29.665053 22812 upgrade_proto.cpp:97] Check failed: ReadProtoFromBinaryFile(param_file, param) Failed to parse NetParameter file: models/pose/body_25/pose_iter_584000.caffemodel
*** Check failure stack trace: ***
    @     0x7f90bdca85cd  google::LogMessage::Fail()
    @     0x7f90bdcaa433  google::LogMessage::SendToLog()
    @     0x7f90bdca815b  google::LogMessage::Flush()
    @     0x7f90bdcaae1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f90bd5fcb41  caffe::ReadNetParamsFromBinaryFileOrDie()
    @     0x7f90bd7d54ca  caffe::Net<>::CopyTrainedLayersFromBinaryProto()
    @     0x7f90bd7d55b7  caffe::Net<>::CopyTrainedLayersFrom()
    @     0x7f90c0249ae2  op::NetCaffe::initializationOnThread()
    @     0x7f90c02f155b  op::addCaffeNetOnThread()
    @     0x7f90c02f2031  op::PoseExtractorCaffe::netInitializationOnThread()
    @     0x7f90c02f6620  op::PoseExtractorNet::initializationOnThread()
    @     0x7f90c02ede01  op::PoseExtractor::initializationOnThread()
    @     0x7f90c02e8e41  op::WPoseExtractor<>::initializationOnThread()
    @     0x7f90c027a331  op::SubThread<>::initializationOnThread()
    @     0x7f90c027efd8  op::Thread<>::initializationOnThread()
    @     0x7f90c027f1dd  op::Thread<>::threadFunction()
    @     0x7f90beb8dc80  (unknown)
    @     0x7f90be2df6ba  start_thread
    @     0x7f90be5fc41d  clone
    @              (nil)  (unknown)
Abgebrochen (Speicherabzug geschrieben)

Type of Issue

  • Execution error

Your System Configuration

Latest GitHub code

  1. General configuration:
    • CMake, manual Makefile installation
    • Ubuntu 16.04.5 LTS
    • Release mode
    • gcc version 5.4.0 20160609
@jpapon

This comment has been minimized.

Copy link

jpapon commented Aug 23, 2018

I'm experiencing the same issue with master branch of Caffe. I think this was introduced by BVLC/caffe@dc6d330 - it added a clip layer which seems to cause problems.

@jpapon

This comment has been minimized.

Copy link

jpapon commented Aug 23, 2018

There appear to be other commits before that one that also mention a clip layer.
I reverted to BVLC/caffe@f019d0d and things work fine.

I just changed from master to f019d0dfe86f49d1140961f8c7dec22130c83154 in the two relevant places:

execute_process(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/caffe)

and
execute_process(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/caffe)

It probably makes sense to switch to a specific tag or commit rather than master to avoid this type of issue in the future. Especially since from the look of it, the only way to be compatible with master now is to update the weights file.

@AlexLuya

This comment has been minimized.

Copy link

AlexLuya commented Aug 24, 2018

@jpapon you are right,thanks,by the way,I can't checkout:f019d0dfe86f49d1140961f8c7dec22130c83154,so checkout another commit:864520713a4c5ffae7382ced5d34e4cadc608473,rebuild caffe and openpose,it works fine

@AlexLuya AlexLuya closed this Aug 24, 2018

@jpapon

This comment has been minimized.

Copy link

jpapon commented Aug 24, 2018

@AlexLuya Please reopen this, it’s a bad bug that breaks new checkouts of Openpose, or any build that uses Caffe master. It needs to be fixed.

I would submit a pull request, but the owners of the repo need to decide what commit or tag of Caffe they want to use.

@fengxinzio

This comment has been minimized.

Copy link

fengxinzio commented Sep 16, 2018

[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "caffe.NetParameter" because it is missing required fields: layer[0].clip_param.min, layer[0].clip_param.max
F0917 00:29:20.274567 25511 upgrade_proto.cpp:97] Check failed: ReadProtoFromBinaryFile(param_file, param) Failed to parse NetParameter file: models/pose/body_25/pose_iter_584000.caffemodel
*** Check failure stack trace: ***
@ 0x7f56b3b4c5cd google::LogMessage::Fail()
@ 0x7f56b3b4e433 google::LogMessage::SendToLog()
@ 0x7f56b3b4c15b google::LogMessage::Flush()
@ 0x7f56b3b4ee1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f56b3032601 caffe::ReadNetParamsFromBinaryFileOrDie()
@ 0x7f56b304340a caffe::Net<>::CopyTrainedLayersFromBinaryProto()
@ 0x7f56b5d45bb7 op::NetCaffe::initializationOnThread()
@ 0x7f56b5d7a73b op::addCaffeNetOnThread()
@ 0x7f56b5d7b228 op::PoseExtractorCaffe::netInitializationOnThread()
@ 0x7f56b5d7f5b0 op::PoseExtractorNet::initializationOnThread()
@ 0x7f56b5d76f51 op::PoseExtractor::initializationOnThread()
@ 0x7f56b5d72081 op::WPoseExtractor<>::initializationOnThread()
@ 0x7f56b5da8881 op::SubThread<>::initializationOnThread()
@ 0x7f56b5dad528 op::Thread<>::initializationOnThread()
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "caffe.NetParameter" because it is missing required fields: layer[0].clip_param.min, layer[0].clip_param.max
F0917 00:29:20.297528 25512 upgrade_proto.cpp:97] Check failed: ReadProtoFromBinaryFile(param_file, param) Failed to parse NetParameter file: models/pose/body_25/pose_iter_584000.caffemodel
*** Check failure stack trace: ***
@ 0x7f56b5dad72d op::Thread<>::threadFunction()
@ 0x7f56b3b4c5cd google::LogMessage::Fail()
@ 0x7f56b4408c80 (unknown)
@ 0x7f56b3b4e433 google::LogMessage::SendToLog()
@ 0x7f56b4ae56ba start_thread
@ 0x7f56b3b4c15b google::LogMessage::Flush()
@ 0x7f56b3e7741d clone
@ 0x7f56b3b4ee1e google::LogMessageFatal::~LogMessageFatal()
@ (nil) (unknown)
Aborted (core dumped)

@fengxinzio

This comment has been minimized.

Copy link

fengxinzio commented Sep 16, 2018

@jpapon you are right,thanks,by the way,I can't checkout:f019d0dfe86f49d1140961f8c7dec22130c83154,so checkout another commit:864520713a4c5ffae7382ced5d34e4cadc608473,rebuild caffe and openpose,it works fine

I meet the same problem,I have reinstall the caffe,the problem is still
the new openpose CMakeLists.txt have repair the Line 616 and 651,my problem still

@Immocat

This comment has been minimized.

Copy link

Immocat commented Oct 18, 2018

@jpapon you are right,thanks,by the way,I can't checkout:f019d0dfe86f49d1140961f8c7dec22130c83154,so checkout another commit:864520713a4c5ffae7382ced5d34e4cadc608473,rebuild caffe and openpose,it works fine

I meet the same problem,I have reinstall the caffe,the problem is still
the new openpose CMakeLists.txt have repair the Line 616 and 651,my problem still

Same issue here

@lagidigu

This comment has been minimized.

Copy link

lagidigu commented Oct 25, 2018

Same issue here

@Immocat

This comment has been minimized.

Copy link

Immocat commented Oct 25, 2018

Same issue here

Actually, I solved by select "Build Caffe" and do what exactly #787 (comment). So for me, not use your own Caffe even built with older commit instead of 'master'. Just let openpose build its own Caffe with older Caffe commit by changing the CMakeList.txt of OpenPose. I am using ubuntu 18.04.

@wakingking77

This comment has been minimized.

Copy link

wakingking77 commented Oct 30, 2018

这是由于openpose版本与你自己下载的caffe版本不兼容所造成的(最新的caffe加了一个层,导致与openpose中原有的模型不兼容),解决办法:1.用openpose里自带的caffe来build。2.把你的caffe卸载,然后用这个版本: https://github.com/BVLC/caffe/tree/f019d0dfe86f49d1140961f8c7dec22130c83154 其他方法正常配置就可以了。

This is your openpose is incompatible with your caffe. The solution is : 1.use the openpose 's caffe ; 2.use this caffe: https://github.com/BVLC/caffe/tree/f019d0dfe86f49d1140961f8c7dec22130c83154
OK! Enjoy it !

@Immocat

This comment has been minimized.

Copy link

Immocat commented Oct 30, 2018

这是由于openpose版本与你自己下载的caffe版本不兼容所造成的(最新的caffe加了一个层,导致与openpose中原有的模型不兼容),解决办法:1.用openpose里自带的caffe来build。2.把你的caffe卸载,然后用这个版本: https://github.com/BVLC/caffe/tree/f019d0dfe86f49d1140961f8c7dec22130c83154 其他方法正常配置就可以了。

This is your openpose is incompatible with your caffe. The solution is : 1.use the openpose 's caffe ; 2.use this caffe: https://github.com/BVLC/caffe/tree/f019d0dfe86f49d1140961f8c7dec22130c83154
OK! Enjoy it !

FYI, I tried to build my own version of caffe with that specific commit and did not "Build Caffe" in Openpose's CMakeLists.txt. It just doesn't work for me. The only way for me is to change the CMakeList.txt in Openpose and clone that specific version of caffe, and select "Build Caffe" to let Openpose build its own Caffe with that specific commit/version. 😸

@gineshidalgo99

This comment has been minimized.

Copy link
Member

gineshidalgo99 commented Dec 18, 2018

This error only happens in some Ubuntu machines. Following #787, compile your own Caffe with an older version of it. The hacky (quick but not recommended way) is to follow #787#issuecomment-415476837, the elegant way (compatible with future OpenPose versions) is to build your own Caffe independently, following doc/installation.md#custom-caffe-ubuntu-only.

(This message will be added to the doc/faq.md doc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment