axon-research/c3d-keras

use convert_caffe_model.py

Closed this issue · 9 comments

Hello,
When i run the convert_caffe_model.py, I have a problem.

[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
Traceback (most recent call last):
File "convert_caffe_model.py", line 121, in
main()
File "convert_caffe_model.py", line 67, in main
p.ParseFromString(open(caffe_model_filename, 'rb').read())
google.protobuf.message.DecodeError: Error parsing message

please, give me some hints, thank you very much!

Hi @buaa-luzhi. This looks related to protobuf not being able to handle large file. I have v2.5 protobuf-compiler (installed via apt-get install protobuf-compiler in ubuntu), and it worked fine.

In your case, you may need to follow steps to make from src described in: https://gist.github.com/albertomontesg/d8b21a179c1e6cca0480ebdf292c34d2#file-sports1m-c3d-network-to-keras-ipynb

Good luck!

In this link "https://gist.github.com/albertomontesg/d8b21a179c1e6cca0480ebdf292c34d2#file-sports1m-c3d-network-to-keras-ipynb", describes how to recompile the protoc compiler is very vague, Is there any more detailed tips?

Thank you very much!you are so warm heart!

I have been modified kDefaultTotalBytesLimit=512<< 20 successfully, but still have this problems!

int BufferSize() const;
static const int kDefaultTotalBytesLimit = 512 << 20; // 64MB
static const int kDefaultTotalBytesWarningThreshold = 32 << 20; // 32MB
and then recompile the protoc compiler successfully.

[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
Traceback (most recent call last):
File "convert_caffe_model.py", line 121, in
main()
File "convert_caffe_model.py", line 67, in main
p.ParseFromString(open(caffe_model_filename, 'rb').read())
google.protobuf.message.DecodeError: Error parsing message

Still the same mistake.

I do not why???

Thank you for you help! thank you very much!

From Lu

@buaa-luzhi hmmm. i don't have a good answer now. i suppose you were running the newly compiled binary? try to use the full path for the new binary.

@buaa-luzhi were you able to iron out this issue?

Closing this issue as I can't reproduce it (and it's outside the scope of this repo).