cysmith / neural-style-tf

TensorFlow (Python API) implementation of Neural Style
GNU General Public License v3.0
3.11k stars 831 forks source link

resume video styling #112

Open bartman081523 opened 3 years ago

bartman081523 commented 3 years ago

the processing of video frames with "--video" takes very long. when the stylng interrupts, and i try to resume, the styling will restart from frame 1.

i tried to continue the processing with e.g. "--first-frame 100" and "--first_frame_type prev_warp" but "--first_frame_type" does not accept "prev_warp" as an parameter.

how can i resume the processing of video frames at e.g. frame 100, when i already processed frame 1 to 99? should i try just with "--first-frame 100"?

frostbitten commented 3 years ago

Hi @chlorophyll-zz , you might be interested in my fork. It handles resuming stylization and some other helpful features.
https://github.com/ArtShows/neural-style-tf Constantly trying to improve it, feel free to request features!

bartman081523 commented 3 years ago

Hi @frostbitten thank you, i will have a look.

aertist commented 3 years ago

Hi @chlorophyll-zz , you might be interested in my fork. It handles resuming stylization and some other helpful features. https://github.com/ArtShows/neural-style-tf Constantly trying to improve it, feel free to request features!

"Computing optical flow [CPU]. This will take a while..." its literally taking forever to render even 1st frame at this step. How to map this thing so it uses gpu? 😐 https://colab.research.google.com/drive/1ZDPk5BJKHv-CqYDbsxskai2YNbpALeSn?authuser=1#scrollTo=U-9wObFA_jIk

im running this in colab. and im using a GPU runtime

frostbitten commented 3 years ago

For the stylization, you'll need to specify a gpu as an argument: --gpu 0 or --gpu 1 (if you have a second gpu and want to target it). Feel free to open an issue in the fork's project page.

For the optical flow, you're stuck with cpu. I don't go higher than 720 pixels on the longest edge of the input media otherwise it takes way too long to compute the optical flow.

Also, stylizing a high resolution image doesn't produce great results. Better to look into a multi-resolution technique.

aertist commented 3 years ago

How to skip this optical flo part ? is there any way?

can you make a YT tutorial on this this whole style transfer thing?

frostbitten commented 3 years ago

@aertist after the style argument add: skipflow You can also skip the render (helpful for running multiple jobs). To do this, instead of the style put skiprender

I have been asked about doing a tutorial video before and it's definitely on on my to-do list. There's some more updates I want to make for the project before I do that, though.

aertist commented 3 years ago

Waiting for it 💪🏼 Drop your YT link so i can subscribe 👌🏼

frostbitten commented 3 years ago

@aertist don't expect the tut anytime soon but there's at least some examples of my style transfers for now: https://www.youtube.com/channel/UCQ9xF4T6lB7GnsfpnT2HSog Cheers!