DBraun / PyTorchTOP

GPU PyTorch TOP in TouchDesigner with CUDA-enabled OpenCV
Other
77 stars 5 forks source link

In your other "PyTorchTOP-cpumem" you mention simple modifications to make Style Transfer work with GPU #14

Closed NairoDorian closed 3 years ago

NairoDorian commented 3 years ago

Hello!

I have used your PyTorch Style Transfer and wanted to say that's it's awesome! I bet there's a way to train your own model based on custom images but couldn't get my head around all that mess.. still a newbie but maybe you could give me a quick direction as to where to find more information on training for a custom image.

Aso the main point is that with CPU I got low FPS, and I just see that you post this GPU version and mention that it could work for style transfer with simple modifications, could you elaborate a little more as to what modifications it is to make?

Should I try to use the .cpp code from the old repo, which files specifically?

I would not be able to estimate the amount of work needed to make it work, junior computer engineer here, just tell me which tutorial I need to read and I'll be on it ;)

Have you tried making the Style Transfer Work with GPU on your side? Have you noticed any difference in FPS compared with CPU?

Would be nice to reach 30+ FPS

Thank you so much !!!

DBraun commented 3 years ago

Hello! I'm glad the other project worked for you. I wanted to make sure I wasn't just making stuff up 😊 so I made a branch that does Style Transfer. Follow the instructions at the end of the README. It might also be helpful to look at the commit that did most of the work. I'm getting 35 FPS for 640x360 transfer on my RTX 2080. It's not a huge improvement over the "CPU" version because in both cases the style transfer computation is done on the GPU. The difference is that this version doesn't need to copy from GPU to CPU. It's a very important savings if the output texture is 4K, but in the case of a small style transfer, which is slow to begin with, it's less important.