ohadf / distractors Goto Github PK
View Code? Open in Web Editor NEWFinding Distractors In Images (CVPR 2015)
Finding Distractors In Images (CVPR 2015)
I was trying to run the code and I encountered this error, in the contours from the MCG toolbox.
~/Code/external/pre-trained/src/ucms/contours2OWT.m
.......Index exceeds matrix dimensions.
Error in contours2OWT>create_finest_partition (line 64)
vl = pb_cont(contours.edge_x_coords{e}(p), contours.edge_y_coords{e}(p))*abs(cos(
pb_ori(contours.edge_x_coords{e}(p), contours.edge_y_coords{e}(p)) - pi/2 - angles(e)*pi/180 ));
Error in contours2OWT (line 25)
ws_wt = create_finest_partition(pb_cont, pb_ori);
Error in img2ucms>img2ucm (line 107)
[owt2, superpixels] = contours2OWT(E, O);
Error in img2ucms>img2ucm_scale (line 86)
[ucm2, times] = img2ucm(I, model, param.mult_Pb, param.sat_sPb, param.nvec, param.dthresh, param.ic_gamma);
Error in img2ucms (line 67)
[ucms{s}, times] = img2ucm_scale(I, model, param);
Error in im2ucm (line 46)
ucm2 = img2ucms(image, sf_model, scales);
Error in CreateSegmentFeatures (line 65)
img_segmentation = im2ucm(img, 'fast');
Error in CreateFeatures (line 36)
allfeatures = [allfeatures ; CreateSegmentFeatures(images{ii}, cache_dir)];
Error in im2distractor (line 29)
test_X = CreateFeatures(img_filename, cache_dir, DIMS);
Error in demo_predict (line 36)
output_img_model = im2distractor(TARGET_FILENAME, CACHE_DIR, precalculated_model);
in the pb_ori calculation, apparently the program exceeds the matrix dimensions.
K>> pb_ori(contours.edge_x_coords{e}(p), contours.edge_y_coords{e}(p))
Index exceeds matrix dimensions.
K>> contours.edge_x_coords{e}(p)
ans =
2
K>> contours.edge_y_coords{e}(p)
ans =
6
Even if the doesn't exceed the matrix dimensions though it seems to be wrong. Cause the pb_ori is 1x3 cell matrix and its trying to reach [2 6] which is not correct.
K>> pb_ori(1, 3)
ans =
[512x512x4 uint32]
cause it gives back a matrix of unit32 which is not supported by cosine function or at least the the matlab version that i'm running.
K>> pb_ori{1} (3) - pi/2 - angles(e)*pi/180
ans =
67358
K>> cos(ans)
Undefined function 'cos' for input arguments of type 'uint32'.
however just for the sake of running the code I've used this line instead,
vl = pb_cont(contours.edge_x_coords{e}(p), contours.edge_y_coords{e}(p)) * 0.7;
is there something that I'm doing wrong ?
So, I'm trying to run your code; following the Readme instruction, I've downloaded and installed all the mentioned toolboxes and modules. Running the script I encounter an error in the EdgeBoxes like this:
Single segment reached in 51.443 secs
----------------------------------------
55.6881 seconds
Finding edge boxes...
------------------------------------------------------------------------
Segmentation violation detected at Mon Mar 27 00:10:15 2017
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Current Graphics Driver: Unknown hardware
Current Visual : 0x40 (class 4, depth 24)
Default Encoding : UTF-8
Deployed : false
GNU C Library : 2.23 stable
MATLAB Entitlement ID: Unknown
MATLAB Root : /usr/local/MATLAB/R2016b
MATLAB Version : 9.1.0.441655 (R2016b)
OpenGL : hardware
Operating System : Linux 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64
Processor ID : x86 Family 6 Model 58 Stepping 9, GenuineIntel
Virtual Machine : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : The X.Org Foundation (11803000), display :0
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 0000000000000000 RBX = 0000000000000000
RCX = 0000000000000000 RDX = 0000000000000000
RSP = 00007fd9e3255f30 RBP = 00007fd9e3255f40
RSI = 00007fd8f3d68b70 RDI = 0000000000000000
RIP = 00007fda00204a6e EFL = 0000000000010206
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007fda00204a6e /usr/local/MATLAB/R2016b/bin/glnxa64/libmx.so+00399982 _ZN6matrix6detail10noninlined12mx_array_api11mxGetScalarEPK11mxArray_tag+00000014
[ 1] 0x00007fd8979e2e59 /media/fardin/72BE0881BE084059/Code/external/pre-trained/lib/edgesDetectMex.mexa64+00003673 mexFunction+00000518
[ 2] 0x00007fd9f435bcaa /usr/local/MATLAB/R2016b/bin/glnxa64/libmex.so+00175274 mexRunMexFile+00000106
[ 3] 0x00007fd9f43541a3 /usr/local/MATLAB/R2016b/bin/glnxa64/libmex.so+00143779
[ 4] 0x00007fd9f4355345 /usr/local/MATLAB/R2016b/bin/glnxa64/libmex.so+00148293
[ 54] 0x00007fda0587d9af /usr/local/MATLAB/R2016b/bin/glnxa64/libmwservices.so+02640303
[ 60] 0x00007fda04568b5d /lib/x86_64-linux-gnu/libc.so.6+01076061 clone+00000109
[ 61] 0x0000000000000000 <unknown-module>+00000000
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
Caught MathWorks::System::FatalException
[Please exit and restart MATLAB]>>
I'm running matlab 2016b in an ubuntu 16.04.
Any kind of help would be appreciated
After downloading all dependencies and doing all works mentioned in external/README, when I run "demo_predict.m" an error appears that complains about "SVC_raw" function. Here is the output of this script :
>> demo_predict
WARNING: Database pascal2012 (folder JPEGImages) not found in /path/to/pascal2012/
WARNING: Database SBD (folder images) not found in /path/to/SBD/
WARNING: Database COCO (folder images) not found in /path/to/COCO/
-- You can disable this warning in install.m --
-- Successful installation of MCG. Enjoy! --
Finding Color channels...0.10542 seconds
Finding probabilities of colors at blur level...0, 2, 4, 8, 16, 4.1512 seconds
Finding horizon...0.75956 seconds
Finding cars...3.0794 seconds
Finding people...3.6559 seconds
Finding faces...Scale : 19.2 objects detected : 0
Scale : 16 objects detected : 0
Scale : 13.3333 objects detected : 0
Scale : 11.1111 objects detected : 0
Scale : 9.2593 objects detected : 0
Scale : 7.716 objects detected : 2
Scale : 6.43 objects detected : 2
Scale : 5.3584 objects detected : 2
Scale : 4.4653 objects detected : 2
Scale : 3.7211 objects detected : 2
Scale : 3.1009 objects detected : 2
Scale : 2.5841 objects detected : 2
Scale : 2.1534 objects detected : 2
Scale : 1.7945 objects detected : 2
Scale : 1.4954 objects detected : 2
Scale : 1.2462 objects detected : 2
Scale : 1.0385 objects detected : 2
2.0238 seconds
Finding text...1.695 seconds
Finding distance to the center...0.026189 seconds
Finding distance to the closest border...0.011738 seconds
Finding Itti&Koch channels...
Saliency Toolbox (http://www.saliencytoolbox.net)
For licensing details type 'STBlicense' at the prompt.
1.0156 seconds
Finding Torralba saliency...0.14033 seconds
Finding Hou saliency (NIPS 2008)...0.39225 seconds
Finding PCA saliency...1.4849 seconds
Finding Coxel saliency...Undefined function or variable 'SVC_raw'.
Where is this function defined? I have searched all source files in this repo and there is no definition for this function.
*** I am trying the code with Matlab R2016b on ubuntu 16.04.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.