kaishengtai / neuralart Goto Github PK
View Code? Open in Web Editor NEWAn implementation of the paper 'A Neural Algorithm of Artistic Style'.
License: MIT License
An implementation of the paper 'A Neural Algorithm of Artistic Style'.
License: MIT License
Optimization result turns to be all zero after second iteration.
I followed the steps and installed everything you've listed, but I'm not able to run it in GPU mode (which will be much faster, right?). It said this when I tried to run it:
qlua: main.lua:40: module 'cutorch' not found:
no field package.preload['cutorch']
no file '/Users/boleidi/.luarocks/share/lua/5.1/cutorch.lua'
no file '/Users/boleidi/.luarocks/share/lua/5.1/cutorch/init.lua'
no file '/Users/boleidi/torch/install/share/lua/5.1/cutorch.lua'
no file '/Users/boleidi/torch/install/share/lua/5.1/cutorch/init.lua'
no file './cutorch.lua'
no file '/Users/boleidi/torch/install/share/luajit-2.1.0-alpha/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch/init.lua'
no file '/Users/boleidi/.luarocks/lib/lua/5.1/cutorch.so'
no file '/Users/boleidi/torch/install/lib/lua/5.1/cutorch.so'
no file './cutorch.so'
no file '/usr/local/lib/lua/5.1/cutorch.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: at 0x01025bd1d0
[C]: in function 'require'
main.lua:40: in main chunk
It did run in cpu mode.
Here's my graphic card model: NVIDIA GeForce GT 750M 2048 MB
And I just installed CUDA 7.5
Could you help figure out where the problem is?
I really want (and, apparently, half the internet) to mess with this program and make some stuff, but there's too much of a learning curve to install it on a Windows computer... :C
When trying to generate images with more than 2000px width it just crashes with the message "Segmentation fault (core dumped)". When it doesn't have enough memory it usually says something "Get more RAM" - but this time it doesn't.
I'm using a configuration with 244GB RAM so I hope it's quite enough. I also tried source/style images 800px, 1000px, 1500px and 3000px - it doesn't make a difference, the same crash.
I was able to generate images with less than 2000px with on the same config.
It would be nice to have CPU support, as the memory requirements are quite huge, preventing us to train larger images (I have a GTX 965M with 2 GB and I can't train images larger than 480 px).
I know it will be much slower, but at least it will be possible to train larger images. Besides that, It will also allow people without a GPU to try it.
Do you think this is possible?
This is as far as I get.
git clone https://github.com/kaishengtai/neuralart
cd neuralart
chmod 775 *
sudo apt-get install luarocks
./download_models.sh
sudo luarocks install inn
pi@raspberrypi:~/neuralart-master $ sudo luarocks install inn
Warning: Failed searching manifest: Failed fetching manifest for https://rocks.moonscript.org - Failed downloading https://rocks.moonscript.org/manifest
Warning: Failed searching manifest: Failed fetching manifest for https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/ - Failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest
Warning: Failed searching manifest: Failed extracting manifest file
Warning: Failed searching manifest: Failed extracting manifest file
Error: No results matching query were found.
closed...
hello,
i installed torch 7 but when doing luarocks install inn i get following error
i'm on os x 10.10.5
MacBook Pro (Retina, 15-inch, Mid 2014)
NVIDIA GeForce GT 750M 2048 MB
thanks,
r
-- Found Torch7 in /Users/xx/torch/install
CMake Error at /usr/local/Cellar/cmake/3.4.3/share/cmake/Modules/FindCUDA.cmake:617 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:7 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_cutorch-scm-1-8411/cutorch/build/CMakeFiles/CMakeOutput.log".
Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/cunn-scm-1.rockspec - Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/cutorch-scm-1.rockspec - Build error: Failed building.
I'm a bit lost to understand how to train/fine-tune a deep model based on the proposed loss function in Eqn. (7) in the original paper. Is it like the training process only involves two images (one is for content and the other is for style) and fine-tune the existing model to update the weights of the convolutional layers? If so, how many iterations are needed in general to produce the final results (i.e., reconstructed images from different convolutional layers)?
Thanks very much in advance.
sudo luarocks install inn
Error: No results matching query were found.
I cant use luarocks to install inn or loadcaffe that mentions in https://github.com/jcjohnson/neural-style
I get this error. When i try sudo luarocks install qt
, I get Error: No results matching query were found.
. What's wrong?
I'm trying to make this run on an Ubuntu VM, and I get a no CUDA-capable device is detected
error. Is there any way to not use the GPU?
It would be good if the style_factor
and smoothness
arguments where normalized so that they give the same effect for different output sizes.
E.g. --style_factor 5.0 --size 500
and --style_factor 5.0 --size 2000
would give approximately the same results.
This seems to be caused by line 14 of inception.lua - cudnn.SpatialCrossMapLRN doesn't exist.
Example:
$ th main.lua --style a.jpg --content b.jpg --backend cudnn --model inception --optimizer sgd
using cudnn backend
/home/michal/rnn/torch/install/bin/luajit: /home/michal/rnn/neuralart/models/inception.lua:56: attempt to call local 'lrn' (a nil value)
stack traceback:
/home/michal/rnn/neuralart/models/inception.lua:56: in function 'create_inception'
main.lua:84: in main chunk
[C]: in function 'dofile'
.../rnn/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x00405ea0
Hi, I'd like to use this code in another open source project, but it currently doesn't have a license. Can you add one?
I'm trying to run the software from command line on an AWS instance. Do I need X and a GUI in order to use it? I'm getting the following error:
ubuntu@ip-172-31-28-145:~/neuralart$ qlua main.lua --style style/monet.jpg --content examples/halfdome.jpg
Unable to connect X11 server (continuing with -nographics)
Using cunn backend
qlua: not loading module qtgui (running with -nographics)
qlua: qtwidget window functions will not be usable (running with -nographics)
qtwidget window functions will not be usable (running with -nographics)
qlua: not loading module qtuiloader (running with -nographics)
qlua: /home/ubuntu/torch/install/share/lua/5.1/image/init.lua:1321: attempt to index global 'qtuiloader' (a nil value)
stack traceback:
[C]: in function '__index'
/home/ubuntu/torch/install/share/lua/5.1/image/init.lua:1321: in function 'window'
/home/ubuntu/torch/install/share/lua/5.1/image/init.lua:1276: in function 'display'
main.lua:183: in main chunk
Thanks for making the code available, and great work!
Maybe try our normalised VGG network for better results: https://bethgelab.org/deepneuralart/
Best
Leon
Can you please recommend a luarock server to pull the inn and other dependencies from? http://www.luarocks.org/repositories/rocks/ does not appear to host them?
Thanks!
Hi,
I'm sorry for creating a issue just for a question. Could you tell me how to train the model (VGG or Inception) with my own dataset? I tried the trained models with anime style but output images did not look so nice.
Hi, I'm trying to run your software against images the same size as your example images, but I'm getting:
qlua: ...de/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:110: cuda runtime error (2) : out of memory at /tmp/luarocks_cutorch-scm-1-664/cutorch/lib/THC/THCStorage.cu:44
Any ideas how to resolve? Thanks!
Hi,
This is very cool tech! I was curious if any thought had been put into how to make this approach to scale to higher resolutions; either by a CPU implementation or better yet have it work across multiple GPUs.
If you have any insight please let me know.
Thanks,
Michael
Hi,
I manage to download everything. I use macOSx with cpu and everything run just fine but after the 500th iteration, nothing happens.I now have 20 iterations previews (pictures). Is the last one the final product or is there a final rendering or something ?
thanks a lot for your help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.