im = Image.open('input.tif')
sample_dimensions = 16, 16
for box in get_all_corner_combinations(im, sample_dimensions):
    image_samples.append(im.crop(box))
classifier = YourClassifier()
classifications = []
for sample in image_samples:
    classifications.append(classifier(sample))
label = fuse_classifications(classifications)
Recognize images in Python