Skip to content

Commit 0c41f7a

Browse files
khknoppRam81
authored andcommittedDec 9, 2018
Add Colornet to Fabrik Zoo (Cloud-CV#494)
* Add files via upload * Add files via upload * Add files via upload * Update tested_models.md * Update tested_models.md * Update tested_models.md
1 parent cfb34f4 commit 0c41f7a

File tree

4 files changed

+290
-14
lines changed

4 files changed

+290
-14
lines changed
 

‎example/caffe/colornet.prototxt

+274
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
name: "Colornet"
2+
layer {
3+
name: "img_lab"
4+
top: "img_lab" # Lab color space
5+
type: "Input"
6+
input_param { shape { dim: 1 dim: 3 dim: 227 dim: 227 } }
7+
}
8+
# **************************
9+
# ***** PROCESS COLORS *****
10+
# **************************
11+
# layer { # Convert to lab
12+
# name: "img_lab"
13+
# type: "ColorConv"
14+
# bottom: "data"
15+
# top: "img_lab"
16+
# propagate_down: false
17+
# color_conv_param {
18+
# input: 0 # BGR
19+
# output: 3 # Lab
20+
# }
21+
# }
22+
layer {
23+
name: "img_slice"
24+
type: "Slice"
25+
bottom: "img_lab"
26+
top: "img_l" # [0,100]
27+
top: "data_ab" # [-110,110]
28+
propagate_down: false
29+
slice_param {
30+
axis: 1
31+
slice_point: 1
32+
}
33+
}
34+
layer {
35+
name: "silence_ab"
36+
type: "Silence"
37+
bottom: "data_ab"
38+
}
39+
layer { # 0-center lightness channel
40+
name: "data_l"
41+
type: "Convolution"
42+
bottom: "img_l"
43+
top: "data_l" # scaled and centered lightness value
44+
propagate_down: false
45+
param {lr_mult: 0 decay_mult: 0}
46+
param {lr_mult: 0 decay_mult: 0}
47+
convolution_param {
48+
kernel_size: 1
49+
num_output: 1
50+
}
51+
}
52+
layer {
53+
name: "conv1"
54+
type: "Convolution"
55+
bottom: "data_l"
56+
top: "conv1"
57+
param { lr_mult: 1 decay_mult: 1 }
58+
param { lr_mult: 2 decay_mult: 0 }
59+
convolution_param {
60+
num_output: 96
61+
kernel_size: 11
62+
stride: 4
63+
weight_filler {
64+
type: "gaussian"
65+
std: 0.01
66+
}
67+
bias_filler {
68+
type: "constant"
69+
value: 0
70+
}
71+
}
72+
}
73+
layer {
74+
name: "relu1"
75+
type: "ReLU"
76+
bottom: "conv1"
77+
top: "conv1"
78+
}
79+
layer {
80+
name: "pool1"
81+
type: "Pooling"
82+
bottom: "conv1"
83+
top: "pool1"
84+
pooling_param {
85+
pool: MAX
86+
kernel_size: 3
87+
stride: 2
88+
}
89+
}
90+
layer {
91+
name: "conv2"
92+
type: "Convolution"
93+
bottom: "pool1"
94+
top: "conv2"
95+
param { lr_mult: 1 decay_mult: 1 }
96+
param { lr_mult: 2 decay_mult: 0 }
97+
convolution_param {
98+
num_output: 256
99+
pad: 2
100+
kernel_size: 5
101+
group: 2
102+
weight_filler {
103+
type: "gaussian"
104+
std: 0.01
105+
}
106+
bias_filler {
107+
type: "constant"
108+
value: 1
109+
}
110+
}
111+
}
112+
layer {
113+
name: "relu2"
114+
type: "ReLU"
115+
bottom: "conv2"
116+
top: "conv2"
117+
}
118+
layer {
119+
name: "pool2"
120+
type: "Pooling"
121+
bottom: "conv2"
122+
top: "pool2"
123+
pooling_param {
124+
pool: MAX
125+
kernel_size: 3
126+
stride: 2
127+
}
128+
}
129+
layer {
130+
name: "conv3"
131+
type: "Convolution"
132+
bottom: "pool2"
133+
top: "conv3"
134+
param { lr_mult: 1 decay_mult: 1 }
135+
param { lr_mult: 2 decay_mult: 0 }
136+
convolution_param {
137+
num_output: 384
138+
pad: 1
139+
kernel_size: 3
140+
weight_filler {
141+
type: "gaussian"
142+
std: 0.01
143+
}
144+
bias_filler {
145+
type: "constant"
146+
value: 0
147+
}
148+
}
149+
}
150+
layer {
151+
name: "relu3"
152+
type: "ReLU"
153+
bottom: "conv3"
154+
top: "conv3"
155+
}
156+
layer {
157+
name: "conv4"
158+
type: "Convolution"
159+
bottom: "conv3"
160+
top: "conv4"
161+
param { lr_mult: 1 decay_mult: 1 }
162+
param { lr_mult: 2 decay_mult: 0 }
163+
convolution_param {
164+
num_output: 384
165+
pad: 1
166+
kernel_size: 3
167+
group: 2
168+
weight_filler {
169+
type: "gaussian"
170+
std: 0.01
171+
}
172+
bias_filler {
173+
type: "constant"
174+
value: 1
175+
}
176+
}
177+
}
178+
layer {
179+
name: "relu4"
180+
type: "ReLU"
181+
bottom: "conv4"
182+
top: "conv4"
183+
}
184+
layer {
185+
name: "conv5"
186+
type: "Convolution"
187+
bottom: "conv4"
188+
top: "conv5"
189+
param { lr_mult: 1 decay_mult: 1 }
190+
param { lr_mult: 2 decay_mult: 0 }
191+
convolution_param {
192+
num_output: 256
193+
pad: 1
194+
kernel_size: 3
195+
group: 2
196+
weight_filler {
197+
type: "gaussian"
198+
std: 0.01
199+
}
200+
bias_filler {
201+
type: "constant"
202+
value: 1
203+
}
204+
}
205+
}
206+
layer {
207+
name: "relu5"
208+
type: "ReLU"
209+
bottom: "conv5"
210+
top: "conv5"
211+
}
212+
layer {
213+
name: "pool5"
214+
type: "Pooling"
215+
bottom: "conv5"
216+
top: "pool5"
217+
pooling_param {
218+
pool: MAX
219+
kernel_size: 3
220+
stride: 2
221+
}
222+
}
223+
layer {
224+
name: "fc6"
225+
type: "InnerProduct"
226+
bottom: "pool5"
227+
top: "fc6"
228+
param { lr_mult: 1 decay_mult: 1 }
229+
param { lr_mult: 2 decay_mult: 0 }
230+
inner_product_param {
231+
num_output: 4096
232+
}
233+
}
234+
layer {
235+
name: "relu6"
236+
type: "ReLU"
237+
bottom: "fc6"
238+
top: "fc6"
239+
}
240+
layer {
241+
name: "drop6"
242+
type: "Dropout"
243+
bottom: "fc6"
244+
top: "fc6"
245+
dropout_param {
246+
dropout_ratio: 0.5
247+
}
248+
}
249+
layer {
250+
name: "fc7"
251+
type: "InnerProduct"
252+
bottom: "fc6"
253+
top: "fc7"
254+
param { lr_mult: 1 decay_mult: 1 }
255+
param { lr_mult: 2 decay_mult: 0 }
256+
inner_product_param {
257+
num_output: 4096
258+
}
259+
}
260+
layer {
261+
name: "relu7"
262+
type: "ReLU"
263+
bottom: "fc7"
264+
top: "fc7"
265+
}
266+
layer {
267+
name: "drop7"
268+
type: "Dropout"
269+
bottom: "fc7"
270+
top: "fc7"
271+
dropout_param {
272+
dropout_ratio: 0.5
273+
}
274+
}

‎ide/static/img/zoo/colornet.png

66.4 KB
Loading

‎ide/static/js/modelZoo.js

+15-14
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,37 @@ class ModelZoo extends React.Component {
2424
this.refs.caption.className = " ";
2525
this.refs.segmentation.className = " ";
2626
this.refs.vqa.className = " ";
27-
}
27+
}
2828
else if (id == "recognition")
2929
{
3030
this.refs.recognition.className = " ";
31-
}
31+
}
3232
else if (id == "detection")
33-
{
33+
{
3434
this.refs.detection.className = " ";
35-
}
35+
}
3636
else if (id == "retrieval")
3737
{
3838
this.refs.retrieval.className = " ";
39-
}
39+
}
4040
else if (id == "seq2seq")
4141
{
4242
this.refs.seq2seq.className = " ";
43-
}
43+
}
4444
else if (id == "caption")
4545
{
4646
this.refs.caption.className = " ";
47-
}
47+
}
4848
else if (id == "segmentation")
4949
{
5050
this.refs.segmentation.className = " ";
51-
}
51+
}
5252
else if (id == "vqa")
5353
{
5454
this.refs.vqa.className = " ";
55-
}
55+
}
5656
}
57-
57+
5858
componentDidMount() {
5959
let filter = (pattern) => {
6060
let layerCompability = (searchQuery, layerName) => {
@@ -75,7 +75,7 @@ class ModelZoo extends React.Component {
7575
}
7676
return {
7777
match: seq,
78-
full_match: full_match
78+
full_match: full_match
7979
};
8080
}
8181
for (let elem of $('.col-sm-6')) {
@@ -90,12 +90,12 @@ class ModelZoo extends React.Component {
9090
}
9191
}
9292
$('#model-search-input').keyup((e) => {
93-
filter(e.target.value);
93+
filter(e.target.value);
9494
});
9595
}
96-
96+
9797
render() {
98-
98+
9999
return (
100100
<div className="sidebar-content">
101101
<div id="wrapper" className="toggle" ref="wrapper1">
@@ -160,6 +160,7 @@ class ModelZoo extends React.Component {
160160
</div>
161161
<div ref="retrieval">
162162
<ModelElement importNet={this.props.importNet} framework="caffe" id="siamese_mnist" displayName="MNIST Siamese"> </ModelElement>
163+
<ModelElement importNet={this.props.importNet} framework="caffe" id="colornet" displayName="Colornet"> </ModelElement>
163164
</div>
164165
<div ref="seq2seq">
165166
<ModelElement importNet={this.props.importNet} framework="keras" id="textGeneration" displayName="Text Generation"> </ModelElement>

‎tutorials/tested_models.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
### Retrieval
3535

3636
* MNIST Siamese [\[Source\]](https://github.com/BVLC/caffe/tree/master/examples/siamese)[\[Visualise\]](http://fabrik.cloudcv.org/caffe/load?id=20171208113503xgnfd)
37+
* Colornet [\[Source\]](https://github.com/richzhang/colorization/blob/master/models/alexnet_deploy_lab.prototxt)[\[Visualise\]](http://fabrik.cloudcv.org/caffe/load?id=20181208162637cezkh)
3738

3839
### Seq2Seq
3940

0 commit comments

Comments
 (0)
Please sign in to comment.