Weakly-supervised Discovery of Visual Pattern Configurations