diff --git a/ocr_test/model_platecar/det1.caffemodel b/ocr_test/model_platecar/det1.caffemodel new file mode 100644 index 0000000000000000000000000000000000000000..2dd3c971ea9b87dc401f40c21acd0167612e6ea1 Binary files /dev/null and b/ocr_test/model_platecar/det1.caffemodel differ diff --git a/ocr_test/model_platecar/det1.prototxt b/ocr_test/model_platecar/det1.prototxt new file mode 100644 index 0000000000000000000000000000000000000000..eb3d4b7959e2f5ee36358d7bdac02047d2511cf4 --- /dev/null +++ b/ocr_test/model_platecar/det1.prototxt @@ -0,0 +1,185 @@ +name: "PNet" +input: "data" +input_dim: 1 +input_dim: 3 +input_dim: 12 +input_dim: 30 + +layer { + name: "conv1" + type: "Convolution" + bottom: "data" + top: "conv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 10 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "PReLU1" + type: "PReLU" + bottom: "conv1" + top: "conv1" +} +layer { + name: "pool1" + type: "Pooling" + bottom: "conv1" + top: "pool1" + pooling_param { + pool: MAX + kernel_size: 2 + stride: 2 + } +} + +layer { + name: "conv2" + type: "Convolution" + bottom: "pool1" + top: "conv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 16 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "PReLU2" + type: "PReLU" + bottom: "conv2" + top: "conv2" +} + +layer { + name: "conv3" + type: "Convolution" + bottom: "conv2" + top: "conv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 32 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "PReLU3" + type: "PReLU" + bottom: "conv3" + top: "conv3" +} + + + +layer { + name: "conv4j-1" + type: "Convolution" + bottom: "conv3" + top: "conv4-1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 2 + kernel_h:1 + kernel_w:10 + stride:1 + + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + + + +layer { + name: "conv4j-2" + type: "Convolution" + bottom: "conv3" + top: "conv4-2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 0 + } + convolution_param { + num_output: 4 + kernel_h:1 + kernel_w:10 + stride: 1 + + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prob1" + type: "Softmax" + bottom: "conv4-1" + top: "prob1" +} \ No newline at end of file diff --git a/ocr_test/model_platecar/det2.caffemodel b/ocr_test/model_platecar/det2.caffemodel new file mode 100644 index 0000000000000000000000000000000000000000..3b40a07a3a48abc2a0cc7d8740a1308eaf74a8b5 Binary files /dev/null and b/ocr_test/model_platecar/det2.caffemodel differ diff --git a/ocr_test/model_platecar/det2.prototxt b/ocr_test/model_platecar/det2.prototxt new file mode 100644 index 0000000000000000000000000000000000000000..c9b896ce542c62a84d040b0845c94f8c4ccf987e --- /dev/null +++ b/ocr_test/model_platecar/det2.prototxt @@ -0,0 +1,228 @@ +name: "RNet" +input: "data" +input_dim: 1 +input_dim: 3 +input_dim: 24 +input_dim: 60 +################################################ +layer { + name: "conv1" + type: "Convolution" + bottom: "data" + top: "conv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 28 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu1" + type: "PReLU" + bottom: "conv1" + top: "conv1" +} +layer { + name: "pool1" + type: "Pooling" + bottom: "conv1" + top: "pool1" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} + +layer { + name: "conv2" + type: "Convolution" + bottom: "pool1" + top: "conv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 48 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu2" + type: "PReLU" + bottom: "conv2" + top: "conv2" +} +layer { + name: "pool2" + type: "Pooling" + bottom: "conv2" + top: "pool2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +#################################### + +################################## +layer { + name: "conv3" + type: "Convolution" + bottom: "pool2" + top: "conv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 64 + kernel_size: 2 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu3" + type: "PReLU" + bottom: "conv3" + top: "conv3" +} +############################### + +############################### + +layer { + name: "conv4i" + type: "InnerProduct" + bottom: "conv3" + top: "conv4" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + num_output: 128 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu4" + type: "PReLU" + bottom: "conv4" + top: "conv4" +} + +layer { + name: "conv5i-1" + type: "InnerProduct" + bottom: "conv4" + top: "conv5-1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + num_output: 2 + #kernel_size: 1 + #stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + + + + +layer { + name: "conv5i-2" + type: "InnerProduct" + bottom: "conv4" + top: "conv5-2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + num_output: 4 + #kernel_size: 1 + #stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "prob1" + type: "Softmax" + bottom: "conv5-1" + top: "prob1" +} \ No newline at end of file diff --git a/ocr_test/model_platecar/det2_input.prototxt b/ocr_test/model_platecar/det2_input.prototxt new file mode 100644 index 0000000000000000000000000000000000000000..8b1cf23e13b6a69dcb4fd63d9dde7b76b109bab5 --- /dev/null +++ b/ocr_test/model_platecar/det2_input.prototxt @@ -0,0 +1,237 @@ +name: "RNet" + +layer { + top: "data" + top: "label" + name: "data" + type: "MemoryData" + memory_data_param{ + batch_size: 10 + height: 24 + width: 60 + channels: 3 + } + include: { phase: TEST } +} + +layer { + name: "conv1" + type: "Convolution" + bottom: "data" + top: "conv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 28 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu1" + type: "PReLU" + bottom: "conv1" + top: "conv1" +} +layer { + name: "pool1" + type: "Pooling" + bottom: "conv1" + top: "pool1" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} + +layer { + name: "conv2" + type: "Convolution" + bottom: "pool1" + top: "conv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 48 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu2" + type: "PReLU" + bottom: "conv2" + top: "conv2" +} +layer { + name: "pool2" + type: "Pooling" + bottom: "conv2" + top: "pool2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +#################################### + +################################## +layer { + name: "conv3" + type: "Convolution" + bottom: "pool2" + top: "conv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 64 + kernel_size: 2 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu3" + type: "PReLU" + bottom: "conv3" + top: "conv3" +} +############################### + +############################### + +layer { + name: "conv4i" + type: "InnerProduct" + bottom: "conv3" + top: "conv4" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + num_output: 128 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu4" + type: "PReLU" + bottom: "conv4" + top: "conv4" +} + +layer { + name: "conv5i-1" + type: "InnerProduct" + bottom: "conv4" + top: "conv5-1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + num_output: 2 + #kernel_size: 1 + #stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + + + + +layer { + name: "conv5i-2" + type: "InnerProduct" + bottom: "conv4" + top: "conv5-2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + num_output: 4 + #kernel_size: 1 + #stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "prob1" + type: "Softmax" + bottom: "conv5-1" + top: "prob1" +} \ No newline at end of file diff --git a/ocr_test/model_platecar/det3.caffemodel b/ocr_test/model_platecar/det3.caffemodel new file mode 100644 index 0000000000000000000000000000000000000000..d02bcab1baf4c30ca621666ffbd97db2cdeff90a Binary files /dev/null and b/ocr_test/model_platecar/det3.caffemodel differ diff --git a/ocr_test/model_platecar/det3.prototxt b/ocr_test/model_platecar/det3.prototxt new file mode 100644 index 0000000000000000000000000000000000000000..fc53b8ab7c2ffc071aa9c8f6b530b6dc15ce6f1f --- /dev/null +++ b/ocr_test/model_platecar/det3.prototxt @@ -0,0 +1,300 @@ +name: "ONet" +input: "data" +input_dim: 1 +input_dim: 3 +input_dim: 48 +input_dim: 120 + +################################## +layer { + name: "conv1" + type: "Convolution" + bottom: "data" + top: "conv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 32 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu1" + type: "PReLU" + bottom: "conv1" + top: "conv1" +} +layer { + name: "pool1" + type: "Pooling" + bottom: "conv1" + top: "pool1" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "conv2" + type: "Convolution" + bottom: "pool1" + top: "conv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 64 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "prelu2" + type: "PReLU" + bottom: "conv2" + top: "conv2" +} +layer { + name: "pool2" + type: "Pooling" + bottom: "conv2" + top: "pool2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} + +layer { + name: "conv3" + type: "Convolution" + bottom: "pool2" + top: "conv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 64 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu3" + type: "PReLU" + bottom: "conv3" + top: "conv3" +} +layer { + name: "pool3" + type: "Pooling" + bottom: "conv3" + top: "pool3" + pooling_param { + pool: MAX + kernel_size: 2 + stride: 2 + } +} +layer { + name: "conv4" + type: "Convolution" + bottom: "pool3" + top: "conv4" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 128 + kernel_size: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu4" + type: "PReLU" + bottom: "conv4" + top: "conv4" +} + + +layer { + name: "conv5i" + type: "InnerProduct" + bottom: "conv4" + top: "conv5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 3 + num_output: 256 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "drop5i" + type: "Dropout" + bottom: "conv5" + top: "conv5" + dropout_param { + dropout_ratio: 0.25 + } +} +layer { + name: "prelu5" + type: "PReLU" + bottom: "conv5" + top: "conv5" +} + + +layer { + name: "conv6i-1" + type: "InnerProduct" + bottom: "conv5" + top: "conv6-1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 1 + num_output: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + +layer { + name: "conv6i-2" + type: "InnerProduct" + bottom: "conv5" + top: "conv6-2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 1 + num_output: 4 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "conv6-3" + type: "InnerProduct" + bottom: "conv5" + top: "conv6-3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 1 + num_output: 8 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + +layer { + name: "prob1" + type: "Softmax" + bottom: "conv6-1" + top: "prob1" +} diff --git a/ocr_test/model_platecar/det3_input.prototxt b/ocr_test/model_platecar/det3_input.prototxt new file mode 100644 index 0000000000000000000000000000000000000000..9774cd07ec441ec1943fe295027ba4d9b25637b1 --- /dev/null +++ b/ocr_test/model_platecar/det3_input.prototxt @@ -0,0 +1,307 @@ +name: "ONet" +layer { + top: "data" + top: "label" + name: "data" + type: "MemoryData" + memory_data_param{ + batch_size: 10 + height: 48 + width: 120 + channels: 3 + } + include: { phase: TEST } +} + +layer { + name: "conv1" + type: "Convolution" + bottom: "data" + top: "conv1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 32 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu1" + type: "PReLU" + bottom: "conv1" + top: "conv1" +} +layer { + name: "pool1" + type: "Pooling" + bottom: "conv1" + top: "pool1" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} +layer { + name: "conv2" + type: "Convolution" + bottom: "pool1" + top: "conv2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 64 + kernel_size: 3 + stride: 1 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "prelu2" + type: "PReLU" + bottom: "conv2" + top: "conv2" +} +layer { + name: "pool2" + type: "Pooling" + bottom: "conv2" + top: "pool2" + pooling_param { + pool: MAX + kernel_size: 3 + stride: 2 + } +} + +layer { + name: "conv3" + type: "Convolution" + bottom: "pool2" + top: "conv3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 64 + kernel_size: 3 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu3" + type: "PReLU" + bottom: "conv3" + top: "conv3" +} +layer { + name: "pool3" + type: "Pooling" + bottom: "conv3" + top: "pool3" + pooling_param { + pool: MAX + kernel_size: 2 + stride: 2 + } +} +layer { + name: "conv4" + type: "Convolution" + bottom: "pool3" + top: "conv4" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + convolution_param { + num_output: 128 + kernel_size: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} +layer { + name: "prelu4" + type: "PReLU" + bottom: "conv4" + top: "conv4" +} + + +layer { + name: "conv5i" + type: "InnerProduct" + bottom: "conv4" + top: "conv5" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 3 + num_output: 256 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "drop5i" + type: "Dropout" + bottom: "conv5" + top: "conv5" + dropout_param { + dropout_ratio: 0.25 + } +} +layer { + name: "prelu5" + type: "PReLU" + bottom: "conv5" + top: "conv5" +} + + +layer { + name: "conv6i-1" + type: "InnerProduct" + bottom: "conv5" + top: "conv6-1" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 1 + num_output: 2 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + +layer { + name: "conv6i-2" + type: "InnerProduct" + bottom: "conv5" + top: "conv6-2" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 1 + num_output: 4 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + +layer { + name: "conv6-3" + type: "InnerProduct" + bottom: "conv5" + top: "conv6-3" + param { + lr_mult: 1 + decay_mult: 1 + } + param { + lr_mult: 2 + decay_mult: 1 + } + inner_product_param { + #kernel_size: 1 + num_output: 8 + weight_filler { + type: "xavier" + } + bias_filler { + type: "constant" + value: 0 + } + } +} + + +layer { + name: "prob1" + type: "Softmax" + bottom: "conv6-1" + top: "prob1" +}