Comments (4)
--style_imgs s1.jpg s2.jpg --style_mask --style_mask_imgs m1.jpg m2.jpg
You need a mask for each style image though.
from neural-style-tf.
To recreate the last segmentation example as given in the Readme, I executed the following, which follows the pattern you mentioned above.
python neural_style.py --content_img 02270.jpg --content_img_dir examples/segmentation --style_imgs okeffe_red_canna.jpg okeffe_iris.jpg --style_imgs_dir examples/segmentation --style_mask_imgs 02270_mask_face.jpg 02270_mask_face_inv.jpg --verbose --model_weights "/xx/imagenet-vgg-verydeep-19.mat" --optimizer adam --max_iterations 1000 --print_iterations 10
(The png images were converted to jpg prior to use)
This is the associated metadata :
image_name: result
content: 02270.jpg
styles[0]: 1.0 * okeffe_red_canna.jpg
style_masks[0]: 02270_mask_face.jpg
style_masks[1]: 02270_mask_face_inv.jpg
init_type: content
content_weight: 5.0
style_weight: 1000.0
tv_weight: 0.001
content_layers: ['conv4_2']
style_layers: ['relu1_1', 'relu2_1', 'relu3_1', 'relu4_1', 'relu5_1']
optimizer_type: adam
max_iterations: 1000
max_image_size: 512
I am unable to upload result here. Only one style image is being used for stylization.
from neural-style-tf.
Hi njordsir,
I think you need to add the flag --style_mask
. I should remove that and just check if the length of the style mask images list is >0.
Cam
from neural-style-tf.
Adding the --style_mask
flag and setting the blending weights as --style_imgs_weights 0.5 0.5
generated the desired result.
Maybe the blending weights could be equally distributed among all style images instead of the current default of 1.0
, unless otherwise specified.
Thanks for the very well-written code and your help.
from neural-style-tf.
Related Issues (20)
- render_video() queries if the current frame == 1 instead of querying the arguments for the start_frame
- Issue running neuralstyle. Possibly issue with tensorflow PATH environment
- is it possible to store intermediate results? HOT 2
- Numeric instability on linux when using lbfgs, minimization does not converge.
- image quality issue and blurryness at edges of images in semantic segmentation HOT 2
- pool_layer
- Not supported with tensorflow 2+ HOT 8
- resume video styling HOT 8
- select GPU on multi GPU system
- Computing optical flow [CPU]. This will take a while... HOT 1
- could not load librart cudnn_ops_infer64_8.dll .error code 126 HOT 1
- I can't find how to use the weight settings? HOT 5
- Issues running on Windows 10: HOT 1
- Performance issue in neural_style.py (by P3) HOT 1
- How can I save iterations as images?
- Consistency checker makefile not found. HOT 2
- TF2 Migration, issue with L-BFGS-B HOT 1
- I, a wintard doesn't know how to use Bash // please help
- T
- did not work for cpu? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neural-style-tf.