Hi,
I tryo to run mtcnn mxnet on the Raspberry pi with below part of code .
PredictorHandle MxNetMtcnn::LoadMxNetModule(const std::string& param_file, const std::string& json_file,
int batch, int channel, int input_h, int input_w)
{
std::cout << “MxNetMtcnn::LoadMxNetModule …” << std::endl;
int64 start = cv::getTickCount();
std::vector param_buffer;
std::vector json_buffer;
PredictorHandle pred_hnd;
if (LoadFile(param_file, param_buffer)<0)
return nullptr;
if (LoadFile(json_file, json_buffer)<0)
return nullptr;
int device_type = 1;
int dev_id = 0;
mx_uint num_input_nodes = 1;
const char * input_keys[1];
const mx_uint input_shape_indptr[] = { 0, 4 };
const mx_uint input_shape_data[] = {
static_cast<mx_uint>(batch),
static_cast<mx_uint>(channel),
static_cast<mx_uint>(input_h),
static_cast<mx_uint>(input_w)
};
std::cout << "111 -- MxNetMtcnn::LoadMxNetModule ..........." << std::endl;
input_keys[0] = "data";
MXPredCreate(json_buffer.data(),
param_buffer.data(),
param_buffer.size(),
device_type,
dev_id,
num_input_nodes,
input_keys,
input_shape_indptr,
input_shape_data,
&pred_hnd
);
std::cout << "222222 -- MxNetMtcnn::LoadMxNetModule ..........." << std::endl;
MXPredCreate . part gives below error:
111 – MxNetMtcnn::LoadMxNetModule …
[11:42:05] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade…
Segmentation fault: 11
Stack trace returned 3 entries:
[bt] (0) ./main(dmlc::StackTraceabi:cxx11+0x38) [0x397b0]
[bt] (1) /home/pi/Projects/incubator-mxnet/lib/libmxnet.so(+0x2eb70e0) [0x76cd00e0]
[bt] (2) /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0x7141e6b0]
same code working on my laptop.
any idea ?