4
scikit learnの訓練されたクラスファクターです。 RandomForestClassifier
。分類器は、サイズのサンプルに訓練されている。 25x25。大きな画像のタイル/ウィンドウにScikitLearnクラシファイアを適用する方法
これを大きな画像(例:640x480)のすべてのタイル/ウィンドウに簡単に適用するにはどうすればよいですか?
私が行うことができますが(先に遅いコード!)である
x_train = np.arange(25*25*1000).reshape(25,25,1000) # just some pseudo training data
y_train = np.arange(1000) # just some pseudo training labels
clf = RandomForestClassifier()
clf.train(...) #train the classifier
img = np.arange(640*480).reshape(640,480) #just some pseudo image data
clf.magicallyApplyToAllSubwindoes(img)
私はimg
内のすべての25×25のウィンドウにclf
を適用することができますどのように?