Code for artDCGAN?


I am a complete newbie to coding and Processing and I need some help with my art project.
So I was wondering if I can make one generative digital painting based on few of my paintings
(something like this, nude portrait-GAN to be exact:
I tried following tutorials and searching through this forum but nothing seems to work for me.
All I can do is putting my paintings into Sketch Folder (with is pretty lame, I know)

For now you guys are my only hope and I would be happy if I could find here someone who tried this already or is able to help me.

This is a pretty huge topic. In fact it’s a whole field of study! Like many things in programming (and art?), there isn’t just one way to do this- that’s one of the beautiful things about code, but it can also be frustrating if you’re just trying to get started. But it also means it’s going to be a little bit difficult to give you a complete answer without pointing you to about a thousand different sources.

The best advice I can give you is to break your problem down into smaller steps and take those steps on one at a time. For example, can you create a sketch that shows a single image? Get that working perfectly before trying anything more advanced.

From there, think about exactly what you’re trying to do. A google search tells me that DCGAN (deep convolutional generative adversarial networks) is a group of advanced algorithms involved in artificial intelligence- if you’re just starting out it’s going to be pretty difficult to just dive into the deep end like this.

Instead, I’d recommend starting simpler: can you create a small program that takes a single image file and creates its own artistic version of that image?

Shameless self-promotion: here is a tutorial on dealing with image files in Processing, and here is an example that takes an image file and draws it as if it was being rendered on an old NES system.

Work forward in small steps, and if you get stuck, you can post a MCVE along with a more specific technical question. Good luck!


@ezyryder – notice that the art-DCGAN project has a pretty big requirements list – there is a lot of software that was used to make this project work.

Notice also that it involves pre-trained models. You said:

based on few of my paintings

…but I don’t think that the DCGEN method works like that – it needs a lot of examples to do what it does. For example, the DCGEN project Neural Faces uses 100,000+ – but I would guess (?) that you might hundreds at a bare minimum to get satisfactory results. If you want to make a new painting out of a few of your old paintings, you will probably need to use a different approach.

What kind of project did you have in mind? Maybe we can direct towards some ideas that won’t require you to take a university course :grin:

Hello ezyryder,

Stumbled upon your message while searching on Google for related topics…

Have you ever been able to figure out how to use the art-DCGAN neural network software?

I’ve actually implemented art-DCGAN as well as other similar art related AI scripts a number of times and may be able to provide some assistance.

In my opinion, the other replies here are all correct in that there is a lot involved. Various software required with the correct versions, then being able to use it all, etc.

Minimally, you would need to be fairly good at Linux server administration and only if you’re just looking to use the existing art-DCGAN software and not wanting to create something new.

If you’re wanting to create something new, then the comments about this being a whole field of study and needing to take a University course are sort of correct. You would need to know a lot more than just programming to do that. It’s very complex stuff to do from scratch.

Actually, art-DCGAN itself isn’t even really new for the most part, either, as it seems to be a copy/fork of dcgan.torch with a few added features.

I have this discussion set to send me notifications when there are any replies. If you want to connect regarding art-DCGAN or similar projects, reply here and I’ll check back in when I see the notification.

1 Like

I was wondering if anyone has found any programs/ repos that allow the best training results from your own images?

Hey @John2k, I’d love to discuss AI Art and your art-DCGAN experience. Been trying to set up art-DCGAN, but having trouble with the compatibility of different versions of CUDA, CUDNN, and Torch :confused: . Interested in hearing how you got it set up + what other scripts you’ve been experimenting with :slight_smile: