caffe icon indicating copy to clipboard operation
caffe copied to clipboard

Compute image mean error

Open dennis-chen opened this issue 12 years ago • 7 comments

Hi there,

It looks like <CAFFE_ROOT_DIR/tools/compute_image_mean.cpp> might have a small bug in it. Running <compute_image_mean.bin> on a leveldb causes google logger to throw an assertion error and the program fails. By inserting the line delete it; before delete db; at the end of the file, compute_image_mean.bin will run without a problem and create an image mean binaryproto file for you.

Can anybody replicate this behavior? I hope this can help!

dennis-chen avatar Jun 27 '14 14:06 dennis-chen

yes, I have met the same error and your solution just solve the error. You really help me a lot.

cactuslei avatar Jun 30 '14 12:06 cactuslei

Closing since this should be fixed in recent versions. Comment if not.

shelhamer avatar Oct 15 '14 06:10 shelhamer

Hi,

I still am facing this issue. I am running the compute_image_mean with the train_lmdb and the name of .binaryproto file as the arguments. And this is what i observe

terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create Aborted (core dumped)

vinaypalakkode avatar Aug 12 '15 21:08 vinaypalakkode

Hey vinaypalakkode..did u find out how to debug that error

techvt518 avatar Nov 29 '16 23:11 techvt518

Hi Dennis,

I run into this error when run make all. Do you have any ideas?

[ 84%] Linking CXX executable compute_image_mean CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to google::base::CheckOpMessageBuilder::NewString()' CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference to google::base::CheckOpMessageBuilder::NewString()' CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function main': compute_image_mean.cpp:(.text.startup+0x168): undefined reference to google::SetUsageMessage(std::string const&)' ../lib/libcaffe.so.1.0.0-rc5: undefined reference to leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)' ../lib/libcaffe.so.1.0.0-rc5: undefined reference to leveldb::Status::ToString() const' collect2: error: ld returned 1 exit status tools/CMakeFiles/compute_image_mean.dir/build.make:135: recipe for target 'tools/compute_image_mean' failed make[2]: *** [tools/compute_image_mean] Error 1 CMakeFiles/Makefile2:511: recipe for target 'tools/CMakeFiles/compute_image_mean.dir/all' failed make[1]: *** [tools/CMakeFiles/compute_image_mean.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

wmmxk avatar Mar 05 '17 23:03 wmmxk

Hi Xiaokang,

I'm afraid I'm not sure what to make of your error message. I actually have not worked with Caffe for more than two years now so I can't be of much help unfortunately. I'd suggest you try asking for help on the Caffe mailing list or to ask active members of the community. Sorry and best of luck!

-Dennis


From: Xiaokang Wang [email protected] Sent: Sunday, March 5, 2017 6:43 PM To: BVLC/caffe Cc: Dennis Chen; Author Subject: Re: [BVLC/caffe] Compute image mean error (#552)

Hi Dennis,

I run into this error when run make all. Do you have any ideas?

[ 84%] Linking CXX executable compute_image_mean CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()' CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()' CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function main': compute_image_mean.cpp:(.text.startup+0x168): undefined reference togoogle::SetUsageMessage(std::string const&)' ../lib/libcaffe.so.1.0.0-rc5: undefined reference to leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)' ../lib/libcaffe.so.1.0.0-rc5: undefined reference toleveldb::Status::ToString() const' collect2: error: ld returned 1 exit status tools/CMakeFiles/compute_image_mean.dir/build.make:135: recipe for target 'tools/compute_image_mean' failed make[2]: *** [tools/compute_image_mean] Error 1 CMakeFiles/Makefile2:511: recipe for target 'tools/CMakeFiles/compute_image_mean.dir/all' failed make[1]: *** [tools/CMakeFiles/compute_image_mean.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BVLC/caffe/issues/552#issuecomment-284273512, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGJGF8v9AQNFjtyJWxKlLZmEoIN2djO_ks5ri0iUgaJpZM4CIPF-.

dennis-chen avatar Mar 06 '17 01:03 dennis-chen

Thanks you very much for your pointer Dennis. I will ask for help on the caffe mailing list.

Best, Xiaokang

Sent from my iPhone

On Mar 5, 2017, at 5:37 PM, Dennis Chen [email protected] wrote:

Hi Xiaokang,

I'm afraid I'm not sure what to make of your error message. I actually have not worked with Caffe for more than two years now so I can't be of much help unfortunately. I'd suggest you try asking for help on the Caffe mailing list or to ask active members of the community. Sorry and best of luck!

-Dennis


From: Xiaokang Wang [email protected] Sent: Sunday, March 5, 2017 6:43 PM To: BVLC/caffe Cc: Dennis Chen; Author Subject: Re: [BVLC/caffe] Compute image mean error (#552)

Hi Dennis,

I run into this error when run make all. Do you have any ideas?

[ 84%] Linking CXX executable compute_image_mean CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function std::string* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()' CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function std::string* google::MakeCheckOpString<unsigned long, int>(unsigned long const&, int const&, char const*)': compute_image_mean.cpp:(.text._ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPSsRKT_RKT0_PKc]+0x50): undefined reference togoogle::base::CheckOpMessageBuilder::NewString()' CMakeFiles/compute_image_mean.dir/compute_image_mean.cpp.o: In function main': compute_image_mean.cpp:(.text.startup+0x168): undefined reference togoogle::SetUsageMessage(std::string const&)' ../lib/libcaffe.so.1.0.0-rc5: undefined reference to leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)' ../lib/libcaffe.so.1.0.0-rc5: undefined reference toleveldb::Status::ToString() const' collect2: error: ld returned 1 exit status tools/CMakeFiles/compute_image_mean.dir/build.make:135: recipe for target 'tools/compute_image_mean' failed make[2]: *** [tools/compute_image_mean] Error 1 CMakeFiles/Makefile2:511: recipe for target 'tools/CMakeFiles/compute_image_mean.dir/all' failed make[1]: *** [tools/CMakeFiles/compute_image_mean.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BVLC/caffe/issues/552#issuecomment-284273512, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGJGF8v9AQNFjtyJWxKlLZmEoIN2djO_ks5ri0iUgaJpZM4CIPF-. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

wmmxk avatar Mar 06 '17 06:03 wmmxk