This is the Caffe implementation of our SVIP(Signal, Image and Video Processing) paper: "Detonator coded character spotting based on convolutional neural networks". link: https://link.springer.com/article/10.1007%2Fs11760-019-01525-1
Code written by Guandong Cen(cenguandong@qq.com)
Installation
-
For caffe version of this project, please install HED(https://github.com/s9xie/hed) at first.
-
Add the following code in 'caffe.proto'.
optional PostParameter post_param = 139;
optional JaccardLossParameter jaccard_loss_param = 141;
message JaccardLossParameter {
optional float w_ = 1 [default = 1.0];
}
message PostParameter {
optional float binary_threshold = 1 [default = 0.7];
optional float area_threshold = 2 [default = 0.015625];
optional float mean_h = 3 [default = 35.0];
optional float mean_w = 4 [default = 258.0];
enum Lt {
SIGMOID = 5;
JACCARD = 6;
}
optional Lt losstype = 7 [default = JACCARD];
}
-
Replace file 'vision_layers.hpp' and file 'loss_layers.hpp' in '$CAFFE_ROOT/include/caffe/'.
-
Add these layers: BatchNorm Layer(not provided in this branch), jaccard_loss_layer.cpp and post_layer.cpp.
-
make all & make pycaffe & run deploy_demo/demo_e2e.py.