Image classification based on 2D feature motifs