There’s a neural network framework called pix2pix
[http://t.umblr.com/redirect?z=https%3A%2F%2Fgithub.com%2Fphillipi%2Fpix2pix&t=YjUyMzc2NTM3ZDcxOTg5MjBhNmEzZWI4N2M3MGY3ODA5ZDYzY2I0Mix6RWxsUk1ieA%3D%3D&b=t%3AIinBpZOgiMHH_bphj7hrOQ&p=http%3A%2F%2Flewisandquark.tumblr.com%2Fpost%2F159654519362%2Ffun-with-a-neural-net-that-transforms-line&m=1]
that can be trained to
