• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Python
  • License
    BSD 2-Clause "Sim...
  • Created over 10 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A thin Cython wrapper around select areas of vlfeat

cyvlfeat

A Python (cython) wrapper of the VLFeat library

We intend for this to be a light wrapper around the VLFeat toolbox. cyvlfeat will provide a mixture of pure Python and Cython code that looks to replicate the existing Matlab toolbox. Cython is intended to fulfill the role of mex files.

We respect the original BSD 2-clause license and thus release this wrapper under the same license.

We thank the authors of VLFeat for their contribution to the computer vision community.

Current State

At the moment, the following methods from vlfeat are exposed:

  • fisher
    • fisher
  • generic
    • set_simd_enabled, get_simd_enabled, cpu_has_avx, cpu_has_sse3, cpu_has_sse2
    • get_num_cpus,
    • get_max_threads, set_num_threads, get_thread_limit
  • hog
    • hog
  • kmeans
    • kmeans
    • kmeans_quantize
    • ikmeans, ikmeans_push
    • hikmeans, hikmeans_push
  • sift
    • dsift
    • sift
    • phow

To install cyvlfeat, we strongly suggest you use conda:

conda install -c conda-forge cyvlfeat

If you don't want to use conda, your mileage will vary. In particular, you must satisfy the linking/compilation requirements for the package, which include the vlfeat dynamic library.

Development

To develop cyvlfeat (to extend its functionality), you will need to be comfortable using Cython. To begin re-implementing Matlab's mex methods in Cython, you will to install the following requirements:

  • cython >=0.22
  • numpy >= 1.9
  • vlfeat >= 0.9.20

To make this easier, we suggest you use conda. This makes installing the dependencies much simpler.

This library dynamically links against the vlfeat, and therefore you will need to ensure that it is available to the Python setup environment at build time. As mentioned, this is mostly easily done using conda:

conda install vlfeat -c conda-forge

This will install all of cyvlfeat's dependencies, including vlfeat, numpy and cython. You will likely want to install this into a new conda environment for cyvlfeat development. Please see the conda documentation for an explanation about environments.

To begin developing, you will need to git fork and clone this repository:

  • Fork using the Github fork button
  • Clone your repo: git clone [email protected]:YOUR_GITHUB_USERNAME/cyvlfeat.git
  • Add this repo as upstream: git remote add upstream [email protected]:menpo/cyvlfeat.git

You can now locally install a development version/build cyvlfeat by using:

CFLAGS="-I$CONDA_PREFIX/include" LDFLAGS="-L$CONDA_PREFIX/lib" pip install -e ./

You can also only build the Cython extensions locally using the MakeFile:

make

This will build and install a local version of cyvlfeat for your development. You can also build and test this by using conda itself (from inside the cyvlfeat git repository):

conda install conda-build
CONDACI_VERSION=VERSION_HERE conda build ./conda

You need to fill in the version number, as this is normally supplied by the continuous integration systems (CI). Usually, you want to use a number that is tagged to the git repository. For example, in bash you could use the command:

CONDACI_VERSION=`git describe --tags` conda build ./conda

For Windows, you will need to set the variable before building:

set CONDACI_VERSION=VERSION_HERE
conda build ./conda

To run the tests manually, ensure pytest is installed (conda install -c conda-forge pytest), and run

pytest -v

From inside the git repository.

To add a new feature, please start a pull request. This will also kick off the automated building systems for both Linux and Windows. I will oversee any new additions, and providing they pass on both automated build systems, will merge the new functionality in.

More Repositories

1

lsfm

Large Scale Facial Model (LSFM) - an automatic pipeline for constructing 3D Morphable Models from large collections of facial meshes
Python
503
star
2

menpo

A statistical modelling toolkit, providing all the tools required to build, fit, visualize, and test deformable models.
Python
325
star
3

itwmm

In The Wild 3D Morphable Models
Jupyter Notebook
199
star
4

menpo3d

Tools for manipulating 3D meshes within the Menpo project.
Python
166
star
5

menpofit

Menpo's 2D deformable modelling toolkit (AAMs/CLMs/SDMs)
Python
128
star
6

landmarker.io

Image and mesh annotation web application
JavaScript
114
star
7

conda-opencv3

Automated building of OpenCV3 Python bindings
Shell
54
star
8

menpodetect

Simple object detection for Menpo images
Python
24
star
9

menpo-notebooks

Examples and documentation for the menpo project.
Jupyter Notebook
16
star
10

menpobench

Standardized deformable model benchmarking
Python
11
star
11

conda-opencv

Conda build scripts for OpenCV 2.x
Shell
10
star
12

landmarkerio-server

The Menpo landmarker.io server
Python
10
star
13

conda-dlib

Conda recipe for the dlib pacakge
Python
9
star
14

cyassimp

Fast Cython bindings for the Open Asset Import Library
Python
7
star
15

landmarker-app

Desktop app landmarker.io varient based around election-shell
TypeScript
6
star
16

menpowidgets

Stores all the Jupyter notebook widgets for the Menpo Project (http://www.menpo.org/)
Python
5
star
17

cypico

A Cython wrapping of the pico face detection project.
Python
5
star
18

condaci

A simple Python script for setting up a miniconda environment on AppVeyor and Travis CI
Python
4
star
19

cyrasterize

Simple fast OpenGL offscreen rasterizing in Python
Python
3
star
20

conda-metis

Builds metis 5.1.0 using conda
C
3
star
21

conda-boost

Conda recipe for the boost library
Shell
3
star
22

lfpw-train

The trainset of Labelled Face Parts in the Wild (LFPW)
2
star
23

conda-suitesparse

Building Suite Sparse For Conda
C
2
star
24

cyffld2

Cython wrapper of ffld2
Python
2
star
25

menpocli

Command Line Interface (CLI) for the Menpo Project. Includes the menpofit command.
Python
2
star
26

menpofit-notebooks

IPython notebooks for menpofit
Jupyter Notebook
2
star
27

menpo.github.io

Next generation Menpo website based around gitbook
HTML
2
star
28

shogun

Opinionated Typed Configuration
Python
2
star
29

conda-vtk

Conda recipe for building VTK
Batchfile
2
star
30

menpo3d-notebooks

1
star
31

workerbee

Simple functional framework for embarrassingly parallel jobs
Python
1
star
32

conda-recipes

The Conda recipes for our Python packages
Shell
1
star
33

vrml97

A fork of the PyVRML97 project with a correct setup.py
Python
1
star
34

docker

Docker Images for the Menpo Project
1
star
35

conda-pcl

Shell
1
star
36

h5it

Efficient serialisation interface from ndarray-focused objects to HDF5.
Python
1
star
37

menpo.github.io-old

The menpo pages site
HTML
1
star
38

conda-mayavi

A conda recipe of mayavi that works with numpy 1.10
Batchfile
1
star
39

conda-flann

Batchfile
1
star