Generate and Recognize Graphical Patterns I'd like to develop an algorithm for recognizing and generating graphical designs. As an example, consider these examples from one class:


class 1 example 2 http://185.49.85.137/Kave/up/Decorative-Leaves.jpg

Two examples from another class:




I want to detect which class the query image belong to, as well as possibly generate a new sample from the class.

Do you have any idea how this could be done?
I think deep learning comes very handy to solve such problems in these days. Simply create a convolutional neural network (CNN) architecture. Your input are the images, which are resized to one common dimension. The output is the class (type) of the image. For a CNN, this problem is rather simple and if you don't have a lot of training examples, a simple architecture such as LeNet would suffice. Of course, if you have a lot of classes, maybe a larger network (such as AlexNet) might be more appropriate. In either case, you could benefit from a large set of libraries, which are mostly coded in Python. To name a few: Tiny-DNN, Caffe, Tensorflow and Torch.