<AI>Devspace

Why is the generation of deep style images so slow and resource-hungry?

clock icon
asked 3 weeks ago
message icon
2
eye icon
643

Consider these neural style algorithms which produce some art work:

Why is generating such images so slow and why does it take huge amounts of memory? Isn't there any method of optimizing the algorithm?

What is the mechanism or technical limitation behind this? Why we can't have a realtime processing?

Here are few user comments (How ANYONE can create Deep Style images):

  • Anything above 640x480 and we're talking days of heavy crunching and an insane amount of ram.

  • I tried doing a 1024pixel image and it still crashed with 14gigs memory, and 26gigs swap. So most of the VM space is just the swapfile. Plus it takes several hours potentially days cpu rendering this.

  • I tried 1024x768 and with 16gig ram and 20+ gig swap it was still dying from lack of memory.

  • Having a memory issue, though. I'm using the "g2.8xlarge" instance type.

2 Answers

It is a labor-intensive process, but that does sound excessive. If you have a g2.8xlarge, make sure you are using the using the GPU flags for neural-style, which will cut your render time by an order of magnitude.

That having been said, it is building a rather large network (depending on your parameters), and a 1024x768 image is a lot of input to work with. It will take time, but shouldn't take more than a couple hours with the GPU flag enabled correctly.

1

Write your answer here