Hi,
I'm trying to compile a MobileNetSSD that is working find with OpenCV 3.3.0.
name: "MobileNet-SSD"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 300
dim: 300
}
layer {
name: "conv0"
type: "Convolution"
bottom: "data"
top: "conv0"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 32
pad: 1
kernel_size: 3
stride: 2
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
.......
layer {
name: "conv13_mbox_loc_perm"
type: "Permute"
bottom: "conv13_mbox_loc"
top: "conv13_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv13_mbox_loc_flat"
type: "Flatten"
bottom: "conv13_mbox_loc_perm"
top: "conv13_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv13_mbox_conf"
type: "Convolution"
bottom: "conv13"
top: "conv13_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 126
kernel_size: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
...................
layer {
name: "conv17_2_mbox_loc"
type: "Convolution"
bottom: "conv17_2"
top: "conv17_2_mbox_loc"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 24
kernel_size: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv17_2_mbox_loc_perm"
type: "Permute"
bottom: "conv17_2_mbox_loc"
top: "conv17_2_mbox_loc_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv17_2_mbox_loc_flat"
type: "Flatten"
bottom: "conv17_2_mbox_loc_perm"
top: "conv17_2_mbox_loc_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv17_2_mbox_conf"
type: "Convolution"
bottom: "conv17_2"
top: "conv17_2_mbox_conf"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 126
kernel_size: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0.0
}
}
}
layer {
name: "conv17_2_mbox_conf_perm"
type: "Permute"
bottom: "conv17_2_mbox_conf"
top: "conv17_2_mbox_conf_perm"
permute_param {
order: 0
order: 2
order: 3
order: 1
}
}
layer {
name: "conv17_2_mbox_conf_flat"
type: "Flatten"
bottom: "conv17_2_mbox_conf_perm"
top: "conv17_2_mbox_conf_flat"
flatten_param {
axis: 1
}
}
layer {
name: "conv17_2_mbox_priorbox"
type: "PriorBox"
bottom: "conv17_2"
bottom: "data"
top: "conv17_2_mbox_priorbox"
prior_box_param {
min_size: 285.0
max_size: 300.0
aspect_ratio: 2.0
aspect_ratio: 3.0
flip: true
clip: false
variance: 0.1
variance: 0.1
variance: 0.2
variance: 0.2
offset: 0.5
}
}
layer {
name: "mbox_loc"
type: "Concat"
bottom: "conv11_mbox_loc_flat"
bottom: "conv13_mbox_loc_flat"
bottom: "conv14_2_mbox_loc_flat"
bottom: "conv15_2_mbox_loc_flat"
bottom: "conv16_2_mbox_loc_flat"
bottom: "conv17_2_mbox_loc_flat"
top: "mbox_loc"
concat_param {
axis: 1
}
}
layer {
name: "mbox_conf"
type: "Concat"
bottom: "conv11_mbox_conf_flat"
bottom: "conv13_mbox_conf_flat"
bottom: "conv14_2_mbox_conf_flat"
bottom: "conv15_2_mbox_conf_flat"
bottom: "conv16_2_mbox_conf_flat"
bottom: "conv17_2_mbox_conf_flat"
top: "mbox_conf"
concat_param {
axis: 1
}
}
layer {
name: "mbox_priorbox"
type: "Concat"
bottom: "conv11_mbox_priorbox"
bottom: "conv13_mbox_priorbox"
bottom: "conv14_2_mbox_priorbox"
bottom: "conv15_2_mbox_priorbox"
bottom: "conv16_2_mbox_priorbox"
bottom: "conv17_2_mbox_priorbox"
top: "mbox_priorbox"
concat_param {
axis: 2
}
}
layer {
name: "mbox_conf_reshape"
type: "Reshape"
bottom: "mbox_conf"
top: "mbox_conf_reshape"
reshape_param {
shape {
dim: 0
dim: -1
dim: 21
}
}
}
layer {
name: "mbox_conf_softmax"
type: "Softmax"
bottom: "mbox_conf_reshape"
top: "mbox_conf_softmax"
softmax_param {
axis: 2
}
}
layer {
name: "mbox_conf_flatten"
type: "Flatten"
bottom: "mbox_conf_softmax"
top: "mbox_conf_flatten"
flatten_param {
axis: 1
}
}
layer {
name: "detection_out"
type: "DetectionOutput"
bottom: "mbox_loc"
bottom: "mbox_conf_flatten"
bottom: "mbox_priorbox"
top: "detection_out"
include {
phase: TEST
}
detection_output_param {
num_classes: 21
share_location: true
background_label_id: 0
nms_param {
nms_threshold: 0.45
top_k: 100
}
code_type: CENTER_SIZE
keep_top_k: 100
confidence_threshold: 0.25
}
}
and I'm getting this error:
vladi@vladi:~/workspace/ncsdk/examples/caffe/real-time-object-detection$ mvNCCompile MobileNetSSD_deploy.prototxt -s 12
mvNCCompile v02.00, Copyright @ Movidius Ltd 2016
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format caffe.NetParameter: 1177:17: Message type "caffe.LayerParameter" has no field named "permute_param".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F1026 17:50:53.770750 32253 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: MobileNetSSD_deploy.prototxt
*** Check failure stack trace: ***
Aborted (core dumped)
I'm using latest SDK updated and compiled today.
vladi@vladi:~/workspace/ncsdk$ git pull
Already up-to-date.
my PYTHONPATH and version
vladi@vladi:~/workspace/ncsdk$ python --version
Python 2.7.13
vladi@vladi:~/workspace/ncsdk$ echo $PYTHONPATH
:/opt/movidius/caffe/python
vladi@vladi:~/workspace/ncsdk$
I'm running Ubuntu Desktop 17.04
Linux vladi 4.10.0-37-generic #41-Ubuntu SMP Fri Oct 6 20:20:37 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Could you help me to understand what I'm doing wrong?
Sebastian