Giter Club home page Giter Club logo

Comments (2)

usptact avatar usptact commented on May 18, 2024

I was able to build VLFeat manually.

First you need to build the libvl.dylib dynamic library (note we are disabling AVX, SSE2 since it is not on Apple Silicon):

$ cd {project_root}/vl
$ gcc -dynamiclib -fPIC -DVL_DISABLE_AVX -DVL_DISABLE_SSE2 -o libvl.dylib *.c

Then you can build C/C++ programs using the library. For example, the tools in the {project_root}/src.

$ cd {project_root}/src
$ gcc -I{project_root} -L{project_root}/vl -lvl aib.c -o aib
$ ./aib
./aib                                                                                                                                                                                ─╯
Pic = [0.681300 0.302800 0.821600 ; ...
0.379500 0.541700 0.644900 ; ...
0.831800 0.150900 0.818000 ; ...
0.502800 0.697900 0.660200 ; ...
0.709500 0.378400 0.342000 ; ...
0.428900 0.860000 0.289700 ; ...
0.304600 0.853700 0.341200 ; ...
0.189700 0.593600 0.534100 ; ...
0.193400 0.496600 0.727100 ; ...
0.682200 0.899800 0.309300 ; ...
];
AIB starting
0 => 13
1 => 10
2 => 13
3 => 10
4 => 16
5 => 11
6 => 11
7 => 12
8 => 12
9 => 14
10 => 15
11 => 14
12 => 15
13 => 16
14 => 17
15 => 17
16 => 18
17 => 18
18 => 0
IB done

Make sure libvl.dylib is in the same directory or is in the DYLD_LIBRARY_PATH environment variable.

The compiler I used:

gcc --version                                                                                                                                                                        ─╯
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Pretty sure the project can be converted to a nice and simple CMake project. Maybe I will do it one day.

from vlfeat.

usptact avatar usptact commented on May 18, 2024

There's something wrong with basic vl_* data types when on Apple Silicon.

Running sift utility on a sample PGM file, I am getting obviously wrong image size information:

./sift -v hi.pgm                                                                                                                                                                     ─╯
sift: <== 'hi.pgm'
sift: image is 9751594488 by 9751594912 pixels
sift: err: Could not allocate enough memory. (2)

My hi.pgm image file size is 30 x 15 pixels.

from vlfeat.

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.