-
Notifications
You must be signed in to change notification settings - Fork 1
/
multires_seg_large_cp.sh
128 lines (110 loc) · 5.98 KB
/
multires_seg_large_cp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This variant of multires uses this modified version of Neural-Style: https://gist.github.com/ProGamerGov/bcbd27a3d2e431adb73ef158d9990d93
# You can download it via:
# wget https://gist.githubusercontent.com/ProGamerGov/bcbd27a3d2e431adb73ef158d9990d93/raw/1e7ecd1c9aecaead0d92e3eb0027baa3fa2c4f31/neural_style_seg.lua
# The channel prunning can be donwloaded via:
# wget https://github.com/yihui-he/channel-pruning/releases/download/channel_pruning_5x/channel_pruning.caffemodel
# wget https://github.com/yihui-he/channel-pruning/releases/download/channel_pruning_5x/channel_pruning.prototxt
CONTENT_IMAGE=content_image.jpg
STYLE_IMAGE=style_image.png
CONTENT_MASK=content_mask.jpg
STYLE_MASK=style_mask.png
INTERPRETER=th
NEURAL_STYLE=neural_style_seg.lua
# Remove color(s) not used in the content mask
COLOR_CODES="blue,green,black,white,red,yellow,grey,lightblue,purple"
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 500 -print_iter 50 -init image -backend cudnn -cudnn_autotune \
-output_image out1.png \
-image_size 640 \
-num_iterations 1500
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out1.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 500 -print_iter 50 -init image -backend cudnn -cudnn_autotune \
-output_image out2.png \
-image_size 768 \
-num_iterations 1000
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out2.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -backend cudnn -cudnn_autotune \
-image_size 1024 \
-num_iterations 500 \
-output_image out3.png \
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out3.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -backend cudnn -cudnn_autotune \
-image_size 1152 \
-num_iterations 200 \
-output_image out4.png \
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out4.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -backend cudnn -cudnn_autotune \
-image_size 1536 \
-num_iterations 200 \
-output_image out5.png \
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out5.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 1664 \
-num_iterations 200 \
-output_image out6.png \
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out6.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 1920 \
-num_iterations 200 \
-output_image out7.png
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out7.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 2048 \
-num_iterations 200 \
-output_image out8.png
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out8.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 2432 \
-num_iterations 200 \
-output_image out9.png
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out9.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 2560 \
-num_iterations 200 \
-output_image out10.png
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out10.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 2816 \
-num_iterations 200 \
-output_image out11.png
$INTERPRETER $NEURAL_STYLE \
-content_image $CONTENT_IMAGE -content_seg $CONTENT_MASK \
-style_image $STYLE_IMAGE -style_seg $STYLE_MASK \
-init image -init_image out11.png -color_codes $COLOR_CODES \
-tv_weight 0 -seed 876 -save_iter 0 -print_iter 50 -init image -proto_file models/channel_pruning.prototxt -model_file models/channel_pruning.caffemodel -backend cudnn -cudnn_autotune -optimizer adam \
-image_size 2944 \
-num_iterations 200 \
-output_image out12.png