SalMetric icon indicating copy to clipboard operation
SalMetric copied to clipboard

Unable to install

Open Kinpzz opened this issue 8 years ago • 9 comments

Hi, Andrew

I have trouble with both C++ and python installing method. They were all failed, and I can get little information from the debug log. Should I modify the program?

The log are as following:

  • C++:
  • Python:

Kinpzz avatar Nov 05 '17 04:11 Kinpzz

Yeah, sorry for that. At present, you may need to modify the code. I will fix this later on.

houqb avatar Nov 05 '17 06:11 houqb

Thanks for your reply. It is very kind of you. However I don't know where I should modify because I barely get anything from the logs information. And I don't have any error information about OpenCV2.

Kinpzz avatar Nov 05 '17 09:11 Kinpzz

Some of the member functions of OpenCV2 are different from opencv3. You can try to compile the C++ part with gcc.

houqb avatar Nov 06 '17 01:11 houqb

@Kinpzz I had the same problem and I solved it by

  1. make sure opencv3 installed correctly (followed opencv tutorial)
  2. modified the setup.py for the right path for you envs
  3. using the command line "python setup.py install"
  4. cp ./build/lib.linux-x86_64-2.7/build/salmetric.so /home/user/anaconda2/envs/xxx/lib/python2.7/site-packages/salmetric.so
  5. then you can find the salmetric module if you want to modified the salmetric.cpp file, you can modified it and replace the file ./src/salmetric.cpp, then follow the 4 and 5 step

@Andrew-Qibin it is very kind of you to open this code. Can you give me some advice if I want to modify the code to return MaxFb and mae value as a list in the member function do_evaluation() ?

Sucran avatar Mar 06 '18 12:03 Sucran

@Kinpzz I have the trouble with both C++ and python installing method. Have you sloved it? @Sucran I have opencv 2.4 installed in my minicoda. Then I install opencv 3.2 and add the command set(OpenCV_DIR "/usr/local/opencv320/share/OpenCV") to the CMakeLists.txt. And I follow the tip3,4,5 as you suggested. But I still meet such problem:

import salmetric Traceback (most recent call last): File "", line 1, in ImportError: /root/Util/miniconda/lib/python2.7/site-packages/salmetric.so: undefined symbol: _ZN2cv6imreadERKSsi

Have you some solutions? And I am not particularly clear about the tip 2. Can you describe it more clearly? Thanks a lot!

yuanyao366 avatar Oct 10 '18 04:10 yuanyao366

@Kinpzz I had the same problem and I solved it by

  1. make sure opencv3 installed correctly (followed opencv tutorial)
  2. modified the setup.py for the right path for you envs
  3. using the command line "python setup.py install"
  4. cp ./build/lib.linux-x86_64-2.7/build/salmetric.so /home/user/anaconda2/envs/xxx/lib/python2.7/site-packages/salmetric.so
  5. then you can find the salmetric module if you want to modified the salmetric.cpp file, you can modified it and replace the file ./src/salmetric.cpp, then follow the 4 and 5 step

@Andrew-Qibin it is very kind of you to open this code. Can you give me some advice if I want to modify the code to return MaxFb and mae value as a list in the member function do_evaluation() ?

Hi, I still get the error AttributeError: module 'salmetric' has no attribute 'do_evalution' after correctly importing salmetric module.

sofmonk avatar Aug 27 '19 15:08 sofmonk

@Kinpzz I had the same problem and I solved it by

  1. make sure opencv3 installed correctly (followed opencv tutorial)
  2. modified the setup.py for the right path for you envs
  3. using the command line "python setup.py install"
  4. cp ./build/lib.linux-x86_64-2.7/build/salmetric.so /home/user/anaconda2/envs/xxx/lib/python2.7/site-packages/salmetric.so
  5. then you can find the salmetric module if you want to modified the salmetric.cpp file, you can modified it and replace the file ./src/salmetric.cpp, then follow the 4 and 5 step

@Andrew-Qibin it is very kind of you to open this code. Can you give me some advice if I want to modify the code to return MaxFb and mae value as a list in the member function do_evaluation() ?

Hi, I still get the error AttributeError: module 'salmetric' has no attribute 'do_evalution' after correctly importing salmetric module.

Same. Any solutions?

lightas avatar Oct 20 '19 13:10 lightas

@Kinpzz I had the same problem and I solved it by

  1. make sure opencv3 installed correctly (followed opencv tutorial)
  2. modified the setup.py for the right path for you envs
  3. using the command line "python setup.py install"
  4. cp ./build/lib.linux-x86_64-2.7/build/salmetric.so /home/user/anaconda2/envs/xxx/lib/python2.7/site-packages/salmetric.so
  5. then you can find the salmetric module if you want to modified the salmetric.cpp file, you can modified it and replace the file ./src/salmetric.cpp, then follow the 4 and 5 step

@Andrew-Qibin it is very kind of you to open this code. Can you give me some advice if I want to modify the code to return MaxFb and mae value as a list in the member function do_evaluation() ?

@Sucran Did you had any error while calling do_evaluation(), I am getting an error saying salmetric has no atrribute do_evaluation(). Any suggestion will be helpful, thank you.

uvasudha avatar May 05 '20 10:05 uvasudha

do_evalution() should be do_evaluation()

hit421 avatar May 06 '23 05:05 hit421