Given that the trained class in learning scikit, for example. a RandomForestClassifier. The classifier was trained on samples of size, for example. 25x25.
How can I easily apply this to all fragments / windows of a large image (e.g. 640x480)?
What can I do (slow code ahead!)
x_train = np.arange(25*25*1000).reshape(25,25,1000)
y_train = np.arange(1000)
clf = RandomForestClassifier()
clf.train( ... )
img = np.arange(640*480).reshape(640,480)
clf.magicallyApplyToAllSubwindoes( img )
How can I apply clfto all windows 25x25 in img?
source
share