yuxng / MDP_Tracking

Learning to Track: Online Multi-Object Tracking by Decision Making
MIT License
414 stars 168 forks source link

Problem in running MOT_cross_validation.m :Y must be a vector or a character array #18

Open qazWSX090343113 opened 6 years ago

qazWSX090343113 commented 6 years ago

Hi I try to running MOT_cross_validation.m after run compile.m and fix problem of dataset path. After running MOT_cross_validation.m I get below log and errors:

MOT_cross_validation Warning: Name is nonexistent or not a directory: C:\MATLAB\SupportPackages\R2015b\opencvinterface\toolbox\vision\supportpackages\visionopencv\example\MDP_Tracking-master\dataset\devkit\utils

In path (line 109) In addpath (line 88) In globals (line 36) In MOT_cross_validation (line 13) Online training on sequence: TUD-Stadtmitte Warning: Name is nonexistent or not a directory: C:\MATLAB\SupportPackages\R2015b\opencvinterface\toolbox\vision\supportpackages\visionopencv\example\MDP_Tracking-master\dataset\devkit\utils In path (line 109) In addpath (line 88) In globals (line 36) In MDP_train (line 16) In MOT_cross_validation (line 39) load images from file results/TUD-Stadtmitte_dres_image.mat done TUD-Stadtmitte: 10 positive sequences initialize tracker from scratch Error using svmtrain (line 234) Y must be a vector or a character array.

Error in MDP_initialize (line 28) tracker.w_active = svmtrain(tracker.lactive, tracker.factive, '-c 1 -q');

Error in MDP_train (line 49) tracker = MDP_initialize(I, dres_det, labels, opt);

Error in MOT_cross_validation (line 39) tracker = MDP_train(idx_train{j}, tracker);

And my system have below specifics: Windows 10 x64 Matlab 2015b OpenCv 2.49 Visual studio 2012

so, How can fix this error and run this code completely successfully?

hemp110 commented 6 years ago

you are using the svm toolbox of matlab instead of libsvm because the prepared libsvm in the code is not compiled with windows and visual studio. you just need to compile libsvm again:

  1. change current path to 3rd_party/libsvm-3.20/matlab
  2. in matlab command run "mex -setup C++"
  3. then run "make" and you get four *.mexw64 files, done