- Paper topic: Images
- Software type: Code
- Able to run a replicability test: True
- Replicability score: 3
- Software language: C/C++, Matlab , Mathematica , ..
- License: custom
- Build mechanism: Not applicable (python, Matlab..)
- Dependencies: matlab / libsvm
- Documentation score {0,1,2}: 2
- Reviewer: Nicolas Bonneel <nicolas.bonneel@liris.cnrs.fr>
- Time spent for the test (build->first run, timeout at 100min): 100min

- Code URL: http://transattr.cs.brown.edu/files/regressors_v1.2.tar
- MD5 hash of the code archive: 01998723F8D4DE7B65B1172468A68F14

Regarding installation, I ran the code on Windows with Matlab R2018a amd Visual Studio in 64bits, so I had to adjust the code. * VLfeat - download the precompiled window binaries of vlfeat-0.9.18. Just put the win64 folder in vlfeat-0.9.18\bin - comment line 315 of host.h in vlfeat - then compile vl feat using vl_compile and install, as per the instructions * VOC: - resize.cc, line 36: alphainfo ofs[len]; should be replaced by alphainfo* ofs = new alphainfo[len]; - resize.cc: insert after line 77: delete[] ofs; - resize.cc, line 70: bzero(dst, chan*width*dheight*sizeof(double)); => memset(dst, 0, chan*width*dheight*sizeof(double)); - resize.cc, line 86: const int *sdims = mxGetDimensions(mxsrc); => const mwSize* sdims = mxGetDimensions(mxsrc); - resize.cc, line 95: int ddims[3]; => mwSize ddims[3]; (same for casts in lines 96, 97) - dt.cc, line 50: const int *dims = mxGetDimensions(prhs[0]); => const mwSize *dims = mxGetDimensions(prhs[0]); - dt.cc: add in line 16: typedef int int32_t; - features.cc, line 38: const int *dims = mxGetDimensions(mximage); => const mwSize *dims = mxGetDimensions(mximage); - features.cc, line 54: int out[3]; => mwSize out[3]; - compile.m, line 13: replace mex -O fconv.cc -o fconv by mex -O fconv.cc -output fconv - fconv.cc, line 23: void *process(void *thread_arg) => void process(void *thread_arg) - sparse2dense.m, line 60: idx = sub2ind([M, N], yi, xi) ; => idx = sub2ind([M, N], yi(:), xi(:)); ... and now it should work. Note however one trick: the code results in many messages displayed containing: "Squared correlation coefficient = -nan(ind) (regression)" .... and this is fine, though undocumented ! While trying to "fix" this issue, having to recompile libSVM, it seemed the one precompiled didn't match the source code, and this resulted in additional errors: if you want to recompile libSVM, you need: - to edit the matlab file run_regressor_on_images.m, line 242, add before svmpredict: model.sv_indices = []; model.nSV = length(model.SVs); since the model structure has changed and now contains a field sv_indices. - then, line 244, [score,err] = svmpredict([0], K_input, model); should be changed to [score] = svmpredict([0], K_input, model); since the 2-parameter output doesn't exist anymore (there can be 1 or 3 parameters, not 2). - then in svm_model_matlab.c, line 228, replace: for(i=0;i<num_of_fields;i++) rhs[i] = mxGetFieldByNumber(matlab_struct, 0, i); by rhs[0] = mxGetField(matlab_struct, 0, "Parameters"); rhs[1] = mxGetField(matlab_struct, 0, "nr_class"); rhs[2] = mxGetField(matlab_struct, 0, "totalSV"); rhs[3] = mxGetField(matlab_struct, 0, "rho"); rhs[4] = mxGetField(matlab_struct, 0, "Label"); rhs[5] = mxGetField(matlab_struct, 0, "sv_indices"); rhs[6] = mxGetField(matlab_struct, 0, "ProbA"); rhs[7] = mxGetField(matlab_struct, 0, "ProbB"); rhs[8] = mxGetField(matlab_struct, 0, "nSV"); rhs[9] = mxGetField(matlab_struct, 0, "sv_coef"); rhs[10] = mxGetField(matlab_struct, 0, "SVs"); This is due to the ordering of the structure's field having changed. I found it cleared to index by name rather than indices to avoid such issues in the future. Debugging this took me most of the time, and was not absolutely necessary. Finally, I reduce the reproducibility score as the provided matlab script allows to predict the transient attributes and it seems to work, but no code is provided to perform the image editing based on changing transient attributes.

If you want to contribute with another review, please follow these instructions.

Please consider to cut/paste/edit the raw JSON data attached to this paper.