Skip to content
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

[libprotobuf ERROR google/protobuf/descriptor_database.cc.57] , if when I import caffe with openCV #4906

Closed
Sanggeun-Ahn opened this issue Oct 27, 2016 · 1 comment

Comments

@Sanggeun-Ahn
Copy link

Hello. I have a problem with libprotobuf error.

I was following fast-rcnn by s-gupta (https://github.com/s-gupta/fast-rcnn) .
I tested the project , and it returned error like below.

[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:954] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
Aborted (core dumped)

I found I couldn't use caffe with cv2 on my PC.

If I import only caffe without cv2, it worked.
and, if I import only cv2 without caffe, it worked too.

However, If I tried to import caffe after importing cv2, it returned error.


Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import caffe


Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import cv2

Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import cv2
import caffe
[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:954] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
Aborted (core dumped)


In order to fix this problem, I searched the error on google .
And I followed some answers . But, I couldn't solve my problem.

Please help me. thank you

@cepiross
Copy link

If you are using contrib packages in opencv, it would include dnn module, which causes your symptom. Try to exclude dnn module in contrib, or not to use contrib packages. (#1917)
The conflict will be resolved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants