TsotsosLab / SMILER

The Saliency Model Implementation Library for Experimental Research.
Other
44 stars 16 forks source link

"Invalid MEX File" while running Graph-Based Models on MATLAB #38

Closed andyjliu closed 2 years ago

andyjliu commented 2 years ago

When running LDS, GBVS, and IKN models (all of which are MATLAB-based) through the SMILER CLI, an error is raised during image processing. In all cases, the error messages reference an invalid MEX file (MATLAB executable). The error message is as follows:

Setting up model...
Running model...
Running image [1/10]: O_Q.png
Invalid MEX-file './SMILER/models/matlab/GBVS/saltoolbox/mySubsample.mexmaci64': dlopen(/./SMILER/models/matlab/GBVS/saltoolbox/mySubsample.mexmaci64, 6): Library not loaded: @loader_path/libmex.dylib
  Referenced from: ./SMILER/models/matlab/GBVS/saltoolbox/mySubsample.mexmaci64
  Reason: image not found

Error in getFeatureMaps (line 23)
imgL{1} = mySubsample(imgi);

Error in gbvs (line 58)
[rawfeatmaps motionInfo] = getFeatureMaps( img , param , prevMotionInfo );

Error in IKN_wrap (line 94)
[out,~] = gbvs(img, params);

[IKN] Error processing image ./SMILER/examples/input_images/O_Q.png.

  File ./SMILER/models/matlab/GBVS/util/getFeatureMaps.m, line 23, in getFeatureMaps

  File ./SMILER/models/matlab/GBVS/gbvs.m, line 58, in gbvs

  File ./SMILER/models/matlab/IKN/IKN_wrap.m, line 94, in IKN_wrap
Invalid MEX-file './SMILER/models/matlab/GBVS/saltoolbox/mySubsample.mexmaci64': dlopen(./SMILER/models/matlab/GBVS/saltoolbox/mySubsample.mexmaci64, 6): Library not loaded: @loader_path/libmex.dylib
  Referenced from: ./SMILER/models/matlab/GBVS/saltoolbox/mySubsample.mexmaci64
  Reason: image not found

Steps to reproduce: initialize the below as an experiment.yaml file within SMILER on MacOS, the run SMILER on said file:

experiment:
  name: Simple Example
  description: An illustrative example of how to set up SMILER YAML experiments.
  input_path: ./SMILER/examples/input_images
  base_output_path: /tmp/test_out
  parameters:
    do_smoothing: none

runs:

  - algorithm: IKN
    output_path: ./SMILER/smiler_tools/smiler_tools/exp_output/IKN
    parameters:
      do_smoothing: default
  - algorithm: GBVS
    output_path: ./SMILER/smiler_tools/smiler_tools/exp_output/GBVS
    parameters:
      do_smoothing: default
  - algorithm: LDS
    output_path: ./SMILER/smiler_tools/smiler_tools/exp_output/LDS
    parameters:
      do_smoothing: default
cwloka commented 2 years ago

Do you get this error if you run the models through the MATLAB environment directly?

andyjliu commented 2 years ago

I get the same error running through MATLAB directly.

richanghmc commented 2 years ago

Testing LDS, GBVS, and IKN models in the command line works now.