adikhosla / feature-extraction

Computer vision feature extraction toolbox for image classification
Other
306 stars 136 forks source link

Demo not working in Octave #4

Closed imyousuf closed 8 years ago

imyousuf commented 8 years ago

I am interested to do some personal work in Image processing and for this I need Image feature extraction. So this project interests me as a starting point. I am new to Octave, but I have used MatLab in past. I am trying to get the demo to work, for this I did the following (version details are also provided):

$ git clone git@github.com:adikhosla/feature-extraction.git
$ cd feature-extraction/
$ octave
octave:1> demo
warning: load: file found in load path
warning: function name 'config_hog3x3' does not agree with function file name '/home/imyousuf/projects/feature-extraction/features/ssim/config_ssim.m'
Dataset: demo
Learning dictionary for feature: color, size 20
error: default_formats: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error:   /usr/share/octave/3.8.2/m/image/imformats.m at line 255, column 11
error:   /usr/share/octave/3.8.2/m/image/imformats.m at line 78, column 3
error:   /usr/share/octave/3.8.2/m/image/private/imageIO.m at line 60, column 7
error:   /usr/share/octave/3.8.2/m/image/imread.m at line 107, column 30
error:   /home/imyousuf/projects/feature-extraction/util/imgread.m at line 12, column 7
error:   /home/imyousuf/projects/feature-extraction/util/build_dictionary.m at line 49, column 11
error:   /home/imyousuf/projects/feature-extraction/util/datasets_feature.m at line 31, column 45
error:   /home/imyousuf/projects/feature-extraction/demo.m at line 24, column 1
octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.2
GNU Octave License: GNU General Public License
Operating System: Linux 3.19.0-30-generic #33-Ubuntu SMP Mon Sep 21 20:58:04 UTC 2015 x86_64
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
     control *|   2.6.6 | /usr/share/octave/packages/control-2.6.6
     general *|   1.3.4 | /usr/share/octave/packages/general-1.3.4
       image *|   2.2.2 | /usr/share/octave/packages/image-2.2.2
          io *|   2.2.4 | /usr/share/octave/packages/io-2.2.4
      signal *|   1.3.0 | /usr/share/octave/packages/signal-1.3.0
  statistics *|   1.2.3 | /usr/share/octave/packages/statistics-1.2.3

Please help me to get it to work in Octave. Thank you.

imyousuf commented 8 years ago

@samos123 Can you please see if you faced something similar?

adikhosla commented 8 years ago

Hi Imran,

I've never used Octave before so might not be able to help in depth, but I notice that you did not compile the mex files after downloading. Maybe that could be the issue? Just try running 'compile' in Octave.

imyousuf commented 8 years ago

Thank you Aditya for reaching out and helping me. Here is what happens when I try to compile -

octave:1> compile
mkoctfile: unrecognized argument -outdirwarning: mkoctfile exited with failure status
mkoctfile: unrecognized argument -outdirwarning: mkoctfile exited with failure status
mkoctfile: unrecognized argument -outdirwarning: mkoctfile exited with failure status
mkoctfile: unrecognized argument -outdirwarning: mkoctfile exited with failure status
octave:1> demo
warning: load: file found in load path
warning: function name 'config_hog3x3' does not agree with function file name '/home/imyousuf/projects/feature-extraction/features/ssim/config_ssim.m'
^CDataset: demo
Dictionary building in progress on imran-latitude-e6440..

Basically the compiles work despite some failures but now when I run demo it seems to be waiting for 30+mins, then when I CTRL+C it it says Dictionary building in progress, am I missing anything?

adikhosla commented 8 years ago

Could you try removing the '-outdir ...' flags from compile and copy the files to their appropriate directories, once compiled?

Thanks!

imyousuf commented 8 years ago

Proceeded a little more -

octave:3> demo
warning: load: file found in load path

Its been there for approximately 5mins and I am waiting. Any clue?

adikhosla commented 8 years ago

You should kill the process and re-run it after deleting the 'cache' folder.

imyousuf commented 8 years ago

Something seems to have progressed after deleting the cache dir -

octave:1> demo
warning: load: file found in load path
warning: function name 'config_hog3x3' does not agree with function file name '/home/imyousuf/projects/feature-extraction/features/ssim/config_ssim.m'
Dataset: demo
Learning dictionary for feature: color, size 20
error: default_formats: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error:   /usr/share/octave/3.8.2/m/image/imformats.m at line 255, column 11
error:   /usr/share/octave/3.8.2/m/image/imformats.m at line 78, column 3
error:   /usr/share/octave/3.8.2/m/image/private/imageIO.m at line 60, column 7
error:   /usr/share/octave/3.8.2/m/image/imread.m at line 107, column 30
error:   /home/imyousuf/projects/feature-extraction/util/imgread.m at line 12, column 7
error:   /home/imyousuf/projects/feature-extraction/util/build_dictionary.m at line 49, column 11
error:   /home/imyousuf/projects/feature-extraction/util/datasets_feature.m at line 31, column 45
error:   /home/imyousuf/projects/feature-extraction/demo.m at line 24, column 1

This seems to be a known bug of Octave in Ubuntu 15.04. I am closing this issue for now, if I run into issues after Ubuntu fixes their problem I will reopen it. https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1372202

@adikhosla You are awesome! Thank you for all the help!!

adikhosla commented 8 years ago

Sure, happy to help! Sorry this issue couldn't get resolved! Thank you for trying out the toolbox.

imyousuf commented 8 years ago

I managed to recompile the Debian octave package as mentioned in the bug report above and got the demo to work in Octave. Thank you @adikhosla for your patience.