私は一連の写真を取得し、それらを分類する必要があるという問題があります。イメージをクラスに分類する
実際には、私はこれらの画像について全く知っていません。だから私は見つけることができるように多くのディスクリプタを使用し、それらに私に使用されているディスクリプタのみを識別するためのPCAを実行することを計画しています。
多くのデータポイントで教師なし学習をすることができます。しかし、画像同士がつながっている可能性があります。画像Xから画像X + 1への展開があるかもしれないことを意味しますが、私はちょうどこれが各画像の情報で整理されることを願っています。
私の質問は以下のとおりです。Pythonのを使用しているとき
- がどのように私はこのベストを尽くしていますか? (私はスピードが問題ではない最初の概念の証明をしたい)。どのライブラリを使うべきですか?
- すでに画像の例がありますか?そのような種類の分類はありますか?ディスクリプタの束を使ってPCA経由で調理する例?正直言って、この部分は私にとっては恐ろしいことです。私はPythonはすでに私のためにこれのような何かを行う必要がありますが。
編集: 私は、私は現在、このためにアウトしようとしているきちんとしたキットを発見した:http://scikit-image.org/そこにはいくつかの記述子があるように思われます。自動的な特徴抽出を行い、対象分類に対する記述力に応じて特徴をランク付けする方法はありますか? PCAは自動的にランク付けすることができます。
編集2: データの保存のためのフレームワークがもう少し洗練されています。私はFatシステムをデータベースとして使用します。私は、クラスの組み合わせのインスタンスごとに1つのフォルダを持っています。したがって、画像がクラス1と2に属している場合、それらの画像を含むフォルダimg12が存在します。この方法で、私は各クラスのデータ量をより適切に制御できます。
編集3: 私は何をしたいのか何かを行うpythonのlibary(sklearn)の例を見つけました。それは手書きの数字を認識することです。私は自分のデータセットを私がこれで使うことができるものに変換しようとしています。
import pylab as pl
# Import datasets, classifiers and performance metrics
from sklearn import datasets, svm, metrics
# The digits dataset
digits = datasets.load_digits()
# The data that we are interested in is made of 8x8 images of digits,
# let's have a look at the first 3 images, stored in the `images`
# attribute of the dataset. If we were working from image files, we
# could load them using pylab.imread. For these images know which
# digit they represent: it is given in the 'target' of the dataset.
for index, (image, label) in enumerate(zip(digits.images, digits.target)[:4]):
pl.subplot(2, 4, index + 1)
pl.axis('off')
pl.imshow(image, cmap=pl.cm.gray_r, interpolation='nearest')
pl.title('Training: %i' % label)
# To apply an classifier on this data, we need to flatten the image, to
# turn the data in a (samples, feature) matrix:
n_samples = len(digits.images)
data = digits.images.reshape((n_samples, -1))
# Create a classifier: a support vector classifier
classifier = svm.SVC(gamma=0.001)
# We learn the digits on the first half of the digits
classifier.fit(data[:n_samples/2], digits.target[:n_samples/2])
# Now predict the value of the digit on the second half:
expected = digits.target[n_samples/2:]
predicted = classifier.predict(data[n_samples/2:])
print("Classification report for classifier %s:\n%s\n"
% (classifier, metrics.classification_report(expected, predicted)))
print("Confusion matrix:\n%s" % metrics.confusion_matrix(expected, predicted))
for index, (image, prediction) in enumerate(
zip(digits.images[n_samples/2:], predicted)[:4]):
pl.subplot(2, 4, index + 5)
pl.axis('off')
pl.imshow(image, cmap=pl.cm.gray_r, interpolation='nearest')
pl.title('Prediction: %i' % prediction)
pl.show()
これまでに何を試しましたか?何人かの努力相手を示してください。 –
私はこれまでのところ達成したものを編集します。 – tarrasch