voc-release5 FAQ

  1. Q: When I compile voc-release5 on OS X 10.8 with XCode 4.5 I get a bunch of nasty C++ error messages ending with

      ...
      std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]' but no definition available
      
    How do I fix this?

    A: Edit your mexopts.sh file and set

      MACOSX_DEPLOYMENT_TARGET='10.7'
      
    Also, make sure to change your SDKROOT if needed (see: http://www.mathworks.com/support/solutions/en/data/1-FR6LXJ/).

  2. Q: Can I train models with my own dataset?

    A: It is possible to train models using your own dataset. I recommend taking a look at pascal_data.m, which defines the function that we use for loading the PASCAL data into the internal data structures used by our code. To support your own data, you will need to define your own function that reads in your positive and negative examples and returns the same data structures as the function pascal_data().

  3. Q: When I compile voc-release5 on a 32-bit machine I get a bunch of errors. What's up with that?

    Example error message:

      /usr/include/c++/4.2/bits/stl_deque.h: In member function 'void std::deque<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int, _Tp = double*, _Alloc = std::allocator]':
      /usr/include/c++/4.2/bits/stl_deque.h:733:   instantiated from 'std::deque<_Tp, _Alloc>::deque(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = int, _Tp = double*, _Alloc = std::allocator]'
      model.h:94:   instantiated from here
      /usr/include/c++/4.2/bits/stl_deque.h:1229: error: invalid conversion from 'int' to 'double*'
      /usr/include/c++/4.2/bits/stl_deque.h:1229: error:   initializing argument 1 of 'void std::deque<_Tp, _Alloc>::_M_fill_initialize(const _Tp&) [with _Tp = double*, _Alloc = std::allocator]'
    
      mex: compile of ' "fv_cache.cc"' failed.
      

    A: At the moment the code does not support 32-bit platforms. (I do not presently have access to a 32-bit environment for debugging and testing.)

  4. Q: When I compile voc-release5 on OS X with MATLAB >= 2013a I get an error regarding OpenMP. What's up with that?

    Example error message:

        clang: warning: argument unused during compilation: '-fopenmp'
        fv_cache/fv_cache.cc:5:10: fatal error: 'omp.h' file not found
        #include 
      

    A: Starting with MATLAB 2013a on OS X compiler support was shifted from XCode with GCC to XCode with Clang. Clang does not yet support OpenMP, hence the error message above. It appears that you can simply edit your mexopts.sh and force mex to use GCC instead of Clang. I don't have 2013a yet and haven't tested this extensively, YMMV.

      change: CC='xcrun -sdk macosx10.7 clang'
      to:     CC='llvm-gcc'
    
      change: CXX='xcrun -sdk macosx10.7 clang++'
      to:     CXX='llvm-g++'