Giter VIP home page Giter VIP logo

Comments (10)

quantombone avatar quantombone commented on July 16, 2024

Hi Liang,

Sorry I haven't been able to get to you sooner, but lots of us vision hackers are busy with tomorrow's ECCV submission deadline. I suspect that this compilation issue is related to something in the Makefile. I would recommend trying to get a fresh install of libsvm and trying to compile that. If you are having an issue compiling libsvm, then whatever you do to fix that problem you should be able to incorporate into the exemplarsvm libsvm subfolder.

Let me know if you are still having problems, and I can look into this once the ECCV deadline is over.
--Tomasz

from exemplarsvm.

CoolNaCl avatar CoolNaCl commented on July 16, 2024

Hi Tomasz,
I have fix it by replace "/" to "/" and "/", then everything ok.
In this days, I train and evaluate my own Ensemble, and effect is very goog! Thank you for opening this code!
Now, I want to run it in video, and the Readme in Video folder is so simple that I can't know how to run it in video.
I just run: bgg=get_movie_bg('/home/ly/Documents/movie/AVSS_AB_Easy_Divx.avi')
and error:
Attempted to access commas(1); index out
of bounds because numel(commas)=0.

Error in ==> get_movie_bg at 25
commas = commas(1);
I have set the path of ffmpeg, and I run a single-step debug, I find that the code :[tmp,lenstring] = unix(instring); in my computer is
[tmp,lenstring] = unix('/usr/bin/ffmpeg -i "/home/ly/Documents/movie/AVSS_AB_Easy_Divx.avi" 2>&1 | grep Duration')
the return value is tmp = 1 lenstring = '' , lenstring is Empty. Is thar right?
And when I jues run"/usr/bin/ffmpeg -i "/home/ly/Documents/movie/AVSS_AB_Easy_Divx.avi" 2>&1 | grep Duration" in terminal, the result is " Duration: 00:03:38.96, start: 0.000000, bitrate: 4005 kb/s".
This error has blocked me 5 days, I really need your help!
Thank you!
Liang Yan

from exemplarsvm.

quantombone avatar quantombone commented on July 16, 2024

Hi Liang,

I'm glad you got libsvm compiled. I ran into the same exact error when I had to use libsvm for some experiment just a couple of days ago. It ends up that linux complains about c++ style comments in c files. I added the gcc flag to the libsvm_compile.m script as follows:

mex CFLAGS="$CFLAGS -std=c99" -largeArrayDims -O -c svm.cpp

Regarding videos, you should be able to call get_movie_bg and it should work. What sometimes happens in that on different machines and on different videos, ffmpeg returns slightly different output. I parse those strings inside matlab to get the duration of the video, but then each time you call convert_to_I(bg{i}), it will call ffmpeg to extract that frame. This method is nice because you don't have to extract all of the frames beforehand, but if you're going to be doing lots of work with the video, it is faster to extract the frames from the video, and then do the following

fg = list_files_in_directory('~/directory_of_images','images');
I = convert_to_I(fg{i});

You seem to be debugging correctly, lenstring should not be empty and the Matlab call to unix should output the same thing as on the command line.

from exemplarsvm.

CoolNaCl avatar CoolNaCl commented on July 16, 2024

Hi Tomasz
Thank you so much for your help, I have finish the call of ffmpeg in matlab, it needs to:
ln -s /usr/lib/libraw1394.so.11.01 /usr/local/MATLAB/R2010b/sys/os/glnx86/libraw1394.so.8
I can run get_movie_bg successfully, and return bg, a 200*1 cell,
result:
bg =

[function_handle]
[function_handle]
[function_handle]
[function_handle]
[function_handle]
[function_handle]
[function_handle]
[function_handle]

............................
[function_handle]
each is @()(get_movie_frame(mname,get_movie_string(chunks(i))))
Is that right? If I want to detect bus in a vedio, what should I do first? and after? ......
Liang Yan

from exemplarsvm.

CoolNaCl avatar CoolNaCl commented on July 16, 2024

And when I run get_movie_frame('/home/ly/Documents/movie/AVSS_AB_Easy_Divx.avi',00:00:00), and debug in step.
In line 13: [tmp,randstring]=unix(sprintf('md5 -qs %s',randstring));
I don't find the command 'md5 -qs' in both matlab and linux, this confuse me so much....
Thank you for your help.

from exemplarsvm.

quantombone avatar quantombone commented on July 16, 2024

Hi Liang,

When dealing with a video, you will get a cell array of function handles, so when you call "I=convert_to_I(bg{i})", it will call ffmpeg on the fly. md5 is just a tool to get a unique string given some data, you can do the randomization step another way or just install md5 on your system.

Remember that it is actually faster to extract all frames from a video using ffmpeg first, then doing the experiments. The video frame reading code lets you quickly experiment with videos, but is not as efficient because it calls ffmpeg on the fly.

--Tomasz

from exemplarsvm.

ZZUO1 avatar ZZUO1 commented on July 16, 2024

Hi Tomasz,

Do you have a version of this code which works on Windows? As I'm not able to compile the c files in this code to mex files in my current Windows OS.

How can I fix it?
Thank you!

-- Zhen

from exemplarsvm.

quantombone avatar quantombone commented on July 16, 2024

Hi Zhen,

I unfortunately don't even have access to a Windows machine. I know there have been some requests for a windows version, but none of the researchers I'm around use this OS. I'm not sure what the difficulty in compiling the C file is, but without a windows installation nearby I cannot help much.

--Tomasz

from exemplarsvm.

bjorgvino avatar bjorgvino commented on July 16, 2024

I got the code to compile on Windows 7 64 bit with a few modifications. Unfortunately pthreads aren't fully supported on Win64 so I've disabled threading in features/fconvblas.cc. Also, bzero is not supported in Visual C++ so I've used memset instead. Visual C++ doesn't seem to have the round() function so I've added one where needed. And finally, when compiling libsvm in MATLAB on Windows the object files have a .obj extension and not .o so the libsvm_compile.m script had to be modified.

Note: I've not done any tests on the correctness of these changes, but they do pass all the tests from test_compiled() in esvm_compile.m. Also, removing the threading from features/fconvblas.cc impacts the speed and scalability of the code.

The fork can be found here: https://github.com/bjorgvino/exemplarsvm-win64

from exemplarsvm.

quantombone avatar quantombone commented on July 16, 2024

Thanks a lot for looking into this!

from exemplarsvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.