All Projects → slowy07 → neuralPainting

slowy07 / neuralPainting

Licence: MIT License
neural painting with pytorch implementation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to neuralPainting

elm-generative
Making generative art in Elm
Stars: ✭ 23 (-62.9%)
Mutual labels:  art
text2painting
Convert text into beautiful artistic images
Stars: ✭ 55 (-11.29%)
Mutual labels:  art
upstage
UpStage is a platform for cyberformance: remote players combine digital media in real-time for an online audience. All you need is a web browser!
Stars: ✭ 14 (-77.42%)
Mutual labels:  art
Acid.Cam.v2.OSX
Acid Cam v2 for macOS distorts video to create art.
Stars: ✭ 91 (+46.77%)
Mutual labels:  art
pixelino
Pixel-drawing app for iOS ✍️
Stars: ✭ 45 (-27.42%)
Mutual labels:  art
staticfuzz
Memories which vanish
Stars: ✭ 15 (-75.81%)
Mutual labels:  art
Pix
🎨 Pix is an online pixel art community where everyone can unleash their creativity on a 16x16 canvas, built with React-Native for iOS devices. 🚀
Stars: ✭ 86 (+38.71%)
Mutual labels:  art
quadart
Python module for producing quad-tree art
Stars: ✭ 33 (-46.77%)
Mutual labels:  art
droste-creator
Create recursive images with the droste effect.
Stars: ✭ 27 (-56.45%)
Mutual labels:  art
Binarify
Convert Images to Binary Art!
Stars: ✭ 15 (-75.81%)
Mutual labels:  art
durdraw
Animated Unicode, ANSI and ASCII Art Editor for Linux/Unix/macOS
Stars: ✭ 55 (-11.29%)
Mutual labels:  art
multiverse
Adobe Photoshop scripts for making generative art
Stars: ✭ 21 (-66.13%)
Mutual labels:  art
random color
⚙️🎨 Rust crate for generating random attractive colors
Stars: ✭ 30 (-51.61%)
Mutual labels:  art
DrawBot
Repository for DrawBot. The Discord Art bot!
Stars: ✭ 11 (-82.26%)
Mutual labels:  art
gb-convert
Gameboy tile conversion and map editor tool
Stars: ✭ 26 (-58.06%)
Mutual labels:  art
macuahuitl
The "Macuahuitl" Generative Art Toolbox
Stars: ✭ 68 (+9.68%)
Mutual labels:  art
arboles
Mapa de Arbolado Urbano
Stars: ✭ 13 (-79.03%)
Mutual labels:  art
interactive-pixelator
🌇 🌃 upload image and make interactive pixel art 🕹
Stars: ✭ 22 (-64.52%)
Mutual labels:  art
art
Exploring the connections between artworks with deep "Visual Analogies"
Stars: ✭ 73 (+17.74%)
Mutual labels:  art
ofxOilPaint
An oil painting simulation addon for openFrameworks
Stars: ✭ 45 (-27.42%)
Mutual labels:  art

neuralPainting

gif_image

repo_size python_build license pytorch scikitlearn

live demo and say thanks

googleColab googleColab thanks

paper

artistic image painting using artificial intelligence - Arfy Slowy

how use my photos

you can save at style_images (example image on this folder) or create custom path

image on demo

download one of pretrained neural renderers from google drive

(my) requirement testing

ryzen nvdia_gtx linux

i'm using training on computer with 8 core of CPU AMD ryzen 7 4800H and 16GB memory. so, i had to take into consideration computational complexity and memory limitations.i've tried several gpu devices with low memory, and some worked and some didn't work, you can try it and give your feedback by posting on the issue

testing

unzip checkpoints_G_oilpaintbrush.zip
unzip checkpoints_G_rectangle.zip
unzip checkpoints_G_markerpen.zip
unzip checkpoints_G_watercolor.zip

We have also provided some lightweight renderers where users can generate high-resolution paintings on their local machine with limited GPU memory. Please feel free to download and unzip them to your repo directory

unzip checkpoints_G_oilpaintbrush_light.zip
unzip checkpoints_G_rectangle_light.zip
unzip checkpoints_G_markerpen_light.zip
unzip checkpoints_G_watercolor_light.zip

to produce the result

progressive rendering

python3 demo_prog.py --img_path ./test_images/apple.jpg --canvas_color 'white' --max_m_strokes 500 --max_divide 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush --net_G zou-fusion-net

