lengstrom / fast-style-transfer

TensorFlow CNN for fast style transfer ⚡🖥🎨🖼
10.91k stars 2.6k forks source link

Questions about hardware, before installation. #173

Open juisex opened 5 years ago

juisex commented 5 years ago

Hello, I've started Style Transfer research by my own since August, I'm using actually Neural Doodle (semantic style transfer) from my notebook with Ubuntu 18.04 Did you think the Fast Style Transfer will work in a: i7 2630QM GTX M460?

Edit: Can I use my "neural doodle trained cache" in fast style transfer? I'm very new with program languages, I used to be a mixed media painter/illustrator before to addict style transfer. :D

Greetings.

JEF1056 commented 5 years ago

Fast style transfer is based on the concept of training a network with a style image on many content images and "adding" the new biases from each content image it was trained on to one another. This way, it forms a pattern, "style", that can hopefully be applied to new images it's never been trained on.

While I can say, yes, evaluating the pre-trained models on your CPU/GPU will be ok, I don't suspect you can train a complete fast-style transfer model on your computer just yet (however, even models trained 1/6 of the way are actually usable), until saving/restoring is added on. A Tesla P80 can complete a full training cycle of 2 epochs in under 6 hours, and a TPU can complete a full training cycle under 4 hours. Please expect your training to take significantly longer.

While I'm not sure what a "neural doodle trained cache" is, (I'm going to assume it's a folder with trained models) I will assert that saved checkpoints from other algorithms will not work with this repo. It would be like putting a cube into a circular hole.

I wish you the best of luck ^-^

juisex commented 5 years ago

Thanks for your answer, Since when I've installed the neural-doodle, the samples from the creator with a GTX 1080 I guess was generated in 3/8 minutes, I've got 4 hours at my first one, I'm completely sure my computer will spend much more time than a decent machine. but now a little questions appears for me whats a "models trained 1/6 of the way are actually usable"? It's about the cycles? In neural-doodle (I've got this here: https://github.com/alexjc/neural-doodle as a alternative for style-transfer, I've got stucked in a part that the drivers was conflictin' with my system) I generate a cycle with 100 interactions, then 200, 300 and it goes until 800/1000, depending of the model, at fast-style-transfer the same logic can be applied?

JEF1056 commented 5 years ago

in Fast-Style-Transfer, you can "checkpoint" at intervals. A full epoch is about 60000 iterations (with a batch size of 1), and there are 2 epochs by default.
Below is a GIF showing intervals of training every 6000 iterations, but I only got through (I think) 5 or 6 checkpoints before I ended training. As you can see by the last frame, that result is already "usable" (it's already developed the pattern from the original image)

juisex commented 5 years ago

Thanks for the explanation, this gave me a great dimension of how much time my system will delay to process styles. I'm from Brazil and actually living here, hardware here is expensive as hell, but the sky is the limit! lol