how do you get mobilefacenet feature?
hi,I got some problems when i get feature. could you tell me how you get it?
float* getFeatByMobileFaceNetNCNN(ncnn::Extractor ex, cv::Mat img)
{
//cout << "getFeatByMobileFaceNetNCNN" << endl;
float *feat = new float[128];
ncnn::Mat in = ncnn::Mat::from_pixels_resize(img.data, ncnn::Mat::PIXEL_BGR, img.cols, img.rows, 112, 112);
ex.input("data", in);
ncnn::Mat out;
ex.extract("fc1", out);
std::vector
for (int j = 0; j<out.w; j++)
{
feat[j] = out[j];
}
return feat;
}
in my project,i use ncnn_mobilefaceNet.lib to get mobilefacenet feature
Hi honghu: For the code "getFeatByMobileFaceNetNCNN" you replyed, is there some preprocess, i mean substract the mean value and norm? thanks very much.
@honghuCode 真棒,这个 效果真是不错;
Where does your model come from? Does it have a corresponding Caffe network structure?