cazala / synaptic

architecture-free neural network library for node.js and the browser
http://caza.la/synaptic
Other
6.92k stars 666 forks source link

Can synaptic be used to teach Prisma like effects? #123

Open cburgdorf opened 8 years ago

cburgdorf commented 8 years ago

I'm trying to get my feet wet with AI. Since there's a demo for teaching how to apply certain image filters with synaptic I thought it may be worth to explore if that could go beyond things like grayscale or glow. In particular, if it could be used to teach PRISMA like effects.

If you aren't familar with PRISMA. It's an AI backed app that turns regular pictures into art repainting them in the style of popular painters such as Van Gogh or Picasso. Checkout https://www.instagram.com/prisma/ to see for yourself.

So, naively I was thinking if I just take the original cat picture and run it through a fancy PRISMA filter and use that one instead of e.g. cat_blur.png it would learn how to repaint the image in the way of this painting style. But unfortunately it gives really poor results that don't come very close even after 5000 iterations.

So I'm wondering what would it take to teach it PRISMA like effects? Would it work if the demo would take multiple different input / output picture pairs for the learning phase? Do I need to take a completely different approach.

I would be really interested to learn how I could create this kind of thing.

olehf commented 8 years ago

Hi Christoph, Prisma is based on this paper - http://arxiv.org/pdf/1508.06576.pdf. It requires a stack of deep 2D convolutional networks. I think JS is still quite slow to achieve it in a reasonable timeframe, though it should be possible implement conv network in synaptic.

On Sun, 31 Jul 2016 at 19:56 Christoph Burgdorf notifications@github.com wrote:

I'm trying to get my feet wet with AI. Since there's a demo for teaching how to apply certain image filters with synaptic I thought it may be worth to explore if that could go beyond things like grayscale or glow. In particular, if it could be used to teach PRISMA like effects.

If you aren't familar with PRISMA. It's an AI backed app that turns regular pictures into art repainting them in the style of popular painters such as Van Gogh or Picasso. Checkout https://www.instagram.com/prisma/ to see for yourself.

So, naively I was thinking if I just take the original cat picture and run it through a fancy PRISMA filter and use that one instead of e.g. cat_blur.png it would learn how to repaint the image in the way of this painting style. But unfortunately it gives really poor results that don't come very close even after 5000 iterations.

So I'm wondering what would it take to teach it PRISMA like effects? Would it work if the demo would take multiple different input / output picture pairs for the learning phase? Do I need to take a completely different approach.

I would be really interested to learn how I could create this kind of thing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cazala/synaptic/issues/123, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUadrMnGyIwZtWG1rFgfQPDhfcHiIR0ks5qbO-9gaJpZM4JZGGT .

cburgdorf commented 8 years ago

Interesting! Thanks for the pointer. Gotta dig through that.

Jabher commented 8 years ago

Well, there's https://github.com/karpathy/convnetjs but Synaptic itself do not support Convolutional layers, you probably should implement them on tour own.