yusuketomoto / chainer-fast-neuralstyle

Chainer implementation of "Perceptual Losses for Real-Time Style Transfer and Super-Resolution".
MIT License
803 stars 226 forks source link

[Updates][Feature requests] 6o6o and ttoinou : cropping, resampling, interruptions, folder, padding, video #25

Open ttoinou opened 8 years ago

ttoinou commented 8 years ago

6o6o forked the project with new feature for good image cropping when training, and better resampling : https://github.com/6o6o/chainer-fast-neuralstyle . I just forked this fork and added feature for saving model when interruption in train.py, and generate images for a whole folder instead of just one image in generate.py : https://github.com/ttoinou/chainer-fast-neuralstyle .

I think I'll go add some padding (expand-generate-crop) feature and another feature that divides the image in multiple blocks for low memory GPU (and then merge the results to get the big original image).

If that goes well I'll think about adapting this with https://github.com/manuelruder/artistic-videos for video with subtles changes according to the video flow.

Do you have any feature request ?

6o6o commented 8 years ago

Interesting, I've been having similar ideas. In particular, providing multiple files to generate.py to exclude model reloading on every iteration. But i'd prefer expanding the glob since it allows more flexibility in case I just want a fraction of files in a directory. Good job on using try / catch to handle corrupted files nicely. I didn't experience crashes since I was always using the COCO dataset, but for other cases it may be handy. The extra padding hack might also be useful for some people. All in all, good job and good luck with further improvements!

ttoinou commented 8 years ago

I implemented the try.catch thing because I had a corrupted image in the COCO dataset and it crashed my training.. We could use a regex to select files in a directory also. I don't like having so many forks everywhere, maybe we should merge our projects one time or another

6o6o commented 8 years ago

Hmm, I've had no problems with COCO dataset. Expanding glob would be more familiar to an average user than regex. Merging would result in some conflicts in generate.py. What's the problem with having separate forks?

rayset commented 8 years ago

throw in the end of train.py a line to upload the model to the sharing repo :100:

jokes aside really nice work guys, can't wait to get a gpu able to train some 512px models.

6o6o commented 8 years ago

Ahaha, that's a good one! But that way the repo would be quickly filled up with all sorts of #*@! :)

ttoinou commented 8 years ago

@6o6o Ok I'm not a pythoner I didn't know glob :) . I just added tiling in my fork For example 2x2 tiling : harmonia1_a 2_00017

rayset commented 8 years ago

So how big is the resolution on tour card? This implementation seems a lot less memory hungry than the others.

Mind sharing the storm model on the model report? It's quite cool.

ttoinou commented 8 years ago

I have a GTX 980 4Gb (on Windows 10, might be better on Ubuntu) and can process up to 1.1 MPx images (something like 1400x730 in 16/9 format). What is the storm model ?

rayset commented 8 years ago

I mean the model you used for that blue picture. Isn't it based on a storm ? It's impressive how little artifacts there are,tiling seems to work really well.

ttoinou commented 8 years ago

Yes ok I course but I'm gonna train a better one next week

ttoinou commented 8 years ago

Yes it's a storm sorry for not answering. The tiling is good for some images but not that good because it can't recognize shapes that are present in the whole image : in the above example at the right you can see two interpretation of the same pile of ground

ttoinou commented 8 years ago

For thoses interested in the video ! https://github.com/yusuketomoto/chainer-fast-neuralstyle/issues/70

scribblemaniac commented 8 years ago

How are you combining the tiles?

ttoinou commented 8 years ago

Just a blending of RGB channels. I thought about coding some blending preserving the edges, but I was pleased with the result of a basic blending !