LoginSignup
10
13

More than 3 years have passed since last update.

PythonでGIST特徴量によるシーン認識

Last updated at Posted at 2015-04-28

numpy, scipy, scikit-learn, scikit-imageといったライブラリを擁するPythonは
機械学習屋さん,CV屋さん御用達言語ですが,
これらを使ってシーン認識するために,
Cで書かれたGIST特徴量抽出ライブラリのPythonラッパーを作りました.

GIST 特徴量

A. Torralbaが開発した特徴量でシーン認識に向いていると言われています.
Deep Learning全盛の今,今更感ありますが,手軽に試せるので今回使いました.
http://people.csail.mit.edu/torralba/code/spatialenvelope/

Lear's GIST implementation

GIST特徴量のC実装です.
今回はこれのPythonラッパーを作りました.
http://lear.inrialpes.fr/software

lear-gist-python

今回書いたラッパーです.
こちらです:https://github.com/tuttieee/lear-gist-python

こんな感じで使えます.

import gist
import numpy as np

img = ... # numpy array containing an image
descriptor = gist.extract(img)

上記A. Torralbaのサイト( http://people.csail.mit.edu/torralba/code/spatialenvelope/ )で公開されている8シーンデータセット(これも今更…笑)を使った認識のサンプルもあります.

その他

初めてPythonのC拡張を書きました.
指摘などあればコメントをお願いします.

10
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
13