progressive rendering with lightweight (with lower GPU memmory and faster speed)

python3 demo_prog.py --img_path ./test_images/apple.jpg --canvas_color 'white' --max_m_strokes 500 --max_divide 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush_light --net_G zou-fusion-net-light

rendering directly from mxm image grids

python3 demo.py --img_path ./test_images/apple.jpg --canvas_color 'white' --max_m_strokes 500 --m_grid 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush --net_G zou-fusion-net

progressive rendering

python3 demo_prog.py --img_path ./test_images/diamond.jpg --canvas_color 'black' --max_m_strokes 500 --max_divide 5 --renderer markerpen --renderer_checkpoint_dir checkpoints_G_markerpen --net_G zou-fusion-net

progressive rendering with lightweight (with lower GPU memmory and faster speed)

python3 demo_prog.py --img_path ./test_images/diamond.jpg --canvas_color 'black' --max_m_strokes 500 --max_divide 5 --renderer markerpen --renderer_checkpoint_dir checkpoints_G_markerpen_light --net_G zou-fusion-net-light

rendering directly from mxm image grids

python3 demo.py --img_path ./test_images/diamond.jpg --canvas_color 'black' --max_m_strokes 500 --m_grid 5 --renderer markerpen --renderer_checkpoint_dir checkpoints_G_markerpen --net_G zou-fusion-net

network architecture

We build our shading network similiar to Deep Convolutional Generative Adversarial Network (DCGAN), which consist of six transposed conv layers. We remote Tanh activation from the output layer and observe a better convergence. In from the output layer and observe a better convergence.

details configurations of neural renderer

details of shading network

Layers Config Out size
C1 Deconv + BN + ReLU 512 x 4 x 4 / 1 4 x 4 x 512
C2 Deconv + BN + ReLU 512 x 4 x 4 / 2 8 x 8 x 512
C3 Deconv + BN + ReLU 256 x 4 x 4 / 2 16 x 16 x 256
C4 Deconv + BN + ReLU 128 x 4 x 4 / 2 32 x 32 x 128
C5 Deconv + BN + ReLU 64 x 4 x 4 / 2 64 x 64 x 64
C6 Deconv + BN + ReLU 3 x 4 x 4 / 2 128 x 128 x 3

rasterization network

Layers Config Out size
F1 Full-connected + ReLU 512 512
F2 Full-connected + ReLU 1024 1024
F3 Full-connected + ReLU 2048 2048
F4 Full-connected + ReLU 4096 3096
V1 View - 16 x 16 x 16
C1 Conv + ReLU 32 x 3 x 3 / 1 16 x 16 x 32
C2 Conv + Shuffle 32 x 3 x 3 / 2 32 x 32 x 8
C3 Conv + ReLU 16 x 3 x 3 / 1 32 x 32 x 16
C4 Conv + shuffle 16 x 3 x 3 / 2 64 x 64 x 4
C5 Conv + ReLU 8 x 3 x 3 / 1 64 x 64 x 8
C6 Conv + Shuffle 4 x 3 x 3 / 2 128 x 128 x1

high resolution result

since our painting result are generated with a vector format, we can render them at any resolutions. we show group rendered on high resolution

hig_resolution_photo

a high resolution neural style transfer result of our method (picasso style transfer).

training details

we train our renderer by using adam optimizer. We set batch size 64, learning rate 2e-4 and beats to (0.9, 0.999). we reduce the learning rate to this 1/10 every 100 epochs and stop training after 400 epochs. in each epochs we randomly generate 50.000 x 64 ground truth strokes using a vector engine. we set rendering output size 128 x 128 pixels. we train rederers separately for each stroke type

compare with other neural renderers

rasterization network and shading artwork

Renderer / stroke oil paint watercolor
our (rasterization only) 24.015 25.769
our (shading only) 26.048 29.045
our (rasterization + shading) 26.982 31.389

conclusion

We explore the nature of human painting using differentiable stroke rendering. We consider this artistic creation process under a stroke parameter searching paradigm that maximizes the similarity between the sequentially rendered canvas and the reference image. our method can be generate highly realistic and paintings artworks in vector format with controllable styles. we deal the image similarity measurement from the prespective of optimal transportation and tackle the disentanglement of color and shape with dual-pathway neural renderer. controlled experiments suggest the effectiveness of our design.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].